Created
December 26, 2019 05:24
-
-
Save Pxtl/fd7bf1dc8f3720beccbf3a8db357670b to your computer and use it in GitHub Desktop.
Use Powershell to create a ps1 m3u compatible with Lakka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create an m3u from the given list of files | |
[cmdletbinding()] | |
param( | |
[Parameter(Mandatory)][string] $targetFilePath, | |
[Parameter(Mandatory)][IO.FileInfo[]]$sourceCuePaths | |
) | |
$targetFilePath = [IO.Path]::ChangeExtension($targetFilePath, 'm3u') | |
$m3uBodyArray = $sourceCuePaths | foreach-object { | |
[IO.Path]::GetFileName($_) | |
} | |
$m3uBody = $m3uBodyArray -join "`r`n" | |
new-item -ItemType File $targetFilePath -value $m3uBody |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment