IPB

Welcome Guest ( Log In | Register )

126 Pages V  « < 120 121 122 123 124 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help.
BenB
post May 9 2014, 21:29
Post #3026





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



As you can see there's nothing particularly special about a file itself. Once you load a playlist file or stream url in foobar, creating an m-TAGS file simply saves the information in a text file. You can then edit this static information.

CODE
[
{
"@" : "http://50.7.77.114:8114/",
"GENRE" : "House",
"TITLE" : "EDM1.fm -- House Party",
"URL" : "EDM1.fm/HouseParty"
},
{
"@" : "http://50.7.77.114:8399/",
"GENRE" : "Progressive (Underground)",
"TITLE" : "EDM1.fm -- Progressions",
"URL" : "EDM1.fm/Progressions"
},
{
"@" : "http://50.7.77.114:8573/",
"GENRE" : "Vocal Trance, Progressive House",
"TITLE" : "EDM1.fm -- Sublime (Pure Vocal melodies)",
"URL" : "EDM1.fm/Sublime"
},
{
"@" : "http://50.7.77.114:8387/",
"GENRE" : "Tech House",
"TITLE" : "EDM1.fm -- **NEW** Tech House",
"URL" : "http://www.EDM1.fm/TechHouse"
},
{
"@" : "http://50.7.77.114:8540/",
"GENRE" : "Electro, Progressive House",
"TITLE" : "EDM1.fm -- The Drop",
"URL" : "EDM1.fm/The Drop"
},
{
"@" : "http://50.7.77.114:8408/",
"GENRE" : "Trance",
"TITLE" : "EDM1.fm -- Trancemitter",
"URL" : "EDM1.fm/Trancemitter"
},
{
"@" : "http://50.7.77.114:8418/stream",
"GENRE" : "Downtempo",
"TITLE" : "EDM1.fm Chillzone -- Chillout Classics",
"URL" : "http://edm1.fm/chilloutclassics"
}
]


If you open the Properties dialog and view the Properties tab for a playlist entry, you'll see, for example:
CODE
File name : EDM1.fm.tags
Folder name : C:\Users\~\Music\MTags
File path : C:\Users\~\Music\MTags\EDM1.fm.tags
Subsong index : 4
File size : 1.23 KB (1 263 bytes)
Last modified : 2014-05-09 14:47:33
Sample rate : 44100 Hz
Channels : 2
Bitrate : 256 kbps
Codec : MP3
Encoding : lossy
Added : 2014-05-09 14:41:55
<@> : http://50.7.77.114:8387/
<@REFERENCED_FILE> : http://50.7.77.114:8387/
<@REFERENCED_INDEX> : 0
<MP3_STEREO_MODE> : joint stereo
Go to the top of the page
+Quote Post
marc2003
post May 10 2014, 00:38
Post #3027





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



those streams you gave didn't appear to have dynamic titles?? anyway, i found something else to test with. try this....

https://dl.dropboxusercontent.com/u/2280132...temp/common7.js
Go to the top of the page
+Quote Post
BenB
post May 10 2014, 23:12
Post #3028





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



Hmm I don't know what was up with those streams when you tried them.

Anyhow the Thumbs script doesn't crash WSH Panel Mod now, but the automatic downloading only works maybe 20% of the time. Console only gives a 404 message. It does work if I manually trigger it.

The main issues I'm seeing are related to album info. That's expected since that is often not present in streams; however, I've tried some scripts (where possible) which grab the album info when it's in the title tag or in the URL, but nothing happens.
Go to the top of the page
+Quote Post
marc2003
post May 10 2014, 23:37
Post #3029





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



from the foo_tags thread...

QUOTE (luigimercurio @ Sep 4 2013, 18:39) *
Now m-TAGS merges its tags with the dynamic info. Please note that m-TAGS takes precedence, i.e. the dynamic tag is shown if the m-TAGS file does NOT contain that tag.


if you have title defined in your tags file, you can't access the dynamic title in the stream.
Go to the top of the page
+Quote Post
BenB
post May 11 2014, 01:41
Post #3030





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



That statement by the developer just doesn't mesh with my use of the component. I can see and manipulate dynamic titles and URLs for display purposes and for use in foo_audioscrobbler.

