Page 1 of 1

Plugin for getting Title/Artist/Application from Windows?

Posted: February 3rd, 2024, 12:50 am
by ItsHobkinBoi
I understand there are plugins for specific applications like WMP, Winamp, Spotify, etc.. But what about something that can pull the title and artist from the API that Windows 10/11 has? Most browsers and more modern media players will usually integrate with it and show that info next to the volume when adjusting it or playing/pausing/changing tracks.

Re: Plugin for getting Title/Artist/Application from Windows?

Posted: April 10th, 2024, 4:07 pm
by fruittool
Good idea, is this what you're looking for?

Screenshot-smtc.png

Artist: $dll(smtc,1,0,)
Title: $dll(smtc,1,1,)
Album artist: $dll(smtc,1,2,)
Album title: $dll(smtc,1,3,)
Track #: $dll(smtc,1,4,)
Track count: $dll(smtc,1,5,)
Subtitle: $dll(smtc,1,6,)
Start time: $dll(smtc,1,7,)
Position: $dll(smtc,1,8,)
End time: $dll(smtc,1,9,)

Notes on position:
Position should be updated by the media player but I'm having trouble finding one where this is actually done.
Winamp with smtc plugin does not
VLC with smtc plugin does not
Opera browser while playing YouTube does so only when the position is changed manually

Let me know if you find one where this does work so I can make sure that part of the code works properly and efficiently

smtc-1.0.zip

Re: Plugin for getting Title/Artist/Application from Windows?

Posted: April 11th, 2024, 7:45 am
by ItsHobkinBoi
Yeah, exactly like that! I do notice sometimes it doesn't update the title/artist properly, and have experienced a few crashes to the program. Not sure if there's a log for that or something. I'm just using media player, youtube, and youtube music (both through firefox).

Appreciate someone comin out with this though

Re: Plugin for getting Title/Artist/Application from Windows?

Posted: April 22nd, 2024, 11:08 am
by ItsHobkinBoi
After a while of using this I notice that if i'm playing media off the browser, it changes as expected, but for some reason playing media locally doesn't change it unless I pause/play my media. So if I'm playing a song and it changes, it shows the first song still until i refresh it myself.
Maybe it's not actively polling for changes in the info it's scraping off smtc?

Re: Plugin for getting Title/Artist/Application from Windows?

Posted: April 23rd, 2024, 6:46 am
by limbo
Although I love fruittool work and he is always to the point with his solutions. @fruittool I'm not trying to debase your creation. I just want to notify for another vailable plugin.

I would like to bring to your attention this plugin:
chcl_now_playing (https://github.com/ChlorideCull/chcl_now_playing)
I believe that this plugin gives the same result.

Re: Plugin for getting Title/Artist/Application from Windows?

Posted: April 23rd, 2024, 1:51 pm
by ItsHobkinBoi
Yes! That one does the trick. It changes reliably when tracks change.

Re: Plugin for getting Title/Artist/Application from Windows?

Posted: April 23rd, 2024, 7:49 pm
by fruittool
Ahh there you go. Glad you found something that works properly. That is much cleaner than my terrible attempt :smt005