jonniek / mpv-playlistmanager

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

Feature Request: Playlist with referrer or referer support #126

Closed kungfubeaner closed 9 months ago

kungfubeaner commented 11 months ago

Could support be added for kodi style playlists which have |referer= at the end of the url or vlc style playlists that have the:

EXTVLCOPT:http-referrer= option by using that info to set the --referrer= command line option on the fly?

Thanks for for the great script. I understand if its not possible or outside of the scope of this script

jonniek commented 11 months ago

I'm curious why is it useful to set the referrer? Can it always be the same value? Why is the --referrer not working for your usecase?

I think if this #EXTVLCOPT:http-referrer= format is not supported by mpv then it's quite hard to implement.

kungfubeaner commented 11 months ago

Its useful to watch IPTV playlists. The referrer is a must and has to change per playlist item. If the referrer isn't correct the m3u8 file doesn't play. There are lists online to watch things like PBS (public broadcasting channel) NASA etc. I usually have to manually type --referrer="https://example.com/" each time I want to watch something different. If the playlist manager could handle this I could just use the playlist manager to select the "channel" I want from the list. KODI and VLC already do this in their own ways but of course MPV the nicest player out of the 3.

I'm not so much interested in the #EXTVLCOPT. But handling the |referer= at the end (they're the most common) would be amazing. |referrer= at the end is the way KODI handles playlist referrers.

Example usage in the command line is: mpv https:/example.com/playlist.m3u8 --referrer=http://example.net/

Oh and #EXTVLCOPT:http-referrer= doesn't really need to be handled as long as the "--referrer=" command line option is set. It would just require parsing the #EXTVLCOPT line and keeping everything after referrer= to set the option.

jonniek commented 9 months ago

I see. I think this is not doable with a script, as the information of the playlist metadata is not available.

I would recommend opening an issue on the mpv repository.