zydezu / ModernX

My fork of modernX (a replacement for MPV that retains the functionality of the default OSC), adding additional features - see builds at: https://github.com/zydezu/mpvconfig
131 stars 5 forks source link

Better window title appearance #49

Open Keith94 opened 2 weeks ago

Keith94 commented 2 weeks ago

Would like to see the window title at the top appear more modern like a YouTube video, i.e. text is bigger with vignette at the top and no black background, and no window controls. We can't seem to disable to window controls separately... windowcontrols=no will hide the entire title bar.

Also wasn't obvious at first but I had to use force-media-title= in mpv.conf to change the text output, since title= wasn't working

brave_ZeTWUIz7Eb

mpv_Bv7F9z0MgD

Samillion commented 2 days ago

Also wasn't obvious at first but I had to use force-media-title= in mpv.conf to change the text output, since title= wasn't working

I just noticed that. I think there are two things causing this issue:

https://github.com/zydezu/ModernX/blob/142ed71508396fa7300f84647354381118225853/modernx.lua#L1175-L1181

This mp.set_property("title", mediatitle) should be moved inside the nested condition for user_opts.dynamictitle.

I'm not sure why this is in the end of the file: (I commented it out) https://github.com/zydezu/ModernX/blob/142ed71508396fa7300f84647354381118225853/modernx.lua#L3996

Will test to see if my changes break anything.

Samillion commented 2 days ago

Ok, so after testing out a few things it's more clear the use of the function. Mostly affects web videos (path is url), which is part of the whole dynamic title/description features (basically show media title instead of filename, with added parameters such as artist, album..etc)

The feature is great, but I honestly think it should all operate only and if at least one of the web related user_opts is set to true, otherwise it should leave the title property as set in mpv.conf/default.

@zydezu If I ever find the time, I might create a PR draft to improve the functionality, if you don't mind. Though it might be a while, as I am traveling soon. :'(