It is currently June 2nd, 2024, 6:37 am

NowPlaying plugin - Multiple Media Player Support

Share and get help with Plugins and Addons
Fujiwara92
Posts: 9
Joined: January 26th, 2012, 12:12 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Fujiwara92 »

Hi, I have made a webradio skin and I want to be able to see the Artist - Title text but I can't seem to do that on that station. When I try on a different station like SKyFMHits It works perfectly. Any ideas or is it the station that isn't supported?
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by poiru »

awem wrote:Greetings, does anyone know a way to check whether a field like artist or title is empty, so the script doesn't display the background for the field? I have a lot of audio files without ID tags, and I hate when the entire player interface pops up even though there's no info to be displayed.
What do you mean by "background for the field"? The whole skin or just one part of it?
Fujiwara92 wrote:Hi, I have made a webradio skin and I want to be able to see the Artist - Title text but I can't seem to do that on that station. When I try on a different station like SKyFMHits It works perfectly. Any ideas or is it the station that isn't supported?
What player and what station?
Fujiwara92
Posts: 9
Joined: January 26th, 2012, 12:12 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Fujiwara92 »

I use VLC as the player and the station is a swedish station ( http://www.bandit.se/ ) and I got the link that I use in the .pls file from here: http://www.screamer-radio.com/directory/show/station/185/
User avatar
jsmorley
Developer
Posts: 22636
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: NowPlaying plugin - Multiple Media Player Support

Post by jsmorley »

Fujiwara92 wrote:I use VLC as the player and the station is a swedish station ( http://www.bandit.se/ ) and I got the link that I use in the .pls file from here: http://www.screamer-radio.com/directory/show/station/185/
While using:

[playlist]
numberofentries=1
File1=http://mtg-wms.bahnhof.net/banditsthlm?MSWMExt=.asf
Title1=Bandit Rock 106.3
Length1=-1

As a .pls file for this station works just fine, it does not seem to return the Artist - Song information as ShoutCast stations do. Not sure there is any way to fix this.
Fujiwara92
Posts: 9
Joined: January 26th, 2012, 12:12 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Fujiwara92 »

Allright, but is it possible to take the Artist - Title info directly from the site or webradio?
User avatar
jsmorley
Developer
Posts: 22636
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: NowPlaying plugin - Multiple Media Player Support

Post by jsmorley »

Fujiwara92 wrote:Allright, but is it possible to take the Artist - Title info directly from the site or webradio?
No.
Fujiwara92
Posts: 9
Joined: January 26th, 2012, 12:12 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Fujiwara92 »

Ok, guess I'll have to do without it, but thanks anyway =)
Nooby4Ever
Posts: 29
Joined: December 22nd, 2009, 2:49 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by Nooby4Ever »

Is it possible to disable the measures that uses NowPlaying plugin, since i'm not able to disable mine

Code: Select all

Player=WMP
[mDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=POSITION
UpdateDivider=1
Group=Measures
Nor adding Disabled=1 or do it with a bang [!DisableMeasure mDuration] (called at LeftMouseDownAction on another meter) has anny effect.
Sorry if this has been asked befor didn't read all 50 pages
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by poiru »

Nooby4Ever wrote:Is it possible to disable the measures that uses NowPlaying plugin, since i'm not able to disable mine
It is possible and your code does indeed disable the measure. However, some Rainmeter measures have two values -- a string value and a numerical value.

In the case of the NowPlaying duration measure, the string value may be "00:55" while the numerical value is 55. When disabled, the string value will continue to be "00:55", but the numerical value will be 0.

You can check this with a Calc measure (note: your measure name is mDuration, but you use PlayerType=POSITION -- I've used mPosition below):

Code: Select all

[mPositionNumber]
Measure=Calc
Formula=mPosition
Why do you need to disable the measure? There may be other ways to do what you want.. :)
User avatar
awem
Posts: 2
Joined: January 24th, 2012, 11:44 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by awem »

poiru wrote: What do you mean by "background for the field"? The whole skin or just one part of it?
The issue isn't with hiding the skin but with knowing when to do so. As far as I know, the plugin provides no way to check if the ID tags are empty. Anyway, I've solved the problem.
For anyone interested, I've made this rather crude lua script that checks if a measure's value is empty:

Code: Select all

PROPERTIES = {
   MeasureID = "";
}

function Initialize()
   Measure1 = SKIN:GetMeasure(PROPERTIES.MeasureID)
end

function Update()
   MeasureValue = Measure1:GetStringValue()
   if MeasureValue == "" then return 1 else return 0 end
end
Example usage:

Code: Select all

[MeasureFade]
Measure=Script
ScriptFile="#CURRENTPATH#checkmeasure.lua"
MeasureID=MeasurePlayer
IfEqualValue=0
IfEqualAction=!showfade
IfAboveValue=0
IfAboveAction=!hidefade