isamert / empv.el

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

Nit: Tweak Display Template #45

Closed tvraman closed 8 months ago

tvraman commented 10 months ago

Suggestion For Info Line Display

The new template is nice, I can now put the title in front.

There is still the minor annoyance of HLS live streams displaying a somewhat irrelevant chapter and percentage, best shown with an example.

Stream: BBC Radio 4 Displays: [radio-4-bbc.m3u Playing, 00:06 of 00:19 (34%), 1/1, 🔊 50] m3u file below:

EXTINF:-1,BBC - Radio 4

http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3d96000.norewind.m3u8

isamert commented 10 months ago

What's the value of your empv-display-current-format? And which part in

[radio-4-bbc.m3u Playing, 00:06 of 00:19 (34%), 1/1, 🔊 50]

you find that irrelevant? Simply excluding #{chapter} from the template should get rid of the chapter information and I don't see the chapter information in the example you gave. Am I missing something?

tvraman commented 10 months ago

Current value: empv-display-current-format' "[#{title} #{volume} #{state}#{item-loop-indicator}, #{time-pos} of

{duration} (#{percent-pos}%),

{playlist-pos}/#{playlist-count}#{playlist-loop-indicator}#{radio}#{speed}]

{chapter}"

Note that my playlist has only one entry -- what you see displayed [radio-4-bbc.m3u , 🔊 125 Playing, 00:05 of 00:19 (26%), 1/1] the 00:05 of 00:19 is the current fragment they're streaming; HLS basically streams the live streams as a sequence of small segments. --

isamert commented 9 months ago

What would be the solution for this? Should #{time-pos} ${duration} and ${percent-pos} evaluate to empty string if it's an HLS fragment?

Sorry for the late reply.

tvraman commented 9 months ago

İsa Mert Gürbüz @.***> writes:

That would be one possibility since those hls fragment numbers and duration values are irrelevant to the user.

What would be the solution for this? Should #{time-pos} ${duration} and ${percent-pos} evaluate to empty string if it's an HLS fragment?

Sorry for the late reply.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

--

isamert commented 8 months ago

I thought about this a little bit and found out that evaluating some values to empty string in case of HLS format causes more problems than it fixes. So I went ahead and changed how empv-display-current-format works. Now, it can be an alist from file formats to display template so that you can change the template based on file format if you want. Let me know if it works for you.

tvraman commented 8 months ago

thanks will give it a try. --