Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Display channel name as the media title #1

Open
FunctionalHacker opened this issue Feb 9, 2020 · 3 comments
Open

[FR] Display channel name as the media title #1

FunctionalHacker opened this issue Feb 9, 2020 · 3 comments

Comments

@FunctionalHacker
Copy link

It would be nice if the channel name, or the name of the currently playing program was displayed as the media title. Now it's just some sort af an ID, for example 761849287?profile=pass

@gthreepw00d
Copy link
Owner

Currently, script gets media titles from mpv on playlist loading and doesn't update them from metadata or whatever. I.e. titles are expected to be what "#EXTINF:" entries say.

@pintassilgo
Copy link

mp.commandv("loadfile",self.pls[self.plsfiltered[self.wndstart+self.cursor]].filename)

Current program is impossible, but channel name can be done by replacing the line above by this one:

    mp.commandv("loadfile",self.pls[self.plsfiltered[self.wndstart+self.cursor]].filename,'replace','force-media-title='..self.pls[self.plsfiltered[self.wndstart+self.cursor]].title)

I uploaded a working script in my modified version here.

@SmilerRyan
Copy link

for me @pintassilgo's version does not work out of the box, but i found another way does work for me.

image

Here are the lines you need to add/update to the one used in this iptv script:

currentMedia = self.pls[self.plsfiltered[self.wndstart+self.cursor]]
mp.set_property("force-media-title", currentMedia.title)
mp.commandv("loadfile",currentMedia.filename)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants