ok so i came across a problem with the itunes api sorting. Seems like its hit and miss if it actually sorts albums by most recent. for example:
https://itunes.apple.com/lookup?id=463123&entity=album&limit=5&sort=recent
shows Freak Show first which is from 1997 and Young Modern last from 2007. Any ideas?
ignore this. i changed the url to use the itunes rss feed. now it works perfectly. still can't figure out how to make it auto refresh tho
It is currently April 28th, 2024, 4:04 pm
help with webparser
-
- Posts: 72
- Joined: August 29th, 2013, 5:01 am
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: help with webparser
don't refresh.moshi wrote:read this at least twice until you understand it (you'll need it again):
i showed you how to pass [MeasureID] to [MeasureReleaseInfo]
use the same method to pass [MeasureArtist] to [MeasureID]
as this is not a webparser measure, use OnChangeAction instead of FinishAction. for initial lauch you might also want to use OnRefreshAction.
-
- Posts: 72
- Joined: August 29th, 2013, 5:01 am
Re: help with webparser
thanks so much! i got it figured out. I read that page a ton of times and walked away knowing what i wanted was possible but i couldn't quite figure it out. i didn't even know about onchangeaction! thanks again for being patient with my learning curve!
-
- Posts: 72
- Joined: August 29th, 2013, 5:01 am
Re: help with webparser
If you could help me out with one last problem it would be super appreciated!
...The only problem I am coming across is when there is an artist not found on itunes, the album art isn't changing to what I have as it's substitute image. If I refresh the skin however, it shows up. My substitutes for album title and release date work fine. just not the artwork one. I tried adding [!updateMeasure MeasureArt], !redraw, !update, dynamicvariables... everything I could think of.
...The only problem I am coming across is when there is an artist not found on itunes, the album art isn't changing to what I have as it's substitute image. If I refresh the skin however, it shows up. My substitutes for album title and release date work fine. just not the artwork one. I tried adding [!updateMeasure MeasureArt], !redraw, !update, dynamicvariables... everything I could think of.
Code: Select all
;--- WEB PARSING ---:
[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying
PlayerName=itunes
PlayerType=ARTIST
OnChangeAction=[!SetOption MeasureID Url "https://itunes.apple.com/search?term=[MeasureArtist]&limit=5" "#CURRENTCONFIG#"][!EnableMeasure MeasureID][!CommandMeasure MeasureID Update][!UpdateMeasure MeasureID]
[MeasureID]
Measure=Plugin
Plugin=WebParser
URL=""
RegExp=(?siU)"artistId":(.*),
UpdateDivider=-1
Disabled=1
DynamicVariables=1
FinishAction=[!SetOption MeasureReleaseInfo Url "https://itunes.apple.com/WebObjects/MZStore.woa/wpa/MRSS/newreleases/limit=5/artistid=[MeasureArtistID]/explicit=true/rss.xml" "#CURRENTCONFIG#"][!EnableMeasure MeasureReleaseInfo][!CommandMeasure MeasureReleaseInfo Update][!UpdateMeasure MeasureReleaseInfo]
[MeasureReleaseInfo]
Measure=Plugin
Plugin=WebParser
URL=""
RegExp=(?siU)<itms:album>(.*)</itms:album>.*<itms:albumLink>(.*)</itms:albumLink>.*<itms:coverArt height="100" width="100">(.*)</itms:coverArt>.*<itms:releasedate>(.*)</itms:releasedate>
UpdateDivider=-1
Disabled=1
DynamicVariables=1
;--- MEASURES ---:
[MeasureArtistID]
Measure=Plugin
Plugin=WebParser
URL=[MeasureID]
StringIndex=1
[MeasureAlbum]
Measure=Plugin
Plugin=WebParser
URL=[MeasureReleaseInfo]
StringIndex=1
DecodeCharacterReference=1
substitute="":"Info Not Available"
[MeasureLink]
Measure=Plugin
Plugin=Webparser
URL=[MeasureReleaseInfo]
StringIndex=2
[MeasureArt]
Measure=Plugin
Plugin=Webparser
URL=[MeasureReleaseInfo]
StringIndex=3
Download=1
Substitute="":"#@#Images\default.png"
[MeasureDate]
Measure=Plugin
Plugin=WebParser
URL=[MeasureReleaseInfo]
StringIndex=4
substitute="":"Info Not Available"
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: help with webparser
Code: Select all
[MeasureReleaseInfo]
Measure=Plugin
Plugin=WebParser
URL=""
RegExp=(?siU)<itms:album>(.*)</itms:album>.*<itms:albumLink>(.*)</itms:albumLink>.*<itms:coverArt height="100" width="100">(.*)</itms:coverArt>.*<itms:releasedate>(.*)</itms:releasedate>
UpdateDivider=-1
Disabled=1
DynamicVariables=1
FinishAction=[!SetOption MeasureArt Url "[MeasureArtPre]" "#CURRENTCONFIG#"][!EnableMeasure MeasureArt][!CommandMeasure MeasureArt Update][!UpdateMeasure MeasureArt]
....
[MeasureArtPre]
Measure=Plugin
Plugin=Webparser
URL=[MeasureReleaseInfo]
StringIndex=3
RegExpSubstitute=1
Substitute="^$":"file://#@#Images/default.png"
[MeasureArt]
Measure=Plugin
Plugin=WebParser
URL=""
UpdateDivider=-1
Disabled=1
DynamicVariables=1
StringIndex=1
Download=1
-
- Posts: 72
- Joined: August 29th, 2013, 5:01 am
Re: help with webparser
You sir are a rainmeter genius. Thanks again!