INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: question for the Manage Links section (need help with building a link)  (Read 1942 times)

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73

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>
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: question for the Manage Links section (need help with building a link)
« Reply #1 on: August 08, 2010, 10:02:11 am »

You can use the Replace(...) and FixCase(...) functions.

More here:
http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language

Thanks.
Logged
Matt Ashland, JRiver Media Center

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73
Re: question for the Manage Links section (need help with building a link)
« Reply #2 on: August 08, 2010, 10:22:40 am »

FixCase made sense.

I'm having trouble with the Replace part.


(Thank you by the way)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: question for the Manage Links section (need help with building a link)
« Reply #3 on: August 08, 2010, 10:26:05 am »

Try:
Replace(insert value here, / , _)

The space needs to be escaped.
Logged
Matt Ashland, JRiver Media Center

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73
Re: question for the Manage Links section (need help with building a link)
« Reply #4 on: August 08, 2010, 10:34:17 am »

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?

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: question for the Manage Links section (need help with building a link)
« Reply #5 on: August 08, 2010, 10:52:52 am »

I think you need to put one inside the other:
FixCase(Replace(...))
Logged
Matt Ashland, JRiver Media Center

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73
Re: question for the Manage Links section (need help with building a link)
« Reply #6 on: August 08, 2010, 11:06:50 am »

Yes!

You rule.
Logged
Pages: [1]   Go Up