It is currently May 9th, 2024, 5:25 pm

NowPlaying plugin - Multiple Media Player Support

Share and get help with Plugins and Addons
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Kaelri »

eddie the head wrote:is there any support for showing tracknumbers?
i.e 05 - prowler.
You can do that very easily by adding multiple measures to your STRING meter, in conjunction with this plugin. Example:

Code: Select all

[TrackNumberAndName]
Meter=STRING
MeasureName=MeasureTrackNumber
MeasureName2=MeasureTrackName
Text="%1 - %2"
EDIT: Sorry, I'm an idiot. The plugin doesn't support track numbers yet. Probably will in the future though. :)
Matt
Posts: 104
Joined: November 20th, 2009, 7:23 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Matt »

poiru wrote:Will fix them, thanks for reporting. OpenPlayer should work without PlayerPath= set, but only if VLC has been started after Rainmeter at least once.
I don't think I even tried that yesterday. Tried it just now and it does work. I previously assumed PlayerPath= would need to be set whenever Player=CAD. Cool.
poiru wrote: This is a troublesome little issue. Currently, MusicBee does not notify about rating changes to NowPlaying (or CAD), as a result of which I internally change the RATING value on click. I can either:
- stop handing the rating change internally. With MusicBee, this would mean that ratings changed through NowPlaying won't be updated until refresh. With VLC, this would result in no action (AFAIK, VLC doesn't support ratings)
- continue with current behavior, which is fine with MusicBee (but not with VLC)

I'll probably stick to the latter for now and switch to the former option when the issue is resolved in MusicBee.
Sounds like a sensible plan to me. :)
User avatar
Waldensamkeit
Posts: 83
Joined: March 15th, 2011, 12:39 pm
Location: Hamilton, New Jersey

Re: NowPlaying plugin - Multiple Media Player Support

Post by Waldensamkeit »

Ok, after this last update the lyrics feature finally kicked and so far it works great! I was struggling with just the sheer amount of space it needs to display full lyrics and didn't like the idea of having half my screen used for lyrics.

After a few minutes of styling and general tweaking, I gave up on the idea of a constant display for lyrics and the kind of code I would have to figure out to hide the whole panel when nothing is playing. (though I think there is some functionality included in the plugin to automate this easily.)

Then a thought occurred to me... ToolTipText! So I added the measure to the Cover meter and now on mouse over, the cover art will display the lyrics as a tool tip! Not too sure how this would look on smaller monitors but using my 46" as a monitor, it looks great. Coupled with the Placebo VS from solmiler which makes tool tips show on a black background with white text, everything looks amazing.

Not really a big revelation but it doesn't take much to make me happy. Thanks for this awesome plugin!

EDIT: Screeny
You do not have the required permissions to view the files attached to this post.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Kaelri »

That's actually really clever. Well done. :)
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Kaelri »

So I've gotten a request from a guy trying to use Rainmeter with a media player called Spider Player. It looks pretty easy; my only question is whether this is worth integrating with NowPlaying, or is best left to a traditional WebParser-based skin.

Spider offers an API for third-party apps in the form of a locally-hosted web interface (e.g. 192.168.0.102:7777/API/1/), which displays a very RegExp-friendly plaintext readout. Example:

Code: Select all

STATE=PLAYING
VOLUME=10000
MUTE=0
REPEAT=1
REPEAT_MODE=PLAYLIST
SHUFFLE=1
TITLE=Here Comes The Flood
ARTIST=Peter Gabriel
ALBUM=Growing Up Live
TRACK=1/18
GENRE=Rock
YEAR=2003
DURATION=358752
POSITION=2409
In addition, commands can be sent to the player via HTTP requests (e.g. server:port/API/1/PLAY, server:port/API/1/NEXT, server:port/API/1/SHUFFLE). This one's a little tricker to do with WebParser, but I think you could do it by having a MouseAction bang that activates the measure, thus sending the request, which then deactivates itself with a FinishAction.

One issue (of many, I'm sure) with baking this into NowPlaying is that we'd have to add syntax to supply the server address and port to the plugin. Given that Spider is not a major media player, and that all of this can be done with Rainmeter's existing utilities, I can see how it's not worth adding all the under-the-hood complexity. Nonetheless, I thought I should pass it along.
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: NowPlaying plugin - Multiple Media Player Support

Post by jsmorley »

I was helping that guy a bit more on IRC Kaelri, and worked this up for him to start with:

Get this addon, and put it in the same folder with the skin:
http://dl.dropbox.com/u/4991063/SendHTML.exe


Then use this skin to see how it works:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureSpider]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://192.168.1.101:7777/API/1/
RegExp="(?siU)STATE=(.*)\r\nVOLUME=(.*)\r\nMUTE=(.*)\r\nREPEAT=(.*)\r\nREPEAT_MODE=(.*)\r\nSHUFFLE=(.*)\r\nTITLE=(.*)\r\nARTIST=(.*)\r\nALBUM=(.*)\r\nTRACK=(.*)\r\nGENRE=(.*)\r\nYEAR=(.*)\r\nDURATION=(.*)\r\nPOSITION=(.*)\r\n"

