INTERACT FORUM
More => Old Versions => Media Jukebox => Topic started by: Saucepan on August 08, 2010, 09:55:04 am
-
I use RateYourMusic.com a lot, and wanted to build a link for quick access. I currently use one that was posted in an older thread which works pretty well, but I wanted to create something that is even more direct. It would basically eliminate a mouse click.
I just want to know if there is a way I can make spaces become underscores, and capital letters become lowercase.
For example:
I want to turn this
http://rateyourmusic.com/release/album/Down To Nothing/The Most/
into this
http://rateyourmusic.com/release/album/down_to_nothing/the_most/
This is what I have so far (don't laugh):
<Link version="1.1">
<Item Name="Name">RYM</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://rateyourmusic.com/release/album/</Item>
<Item Name="Search URL">http:////rateyourmusic.com//release//album//Hexify([Artist])//Hexify([Album])//</Item>
</Link>
-
You can use the Replace(...) and FixCase(...) functions.
More here:
http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language
Thanks.
-
FixCase made sense.
I'm having trouble with the Replace part.
(Thank you by the way)
-
Try:
Replace(insert value here, / , _)
The space needs to be escaped.
-
That worked.
But...
how to make FixCase and Replace exist/work together?
i.e.
http:////rateyourmusic.com//release//album//FixCase([Artist], 4), Replace([Artist], / , _)//FixCase([Album], 4), Replace([Album], / , _)//
What am I doing wrong here?
-
I think you need to put one inside the other:
FixCase(Replace(...))
-
Yes!
You rule.