When I tried inputting my "album" scripts into your scripts, I got a message from the component they were too long lol or your script gave me a "Not Found", crashed or did nothing.

Any idea what the issue with the Thumbs script could be?

This post has been edited by BenB: May 11 2014, 01:53
Go to the top of the page
+Quote Post
marc2003
post May 11 2014, 02:31
Post #3031





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (BenB @ May 11 2014, 01:41) *
That statement by the developer just doesn't mesh with my use of the component.


well that conflicts with my own testing. for me, it behaves like the developer said it would.

admittedly i'm not using anything with dynamic album or title - just the artist. i tested this bbc radio stream...

http://bbc.co.uk/radio/listen/live/r2.asx

if i start with a blank WSH panel and add this bit of code to output the artist to the console every second.

CODE
window.SetInterval(function() {
    fb.trace(fb.TitleFormat("%artist%").Eval(true));
}, 1000);


it displays BBC when playback is stopped and BBC Radio 2 when the stream is playing.

when i create a tags file with the artist set to BBC test, that's all the console outputs.

CODE
[
   {
      "@" : "mms://wmlive-acl.bbc.co.uk/wms/bbc_ami/radio2/radio2_bb_live_ep1_sl0?BBC-UID=a5d3267e7c5e856658f4445661b55373b9b59192605021f414ffa4a6e3baa91a&SSO2-UID=|0",
      "ARTIST": "BBC test"
   }
]


it never changes to BBC Radio 2 when playing. as soon as i edit the tags file to remove the artist and reload the file in the playlist, it does then display the dynamic BBC Radio 2 title when playing. this is completely at odds with what you're saying. tongue.gif

as for the thumbs script, it doesn't support automatically downloading when the stream artist changes. i guess i should add something in the readme to clarify this.

QUOTE
I got a message from the component they were too long lol


hold shift and right click the panel>properties. you should be able to enter longer title formatting strings there. it's generally artist_tf for most scripts. the values in the allmusic script should be self explanatory if you're using that.

This post has been edited by marc2003: May 11 2014, 02:47
Go to the top of the page
+Quote Post
BenB
post May 11 2014, 04:48
Post #3032





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



Here's what I see in the Console with your code

using %artist% (No artist tags in my m-TAGS files)



using %title% (I do have title tags in my m-TAGS files)



using %url% (I do have url tags in my m-TAGS files)



Maybe we have different versions of the component?

This post has been edited by BenB: May 11 2014, 04:48
Go to the top of the page
+Quote Post
marc2003
post May 11 2014, 12:33
Post #3033





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (BenB @ May 11 2014, 04:48) *
Maybe we have different versions of the component?


perhaps?? i'm using 0.1

anyway, what started it all was this...

QUOTE (BenB)
The main issues I'm seeing are related to album info. That's expected since that is often not present in streams; however, I've tried some scripts (where possible) which grab the album info when it's in the title tag or in the URL, but nothing happens.


you're going to have to be more specific about what you're doing and what you're expecting to happen. what script, what custom title formatting are you using, what stream? what happens when you bypass foo_tags and play the stream directly?

This post has been edited by marc2003: May 11 2014, 12:39
Go to the top of the page
+Quote Post
oatmeal769
post May 11 2014, 17:09
Post #3034





Group: Members
Posts: 52
Joined: 14-June 09
From: Los Angeles
Member No.: 70677



Sorry to resurrect...

This is a great mod, Glad I found it!

I'm wondering if anyone knows how to show an image named "front.jpg" or "cover.jpg" which is located in the same folder as the "disc.png" image used for the spinning disc? The plain gray background is kinda boring, I thought it'd be cool to use the album front cover as the background.

Thanks!


QUOTE (ExtremeHunter @ Jan 24 2013, 12:24) *
Updated Spinning disc script here

Added: Display now playing disc first, if not available display default disc image.
(set source in Preferences/Display-Album art Disc)

Added: gradient background.
Added: disc mask. (now you can display non transparent disc images like jpg. just use correctly cropped images (edge to edge)).

screen-shot with jpg disc image


Go to the top of the page
+Quote Post
BenB
post May 12 2014, 03:50
Post #3035





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



QUOTE (marc2003 @ May 11 2014, 06:33) *
perhaps?? i'm using 0.1

I have a few versions and they're all 0.1 LMAO

Anyhow I think I know why I can access the info and you can't. Look at the properties of a station referenced by an m-TAGS file. If <@REFERENCED_FILE> is blank, your scripts cannot access the dynamic info (although foobar can). I'm fairly sure you can solve this by ticking "Only use absolute paths in references" in foo_tags' Advanced Preferences. (I also have "Ignore source tags" and "Replace existing files" ticked. I don't think they'd have any effect, but who knows?).

QUOTE (marc2003 @ May 11 2014, 06:33) *
you're going to have to be more specific about what you're doing and what you're expecting to happen. what script, what custom title formatting are you using, what stream? what happens when you bypass foo_tags and play the stream directly?

I've managed to get the Allmusic script working somewhat. I'll do some more testing before I bitch and whine at you some more tongue.gif

This post has been edited by BenB: May 12 2014, 03:56
Go to the top of the page
+Quote Post
marc2003
post May 12 2014, 14:58
Post #3036





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (BenB @ May 12 2014, 03:50) *
If <@REFERENCED_FILE> is blank, your scripts cannot access the dynamic info (although foobar can).


that's because i was checking the value of @REFERENCED_FILE to see if it was a stream. if it was missing, it was falling back to %path%. i've changed it to check the value of the @ field instead.

https://dl.dropboxusercontent.com/u/2280132...temp/common7.js

@oatmeal769, drawing one image over the top of the other and spinning results in pretty much unusable performance. it's not worth it.

This post has been edited by marc2003: May 12 2014, 15:04
Go to the top of the page
+Quote Post
BenB
post May 13 2014, 21:42
Post #3037





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



Thanks marc. It seems to be working better now, but I'm still having having some issues with the Allmusic album script. I've tried several scripts and this version of the part for grabbing the album info from the url seems to work best (although some seem to match but return nothing):