[MeasureTitle]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureSpider]
StringIndex=7

[MeterTitle]
Meter=String
MeasureName=MeasureTitle
FontSize=12
FontColor=255,255,255,255
X=0
Y=2R

[MeterPlay]
Meter=String
FontSize=15
FontColor=255,255,255,255
SolidColor=0,0,0,1
X=0
Y=2R
Text=PLAY
LeftMouseUpAction=!Execute ["#CURRENTPATH#\SendHTML.exe" "http://192.168.1.101:7777/API/1/PLAY"]

[MeterPause]
Meter=String
FontSize=15
FontColor=255,255,255,255
SolidColor=0,0,0,1
X=0
Y=2R
Text=PAUSE
LeftMouseUpAction=!Execute ["#CURRENTPATH#\SendHTML.exe" "http://192.168.1.101:7777/API/1/PAUSE"]
Works fine, although I think you are right that a clever use of Enable and Disable on some WebParser measures might be a way to go that could eliminate the addon. (Although the addon is simply a very generic HTML "sender" and might be of use elsewhere too)

SendHTML.au3

Code: Select all

#NoTrayIcon

If $CmdLine[0] = 1 Then
	InetGet($CmdLine[1],"",1)
Else
	Exit
EndIf
feltuber
Posts: 4
Joined: June 17th, 2011, 3:36 pm

Re: Testing VLC support

Post by feltuber »

poiru wrote: Weird.. It works fine here. Gotta run now, but I'll take a look tomorrow. In the mean time, could you make sure you have the latest libcad_plugin.dll (download it again from the link a few posts back)?
First of all, I'm sorry for the response delay... I haven't manage to spend much time on the net, these days...
But, I've downloaded the latest libcad_plugin.dll and it still doesn't work :confused:
So, I've created a Pause button, splitting the functions of Play/Pause button, like this:

Code: Select all

[Play]
Meter=BUTTON
ButtonImage=Play.png
X=25r
Y=115
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer Play"]

[Pause]
Meter=BUTTON
ButtonImage=Pause.png
X=25r
Y=115
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer Pause"]
I know this is unnecessary code, so if you figure out what is wrong with the PlayPause function, I'll go back to the previous code.
Meanwhile, I'm going to stay with this working solution... :)

Thanks!
User avatar
AlC
Posts: 329
Joined: June 9th, 2011, 6:46 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by AlC »

First Spider Player is an excellent Music Player -> A lot of features, good sound, very low CPU ... and lyrircs too --> thank you pouri for lyrics support
I used it some years and only Rainmeter brought me to Winamp from Spider Player (because of the supporting )
... Spider is not a major media player ...
and Spider Player unfortunately won't be developed anymore by the developer since ca. 1 year ( Pro version is now free :) ). So is it worth for the future and the (difficult ?) work.

And Spider is similar to Winamp (Design,Construction ...). So I tried it with the Nowplaying plugin and Winamp as Playername (see Manual Other Players). It doesn't work.
Maybe because of this ??
What is when I installed Winamp, but use an Player that "based on" winamp , How do the plugin know to which player he send his bangs ??
Maybe change the Playername (at Other Players) from "Winamp" to "sWinamp" (similar to Winamp) or something else.
Rainmeter - You are only limited by your imagination and creativity.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by poiru »

feltuber wrote:I know this is unnecessary code, so if you figure out what is wrong with the PlayPause function, I'll go back to the previous code.
Meanwhile, I'm going to stay with this working solution... :)
I plan to make VLC support official for the next Rainmeter beta (Sunday) and this will (probably) be fixed by then.
AlC wrote:and Spider Player unfortunately won't be developed anymore by the developer since ca. 1 year ( Pro version is now free :) ). So is it worth for the future and the (difficult ?) work.
Yeah, I don't think I'll invest time into a dead player and/or a player with a hideous default skin. And I have enough players on by taskbar as is.. ;)
Image
AlC wrote:And Spider is similar to Winamp (Design,Construction ...). So I tried it with the Nowplaying plugin and Winamp as Playername (see Manual Other Players). It doesn't work.
Spider Player has not implemented the Winamp IPC interface.
AlC wrote:What is when I installed Winamp, but use an Player that "based on" winamp , How do the plugin know to which player he send his bangs ??
In simple terms, NowPlaying checks to see whether the Winamp interface is active (all players implementing the interface should have done so according to the standard specifications). So, when using PlayerName=Winamp, NowPlaying doesn't send bangs to a specific player but to the Winamp interface.
feltuber
Posts: 4
Joined: June 17th, 2011, 3:36 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by feltuber »

poiru wrote: I plan to make VLC support official for the next Rainmeter beta (Sunday) and this will (probably) be fixed by then.
Great news! Thanks :thumbup: