isamert / empv.el

An Emacs media player, media library manager, radio player, YouTube frontend
GNU General Public License v3.0
107 stars 19 forks source link

Display better names for urls in playlist #6

Closed mefff closed 2 years ago

mefff commented 2 years ago

If you add a youtube url it will only show it url in the playlist, not the title. With this change it will show: $url # $title.

This works because mpv discards what is beyond the # (source https://github.com/mpv-player/mpv/issues/7438#issuecomment-601940408). Tried to do something in the mpv end, but didn't find anything. My goal was to make playlist display the media-title instead of the filename which is the url in these cases, but apparently is not possible to do.

Also, when a playlist url is loaded, instead of a video one, this is not a problem, since the titles are correctly loaded to the playlist.

Others solutions (at least that I could think of) involve doing more http request, using for example youtube-dl just to retrieve the titles, but I don't think that's a good idea.

isamert commented 2 years ago

I believe this is a quite nice trick to utilize. While not pretty, at least it gives the user to ability to distinguish what's what in the playlist. Thanks!

Tried to do something in the mpv end, but didn't find anything. My goal was to make playlist display the media-title instead of the filename which is the url in these cases, but apparently is not possible to do.

I also tried this with no luck. That's quite strange behavior on mpv's end.

Others solutions (at least that I could think of) involve doing more http request, using for example youtube-dl just to retrieve the titles, but I don't think that's a good idea.

Yep, I don't want to go that route either, youtube operations already takes some noticable amount of time.