QUOTE
$if($and(%url%,$strstr(%url%,&album=),$not($strstr(%url%,&album=&))),
$replace($substr(%url%,$add($strstr(%url%,&album=),7),$sub($strstr(%url%,&duration),1)),
%%20, ,%%21,!,%%22,",%%23,#,%%24,$,%%25,%%,%%26,&,%%27,'',%%28,'(',%%29,')',%%2A,*,%%2B,+,%%2C,',',%%2D,-,%%2E,.,%%2F,/,%%3A,:,
%%3B,;,%%3C,<,%%3D,=,%%3E,>,%%3F,?,%%40,@,%%5B,'[',%%5C,\,%%5D,']',%%5E,^,%%5F,_,%%60,`,%%7B,{,%%7C,|,%%7D,},%%7E,~,%%A1,,%%A2,,%%A3,,%%A9,,
%%AA,,%%AE,,%%B0,,%%B2,,%%B3,,%%B4,,%%B9,,%%BA,,%%BF,,%%C0,,%%C1,,%%C2,,%%C3,,%%C4,,%%C5,,%%C6,,%%C7,,%%C8,,%%C9,,%%CA,,
%%CB,,%%CC,,%%CD,,%%CE,,%%CF,,%%D0,,%%D1,,%%D2,,%%D3,,%%D4,,%%D5,,%%D6,,%%D7,,%%D8,,%%D9,,%%DA,,%%DB,,%%DC,,%%DD,,%%DE,,
%%DF,,%%E0,,%%E1,,%%E2,,%%E3,,%%E4,,%%E5,,%%E6,,%%E7,,%%E8,,%%E9,,%%EA,,%%EB,,%%EC,,%%ED,,%%EE,,%%EF,,%%F0,,%%F1,,%%F2,,%%F3,,
%%F4,,%%F5,,%%F6,,%%F7,,%%F8,,%%F9,,%%FA,,%%FB,,%%FC,,%%FD,,%%FE,,%%FF,,),%album%)

However, I'm having an issue with double quotes (emphasized in red, above). It's inclusion breaks your script and my code. If I escape it with single quotes, it fixes that particular problem, but those single quotes also break the script/code. The only way to make it work is to remove the double quote character, but that potentially breaks the album matching. Any ideas on how I can fix it?

Also, how are the albums matched, and must they be exact matches or is there a little wiggle room?

This post has been edited by BenB: May 13 2014, 21:57
Go to the top of the page
+Quote Post
marc2003
post May 14 2014, 02:05
Post #3038





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



i tried re-creating your scenario and your code works fine. you did use the properties dialog and didn't try editing the script??



there is a javascript function i could use to get rid of that massive replace string that does it all for you called decodeURIComponent. if i add it, i'll let you know.

as for matching, it has to be pretty much exact. i use the $ascii title formatting function on the search term/results and also ignore &/and and make everything lower case.


This post has been edited by marc2003: May 14 2014, 02:08
Go to the top of the page
+Quote Post
BenB
post May 14 2014, 21:27
Post #3039





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



QUOTE (marc2003 @ May 13 2014, 20:05) *
i tried re-creating your scenario and your code works fine. you did use the properties dialog and didn't try editing the script??

I somehow introduced an error into the script at some point adding it in the properties dialog. I also added it to the script in the panel where the double quotes cause my code to break (which is where I got the idea it was also breaking your script).

QUOTE (marc2003 @ May 13 2014, 20:05) *
there is a javascript function i could use to get rid of that massive replace string that does it all for you called decodeURIComponent. if i add it, i'll let you know.

This would help as I think I will have to add another $replace() to clean up some of the junk in order to get more matches. That replace string is actually pared down to what I thought I could get away with. It was much bigger. I might be able to pare it down a little more.

QUOTE (marc2003 @ May 13 2014, 20:05) *
as for matching, it has to be pretty much exact. i use the $ascii title formatting function on the search term/results and also ignore &/and and make everything lower case.

I figured it was fairly tight because sometimes what appears to be matches return nothing. I've yet to find the cause in those instances.

Many times what's in the url for album is incorrect or incomplete. Album subtitles are either missing or are used in place of the album title dry.gif and a missing initial "The" and Allmusic's extraneous information in brackets/parentheses following the actual album title seems to be also preventing matches. I can see why most media players ignore the information. I'm about ready to give up and use it solely for display purposes because it's not really worth the aggravation of constantly tweaking it.

This post has been edited by BenB: May 14 2014, 21:29
Go to the top of the page
+Quote Post
marc2003
post May 15 2014, 00:50
Post #3040





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



i really can't be bothered to test this properly but you can try adding to the allmusic panel. just stick it at the end.

CODE
t.tidy = function(text) {
    return decodeURIComponent(fb.TitleFormat("$replace($lower($ascii(" + text + ")), & ,, and ,)").Eval(true));
}


then your own title format code can be simplified to only extract the album from the URL if present.

CODE
$if($and(%url%,$strstr(%url%,&album=),$not($strstr(%url%,&album=&))),$substr(%url%,$add($strstr(%url%,&album=),7),$sub($strstr(%url%,&duration),1)),%album%)


i just don't have the skills to make it better at matching. i expect something better is possible but i wouldn't know where to begin.

Go to the top of the page
+Quote Post
marc2003
post May 15 2014, 03:51
Post #3041





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



@BenB, ignore that function in the post above. it won't work. it doesn't do anything to the search term before it's sent. i'll have to think about it some more. tongue.gif
Go to the top of the page
+Quote Post
oatmeal769
post May 16 2014, 01:11
Post #3042





Group: Members
Posts: 52
Joined: 14-June 09
From: Los Angeles
Member No.: 70677



Anyone? It can't be too hard, but I'm a novice at writing this stuff, and don't want to mess it up.
Thanks!

QUOTE (oatmeal769 @ May 11 2014, 09:09) *
Sorry to resurrect...
This is a great mod, Glad I found it!

I'm wondering if anyone knows how to show an image named "front.jpg" or "cover.jpg" which is located in the same folder as the "disc.png" image used for the spinning disc? The plain gray background is kinda boring, I thought it'd be cool to use the album front cover as the background.

Thanks!


QUOTE (ExtremeHunter @ Jan 24 2013, 12:24) *
Updated Spinning disc script here

Added: Display now playing disc first, if not available display default disc image.
(set source in Preferences/Display-Album art Disc)

Added: gradient background.
Added: disc mask. (now you can display non transparent disc images like jpg. just use correctly cropped images (edge to edge)).

screen-shot with jpg disc image

[img]


Go to the top of the page
+Quote Post
marc2003
post May 16 2014, 03:03
Post #3043





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



i did answer your question but you must have missed it as it was bolted onto the end of one of my posts.

QUOTE (marc2003 @ May 12 2014, 14:58) *
@oatmeal769, drawing one image over the top of the other and spinning results in pretty much unusable performance. it's not worth it.
Go to the top of the page
+Quote Post
oatmeal769
post May 16 2014, 04:29
Post #3044





Group: Members
Posts: 52
Joined: 14-June 09
From: Los Angeles
Member No.: 70677



QUOTE (marc2003 @ May 15 2014, 19:03) *
i did answer your question but you must have missed it as it was bolted onto the end of one of my posts.
Yes, I did, sorry. Thank you though, at least I know.
Go to the top of the page
+Quote Post
BenB
post May 16 2014, 16:08
Post #3045





Group: Members
Posts: 746
Joined: 17-April 12
Member No.: 98921



QUOTE (marc2003 @ May 14 2014, 21:51) *
@BenB, ignore that function in the post above. it won't work. it doesn't do anything to the search term before it's sent. i'll have to think about it some more. tongue.gif

I saved it, but only got a chance to test it this morning. I should've read the forum first. Thanks for trying smile.gif

This post has been edited by BenB: May 16 2014, 16:12
Go to the top of the page
+Quote Post
oatmeal769
post May 16 2014, 17:38
Post #3046





Group: Members
Posts: 52
Joined: 14-June 09
From: Los Angeles
Member No.: 70677



Well, I figured out how to make the BG a solid black, which is better than the gray I suppose.
QUOTE (marc2003 @ May 15 2014, 19:03) *
i did answer your question but you must have missed it as it was bolted onto the end of one of my posts.

QUOTE (marc2003 @ May 12 2014, 14:58) *
@oatmeal769, drawing one image over the top of the other and spinning results in pretty much unusable performance. it's not worth it.


Go to the top of the page
+Quote Post
NokTham
post May 17 2014, 01:03
Post #3047





Group: Members
Posts: 27
Joined: 19-February 12
From: Portugal
Member No.: 97252



Hey marc2003 I've been getting this on the console

QUOTE
Last.fm & Wikipedia Biography: <html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.4.7</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->


dunno if it's a problem form my end or from something else
Go to the top of the page
+Quote Post
marc2003
post May 17 2014, 05:35
Post #3048





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



it's working fine for me at the moment so hopefully it was just a temporary glitch at the time you posted??
Go to the top of the page
+Quote Post
marc2003
post May 17 2014, 06:36
Post #3049





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (BenB @ May 16 2014, 16:08) *
QUOTE (marc2003 @ May 14 2014, 21:51) *
@BenB, ignore that function in the post above. it won't work. it doesn't do anything to the search term before it's sent. i'll have to think about it some more. tongue.gif

I saved it, but only got a chance to test it this morning. I should've read the forum first. Thanks for trying smile.gif


edit: i did post something but i need to test it first. dry.gif

This post has been edited by marc2003: May 17 2014, 06:44
Go to the top of the page
+Quote Post
marc2003
post May 17 2014, 08:27
Post #3050





Group: Members
Posts: 4468
Joined: 27-January 05
From: England
Member No.: 19379



@BenB, just right click your allmusic panel and Update script. make sure the script inside the panel is untouched (without that snippet i posted the other day). now you should be able to get rid of that super long $replace function.
Go to the top of the page
+Quote Post

126 Pages V  « < 120 121 122 123 124 > » 
Reply to this topicStart new topic
6 User(s) are reading this topic (5 Guests and 0 Anonymous Users)
1 Members: Solynth

 



RSS Lo-Fi Version Time is now: 20th September 2014 - 03:11