jonniek / mpv-playlistmanager

Mpv lua script to create and manage playlists
The Unlicense
537 stars 42 forks source link

Playlists should be saved with `#EXTM3U` in the first line #117

Closed FichteFoll closed 1 year ago

FichteFoll commented 1 year ago

The playlists saved with the save script message contain #EXTINF lines but are missing the initial #EXTM3U line that is necessary to tell mpv itself and probably most other players to use the provided metadata.

See also https://en.wikipedia.org/wiki/M3U#Extended_M3U.

Steps for reproduction:

  1. Have a playlist with multiple URLs.
  2. Save the playlist to a file, e.g. /tmp/playlist.txt
  3. Open the file with mpv using mpv --playlist=/tmp/playlist.txt

mpv will show each #EXTINF line from the playlist file as its own playlist entry. Adding the required line manually resolves the issue.

jonniek commented 1 year ago

Thanks for the info. I didn't know this 👍 I think if the file is m3u extension mpv would automatically use it, this is probably how I tested it. But it's good to add the correct header to support any other file extensions.