INTERACT FORUM

Please login or register.

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

Author Topic: • MrC's Tip of the Week 2013.36: Links  (Read 62493 times)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
• MrC's Tip of the Week 2013.36: Links
« on: September 06, 2013, 05:31:11 pm »

This week's tip shows how to get a little more leverage from Media Center's Links feature.  Links are those click-able words to the right of your view tabs:



Links are also available by right-clicking one or more media files and selecting Links.

Links operate on the selected media, and when clicked, open an internal or external browser to the site specified in the Link's definition.  The link is defined using the Media Center expression language, which of course has access to a media file's metadata, and this metadata can help guide the query for more advanced linking.

Let's take a look at a simple link - the stock AMG link:



The Search URL defines the rule used to construct a URL that should open a browser page at the correct location for the selected media.  The Link for AMG uses the rule:

   http:////www.allmusic.com//search//artist//Hexify([Search])

This is a basic AllMusic search URL, with a couple of expression language modifications:

   - forward slashes must be escaped by doubling them (because they are special in expressions)
   - part of the URL's path is constructed dynamically based on the expression Hexify([Search])

[Search] is a special, internal Media Center field whose value is generated dynamically for Links.  It is filled with the appropriate field value needed for a particular Media Type query (e.g. Artist for Audio, Name for Video).  And Hexify() ensures that stuff is safe to embed as part of a URL.

Alternatively, you might want to search using a different criteria, such as by Album name:

   http:////www.allmusic.com//search//albums//Hexify([album])

For many Links, the defaults work acceptably.  But there are some cases where simple artist or album searching will never produce reliable results (classical music, for example).  I decided to handle such cases by helping Media Center a bit.  I created a custom field, called AMG URL, and whenever necessary, I simply fill it with the correct AMG album URL:



By modifying the Search URL for AMG, this URL can now be used instead of the stock AMG search rule, but the stock rule is used as a fallback:

   if(!isempty([AMG URL]), [AMG URL], http:////www.allmusic.com//search//artist//Hexify([Search]))

For those of you using MC19, the new FirstNotEmpty() function makes the expression trivially simple:

   FirstNotEmpty([AMG URL], http:////www.allmusic.com//search//artist//Hexify([Search]))

Incidentally, the AMG URL is used for other purposes.

The Search URL expressions can be much richer, and use other fields such as Genre or Media Type, to dynamically construct a URL for your personal needs.  You might, for example, want one multi-tasking Link which for audio goes to Allmusic for all but classical music, and goes to the IMSLP whenever the genre is classical and there is a value in the composer field, or for video goes to IMDB for movies and TheTVdb for TV shows.  Or limit your Google Images searches to only cover art that is 500x500.  Remember to configure the Edit Search... area in the Link:



The link is shown only when there are files in the view that match the search criteria defined here.  This allows a link to be hidden when it isn't relevant.

Use your imagination and see what you can come up with, and share your results here.

Have a good week!

[ Go read last week's Tip ]

Logged
The opinions I express represent my own folly.

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #1 on: September 06, 2013, 06:27:27 pm »

Thanks for the tips. I should probably check over these again, but here are the custom searches I've been using for music; Discogs, Wikipedia, and for finding Album Art:

Code: (Discogs) [Select]
<Link version="1.2">
<Item Name="Name">Discogs</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.discogs.com/search?</Item>
<Item Name="Search URL">http:////www.discogs.com//search?if(!isempty([Catalog #]),&amp;catno=Hexify([Catalog #])&amp;artist=Hexify([Album Artist (auto)]),if(isequal([Genre],soundtrack,8),q=Hexify([Album] Soundtrack),if(isequal([Album Artist (auto)],Artists,7),,&amp;artist=Hexify([Album Artist (auto)]))&amp;title=Hexify(removecharacters([Album],/)/(“”‘’‒ʼ!,0))))</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>
This is a search which uses my custom [Catalog #] tag. If an album has this, it gets used in the lookup, and should take you directly to the correct version of that album. Otherwise, it should do a decent job of taking you to the right search results to find which version of an album it is that you have. (if you don't have the disc handy, or if it's still ambiguous)

Code: (Wikipedia) [Select]
<Link version="1.2">
<Item Name="Name">Wikipedia</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://en.wikipedia.org/w/index.php?search=</Item>
<Item Name="Search URL">https:////en.wikipedia.org//w//index.php?search=Hexify(removecharacters([Album],/)/(“”‘’‒ʼ,0)if(isequal([Genre],soundtrack,8),/ /(soundtrack/),))</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>
I found that the default Wikipedia search didn't always give me the best results for soundtracks, so this search did a better job of working on everything.

Code: (Album Art) [Select]
<Link version="1.2">
<Item Name="Name">Cover Art</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.google.com</Item>
<Item Name="Search URL">https:////www.google.com//search?as_st=y&amp;tbm=isch&amp;as_q=Hexify([Album Artist (auto)] [Album])&amp;safe=images&amp;tbs=isz:lt,islt:2mp,iar:s,imgo:1&amp;biw=1920&amp;bih=984</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>
I like to grab the highest quality artwork I can, rather than the compressed artwork that the built in tool finds—this usually works well.

I don't suppose you know if it's possible to have one "link" open multiple pages in your browser? The album art one looks for the largest images first, but I often have to reduce the size option on the page to find suitable art. (at the larger sizes, sometimes it's pulling in photographs) It would be nice if I could click one link and have it open two or three sizes at once.


And for films:

Code: (IMDB) [Select]
http:////www.imdb.com//find?s=tt&q=Hexify([Search])
Code: (Rotten Tomatoes) [Select]
http:////www.rottentomatoes.com//search//full_search.php?search=Hexify([Search])
Code: (Poster Art) [Select]
<Link version="1.2">
<Item Name="Name">Poster Art</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.google.com</Item>
<Item Name="Search URL">https:////www.google.com//search?as_st=y&amp;tbm=isch&amp;as_q=Hexify([Name])&amp;safe=images&amp;tbs=isz:lt,islt:2mp,iar:t,imgo:1&amp;biw=1920&amp;bih=984</Item>
<Item Name="Filter">[Media Sub Type]=[Movie]</Item>
</Link>

Apologies if any of those were the defaults - I think I added or changed them all, but it was months ago that I last looked at this.
Edit: I suspect the IMDB and RT ones might be. If anyone can confirm, I will remove them.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #2 on: September 06, 2013, 08:56:05 pm »

Nice contributions.

As far as opening multiple links, I don't know how that might be done with the Links manager, since it dispatches internally, and only passes a single URL string.  I imagine you'd need a proxy to demux this mux'ed URL and open the individual components.

However, you can do this with Send To > Send (to external) by added a new External Program definition, such as:

   Name: Open in Firefox
   Program Path: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
   Parameters: "www.google.com" "www.jriver.com" "www.imdb.com"

Simple expressions there seem to work, but I haven't thoroughly tested out support in this area.
Logged
The opinions I express represent my own folly.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #3 on: September 07, 2013, 03:44:23 am »

One of the things that always seems to get overlooked when talking about links is the ease of sharing via the 'copy to clipboard' button. You hit that. then come here and paste inside code tags...

Search music video on uTube...
Code: [Select]
<Link version="1.2">
<Item Name="Name">Music Video</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.youtube.com</Item>
<Item Name="Search URL">http:////www.youtube.com//results?search_type=&amp;search_query=Hexify([Artist]+[Name])</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>
Then everyone else copies the stuff inside the code post, goes to their link managers, and hits the 'paste' button. Job done.

Often, when people are looking to learn a little, or perhaps looking for some inspiration, there is frustration at the lack of 'smartlist sharing threads' and such like. They've been tried before and there are many good reasons why they don't really work. Link sharing on the other hand, has, imvho, a lot more potential.

Here's some more to try out...

Artist lookup on AMG...
Code: [Select]
<Link version="1.2">
<Item Name="Name">Artist on AMG</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.allmusic.com</Item>
<Item Name="Search URL">http:////www.allmusic.com//search//artist//Replace([artist],/ ,+)</Item>
<Item Name="Filter">[media type]=[audio]</Item>
</Link>

Album lookup on AMG...
Code: [Select]
<Link version="1.2">
<Item Name="Name">Album on AMG</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.allmusic.com</Item>
<Item Name="Search URL">http:////www.allmusic.com//search//album//Replace([album],/ ,+)</Item>
<Item Name="Filter">[media type]=[audio]</Item>
</Link>

Track lookup on AMG...
Code: [Select]
<Link version="1.2">
<Item Name="Name">Track on AMG</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.allmusic.com</Item>
<Item Name="Search URL">http:////www.allmusic.com//search//song//Replace([name],/ ,+)</Item>
<Item Name="Filter">[media type]=[audio]</Item>
</Link>

Lyrics lookup on Absolute Lyrics...
Code: [Select]
<Link version="1.2">
<Item Name="Name">Lyrics</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.absolutelyrics.com</Item>
<Item Name="Search URL">http:////www.absolutelyrics.com//lyrics//view//replace([artist],/ ,_)//replace([name],/ ,_)</Item>
<Item Name="Filter">[Media Type]=[Audio],[Video]</Item>
</Link>

-marko

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #4 on: September 07, 2013, 10:22:05 am »

Cool! Thanks guys.

Here's another one.
Code: [Select]
<Link version="1,2">
<Item Name="Name">DR Database</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://dr.loudness-war.info/index.php?</Item>
<Item Name="Search URL">http:////dr.loudness-war.info//index.php?search_artist=[artist]&amp;search_album=[album]</Item>
<Item Name="Filter"/>
</Link>
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #5 on: September 07, 2013, 10:46:59 am »

Cool! Thanks guys.

Here's another one.
Ah, I had been meaning to set something up for the Dynamic Range database, but never got around to it. Now that Media Center measures these values during analysis, there's a good reason to have it. Thanks!
Logged

Dirhael

  • World Citizen
  • ***
  • Posts: 177
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #6 on: September 07, 2013, 11:10:30 am »

Here's one that I'm using. It'll open the Spotify app and search for the currently selected artist:
Code: [Select]
<Link version="1,2">
<Item Name="Name">Spotify</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.spotify.com</Item>
<Item Name="Search URL">spotify:////search:artist:Replace([Artist],/ ,+)</Item>
<Item Name="Filter">([Media Sub Type]=[Music Video] or [Media Type]=[Audio])</Item>
</Link>
Logged
:: My J​RMC history :: 13>14>15> 16>17>18>19>20>21>23>24>25>26>27>28>29>30>31

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #7 on: September 07, 2013, 11:34:22 am »

Ah, I had been meaning to set something up for the Dynamic Range database, but never got around to it. Now that Media Center measures these values during analysis, there's a good reason to have it. Thanks!

There's a downside too ... it costs money because you need to order new CD's which you already own  :P.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #8 on: September 07, 2013, 12:02:19 pm »

This is exactly the type of input I was looking for.  Keep the sharing alive...
Logged
The opinions I express represent my own folly.

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #9 on: September 07, 2013, 12:47:14 pm »

There's a downside too ... it costs money because you need to order new CD's which you already own  :P.
Not always... sometimes it makes you wish you had not spent the money on a new version of an album already. :P

Code: (1989 CD) [Select]
Dynamic Range (DR) Dynamic Range (R128)
11 4.3 LU
13 5.1 LU
12 4.2 LU
13 5.3 LU
13 3.9 LU
14 8.3 LU
14 3.3 LU
13 5.9 LU
14 2.6 LU
12 12.0 LU
   
Code: (2012 SACD) [Select]
Dynamic Range (DR) Dynamic Range (R128)
7 4.4 LU
7 4.3 LU
7 4.6 LU
7 4.7 LU
7 4.2 LU
8 6.8 LU
8 3.4 LU
7 5.1 LU
10 2.4 LU
7 11.6 LU

And other times you realize that the "high res" release is just the CD, upsampled.

But yes, sometime it is worth seeking out another version of a CD that you own.
And now that you've had me comparing the dynamic range value of my albums, it's interesting to see a strong correlation between dynamic range, and how much I like a particular album from an artist.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #10 on: September 07, 2013, 12:54:41 pm »

Exactly. A week or two ago I found there was a more recent release from Philip Glass, Songs from Liquid Days, 2003 on Sony Classical. Most of the times remasters are actually worse but I had hopes Sony Classical had done a better job. Turned out the CD was exactly the same as the original release I already had. Well I got a discount on Glassworks which I didn't have yet so it wasn't a complete waste of my money :P.

I decided I'm not buying stuff on a whim anymore. Too often they are worse or as in this case, turn out the be the same. Trouble is with more exotic stuff like this there are no downloads to try. They weren't even in the DR database so I took a gamble.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #11 on: September 07, 2013, 12:56:21 pm »

New thread boys, new thread. :-)
Logged
The opinions I express represent my own folly.

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #12 on: September 07, 2013, 06:41:57 pm »

Thanks everyone for posting these. MrC these threads are really really useful. I think I've bookmarked everyone of them so far.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #13 on: September 07, 2013, 07:35:01 pm »

Thanks.

Here's another way to find the Tip of the Week.
Logged
The opinions I express represent my own folly.

magnust

  • Galactic Citizen
  • ****
  • Posts: 380
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #14 on: October 09, 2013, 08:47:34 am »

Two I use a lot:



Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #15 on: October 10, 2013, 03:48:00 am »

Anybody have a working Google Images lookup that works with MC's grabbing functionality?  Mine is broken again  :'(
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #16 on: October 12, 2013, 11:09:56 pm »

Anybody have a working Google Images lookup that works with MC's grabbing functionality?  Mine is broken again  :'(

same here.  hope we can get that back.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #17 on: April 05, 2014, 08:41:33 pm »

Here's how to create links to the file system:

    http://yabb.jriver.com/interact/index.php?topic=88542.msg607280#msg607280
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #18 on: April 06, 2014, 12:58:28 am »

Here's some cool video related ones I made tonight...  These are posted using the same instructions Marko suggested above.

Epguides.com Series Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">epguides</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.google.com</Item>
<Item Name="Search URL">https:////www.google.com//search?btnI=1&amp;q=allintitle%3A+Hexify([Series])+site%3Aepguides.com</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

Epguides is awesome to look up original air dates, and to see when new episodes are airing.

Episode-Specific Google Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">Google</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.google.com</Item>
<Item Name="Search URL">http:////www.google.com//search?q=Hexify([Series] TVInfo(SeasonEpisode))</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

For the above, just filter [Media Sub Type]=[TV Show] out of the default, or any other basic Google searches you've added.  This will search for a particular episode on Google, which often gives decent results.

IMDb Series Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">IMDB</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.imdb.com</Item>
<Item Name="Search URL">http:////www.imdb.com//find?s=tt&amp;q=Hexify([Series] - [Name])</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

I tried a few permutations using [Series] and [Episode] numbers in various configurations for the above, but [Series] - [Name] seemed to work the best.

IMDb Fancy Movie Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">IMDB</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.imdb.com</Item>
<Item Name="Search URL">http:////www.imdb.com//find?s=tt&amp;q=Hexify(If(!IsEmpty([IMDb ID,0]), [IMDb ID],[Search]))</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[Movie]</Item>
</Link>

The above uses the [IMDb ID] field if it contains a value, and otherwise does the normal MC search in IMDB.  This is better than the default for movies that contain the proper IMDb ID because it can find them directly, even if multiple movies have the same name.

TheTVDB Fancy Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">TheTVDB</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://thetvdb.com</Item>
<Item Name="Search URL">http:////thetvdb.com//If(!IsEmpty([TheTVDB Series ID]),?tab=series&amp;id=Hexify([TheTVDB Series ID]),index.php?seriesname=Hexify([Series])&amp;fieldlocation=2&amp;language=7&amp;genre=&amp;year=&amp;network=&amp;zap2it_id=&amp;tvcom_id=&amp;imdb_id=&amp;order=translation&amp;addedBy=&amp;searching=Search&amp;tab=advancedsearch)</Item>
<Item Name="Filter">[Media Type]=[TV],[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

The above looks it up by TVDB Series ID, if one exists, and otherwise uses the Advanced Search to look for the Series.  This one does specify English, though, so you'll need to tweak the language=7 bit if you don't want English results.

Wikipedia TV Series Lookup:
Code: [Select]
<Link version="1.2">
<Item Name="Name">Wikipedia</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.google.com</Item>
<Item Name="Search URL">https:////www.google.com//search?btnI=1&amp;q=site%3Aen.wikipedia.org&amp;q=Hexify([Series] tv)</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

Notice that I used a Google "Lucky" search to jump to the proper Wikipedia article.  Google's search is often easier to use than Wikipedia's, because TV Shows are tagged in various styles.  This should usually result in an I'm Feeling Lucky search, but Google doesn't love those, and sometimes ignores the flag depending on the search itself.

PS. Thanks.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #19 on: April 06, 2014, 01:45:28 am »

And, here's another couple for you HBO Subscribers like me...

HBOGo Movie Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">HBOGo</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.hbogo.com</Item>
<Item Name="Search URL">http:////www.hbogo.com//#search&amp;browseMode=browseGrid?searchTerm=Hexify(Clean(RemoveCharacters([Name], -:;,)))//</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[Movie]</Item>
</Link>

HBOGo Series Search:
Code: [Select]
<Link version="1.2">
<Item Name="Name">HBOGo</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.hbogo.com</Item>
<Item Name="Search URL">http:////www.hbogo.com//#search&amp;browseMode=browseGrid?searchTerm=Hexify([Series])//</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[TV Show] [Channel]=[HBO]</Item>
</Link>

For the above, I've added a custom field to MC where I can tag individual Series with what "channel" (HBO in this case) aired the series.  This is added as a Series-Relational Field, so you only need to tag a single episode of a given [Series] with a value to have it apply automatically to all other files of the same Series.  Like so:


Click to embiggen.


That way, the first time I import any show that is a "HBO Show" (and so available on HBOGO), I just have to tag one of them with [Channel]=[HBO].  Then, because the Link has this in the search, it only shows up for Series that might actually be available on HBOGo.  Works pretty darn well, actually.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #20 on: April 06, 2014, 02:00:28 pm »

A few more handy ones:

Amazon Instant Video Search (TV):
Code: [Select]
<Link version="1.2">
<Item Name="Name">Amazon</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.amazon.com</Item>
<Item Name="Search URL">https:////www.amazon.com//s//?url=search-alias%3Dinstant-video&amp;field-keywords=Hexify([Series])</Item>
<Item Name="Filter">[Media Type]=[TV],[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

Amazon Instant Video Search (Movies):
Code: [Select]
<Link version="1.2">
<Item Name="Name">Amazon</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.amazon.com</Item>
<Item Name="Search URL">https:////www.amazon.com//s//?url=search-alias%3Dinstant-video&amp;field-keywords=Hexify(Clean(RemoveCharacters([Name], -:;,)))</Item>
<Item Name="Filter">[Media Type]=[TV],[Video] [Media Sub Type]=[Movie]</Item>
</Link>

I tried to do the same for iTunes, but their Search API is powerful, but a bit of a pain.  To really do it right, you'd have to parse the responses (which, with the real API come back JSON encoded) and extract the URL that you want to actually visit.  I can't figure out a way to have it actually take you to one of the returned pages instead of giving you the JSON.  Their system is essentially a "search for a URL" system, intended to be used programmatically, not a direct URL searching system.

You could do it, I think, if you wrote JavaScript (or some other script) that sent the search and then parsed the response from iTunes, and then loaded the appropriate URL returned for the type of search you want to do, but this would be a big pain and isn't worth it for my uses.  I just thought it might be convenient to link to shows/music if I discover that I'm missing an episode or whatever.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #21 on: May 14, 2015, 08:31:05 pm »

The Rotten Tomatoes link no longer seems to work. They must have changed the search URL at some time, and I can't work out what it should be now.

Anybody know, or can work it out?

I currently have the default, as below.

Code: [Select]
<Link version="1.2">
<Item Name="Name">Rotten Tomatoes</Item>
<Item Name="Action">0</Item>
<Item Name="Base URL">http://www.rottentomatoes.com</Item>
<Item Name="Search URL">http:////www.rottentomatoes.com//search//full_search.php?search=Hexify([Search])</Item>
<Item Name="Filter">[Media Type]=[Video]</Item>
</Link>
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #22 on: May 15, 2015, 12:19:46 am »

Not sure if mine is default or not, but it seems to work still...

Rotten Tomatoes
Code: [Select]
<Link version="1.2">
<Item Name="Name">Rotten Tomatoes</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.rottentomatoes.com</Item>
<Item Name="Search URL">http:////www.rottentomatoes.com//search//?search=Hexify([Search])&amp;sitesearch=rt</Item>
<Item Name="Filter">[Media Sub Type]=[Movie]</Item>
</Link>

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #23 on: May 15, 2015, 12:46:11 am »

Thanks Marko. That version works for me.

I've never edited the links before, so I assume mine was the default, or at least the default at some time. I should have tried creating a new library to see what the current defaults are. Next time I'll try that.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #24 on: May 15, 2015, 01:04:57 am »

I had something else which also didn't work (I don't use the Rotten Tomatoes one much), but marko's thing fixed it for me.

I figure since marko helped me, I'll help others.  I have some simple, but decent YouTube links. I have four separate YouTube links, in this order:

1. YouTube (Artist)
Link Info:
Code: [Select]
<Link version="1.2">
<Item Name="Name">YouTube (Artist)</Item>
<Item Name="Action">0</Item>
<Item Name="Base URL">http://www.youtube.com</Item>
<Item Name="Search URL">http:////www.youtube.com//results?search_query=Hexify([Artist])</Item>
<Item Name="Filter">[Media Type]=[Audio],[Video] [Media Sub Type]=[Music],[Music Video],[]</Item>
</Link>

2. YouTube (Track)
Link Info:
Code: [Select]
<Link version="1.2">
<Item Name="Name">YouTube (Track)</Item>
<Item Name="Action">0</Item>
<Item Name="Base URL">http://www.youtube.com</Item>
<Item Name="Search URL">http:////www.youtube.com//results?search_query=Hexify([Artist] [Name])</Item>
<Item Name="Filter">[Media Type]=[Audio],[Video] [Media Sub Type]=[Music],[Music Video],[]</Item>
</Link>

3. YouTube
Code: [Select]
<Link version="1.2">
<Item Name="Name">YouTube</Item>
<Item Name="Action">0</Item>
<Item Name="Base URL">http://www.youtube.com</Item>
<Item Name="Search URL">http:////www.youtube.com//results?search_query=Hexify([Name] trailer)</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[Movie]</Item>
</Link>

4. YouTube
Code: [Select]
<Link version="1.2">
<Item Name="Name">YouTube</Item>
<Item Name="Action">0</Item>
<Item Name="Base URL">http://www.youtube.com</Item>
<Item Name="Search URL">http:////www.youtube.com//results?search_query=Hexify([Series] [Name])</Item>
<Item Name="Filter">[Media Type]=[Video] [Media Sub Type]=[TV Show]</Item>
</Link>

EDIT: Realized the search is part of the Link Info copyblock. Oops. Forgot.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #25 on: May 15, 2015, 01:23:56 am »

Oh yeah, and I like this one better for lyrics (uses Songmeanings.com):
Code: [Select]
<Link version="1.2">
<Item Name="Name">Lyrics</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://songmeanings.com</Item>
<Item Name="Search URL">http:////songmeanings.com//query//?query=replace(If(!IsEmpty([Artist],0),[Artist]/ ,)[Name],/ ,+)&amp;type=songtitles</Item>
<Item Name="Filter">[Media Type]=[Audio],[Video] [Media Sub Type]=[],[Music],[Music Video]</Item>
</Link>
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

iamimdoc

  • World Citizen
  • ***
  • Posts: 115
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #26 on: May 24, 2015, 02:09:28 pm »

For those of us who are not programmers....

I think/hope the last entry by Glynor will go to current song and find lyrics and place them in the clipboard allowing  one to paste them into the lyrics tag ( but not sure)

1) Is this correct?
2) If so could you give a bit more detail as to what of the code goes where?  After Manage Link > Add a link, rename the link I am lost...
3) Years ago Mediamonkey had some add on programs, one of which would allow the user to highlight long list of songs.  The program would go to the internet, grab possibly correct lyrics for each song and then paste them into the lyrics tag for each song.  Is there any similar functionality for JRiver available?

Thanks



Logged

Ferdi

  • World Citizen
  • ***
  • Posts: 195
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #27 on: May 24, 2015, 02:27:07 pm »

Quote
Years ago Mediamonkey had some add on programs, one of which would allow the user to highlight long list of songs.

That plugin is still available and working: it's called Lyricator. Works very well. Tip if you use it: set the plugin up to use only hiplyrics, at least for a first run. If you have lots of latin music, chose a different site.
hiplyrics has a good success rate and response far more quickly than the other sources. If you use multiple site, it will slow down the process significantly, some of which are very slow to respond.

Btw, this is one out of two reasons why I sometimes use MM, the second one being that I can sync to my iPhone. In general though, MC is far superior :D
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #28 on: May 24, 2015, 03:58:34 pm »

I think/hope the last entry by Glynor will go to current song and find lyrics and place them in the clipboard allowing one to paste them into the lyrics tag ( but not sure)

1) Is this correct?

No.  It opens up the current song on Songmeanings in a Browser window.  I have the one above set to open the browser externally (so it pops up your default browser), though you can change it easily to use the internal browser inside MC.

I used to spend a bunch of time importing Lyrics into my file tags. I don't anymore, because the Links are nice enough (and require far less work). If I want to see the Lyrics, I just hit the Lyrics link and it shows them in my browser.  Done.

There used to be a plugin for slurping up Lyrics for MC, by our friend KingSparta.  I don't know if it still works, but it might.  There may very well be others.  Search the 3rd Party board for Lyrics and see what you find.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #29 on: May 24, 2015, 04:03:16 pm »

2) If so could you give a bit more detail as to what of the code goes where?  After Manage Link > Add a link, rename the link I am lost...

This is super-easy.

1. Open up the Links Manager.
2. Add a Link with the Add button on the left hand side.  Don't bother naming it or configuring anything.
3. Copy the text from in the Code Block in one of the handy things people have contributed above, like this one for SongMeanings:

Code: [Select]
<Link version="1.2">
<Item Name="Name">Lyrics</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://songmeanings.com</Item>
<Item Name="Search URL">http:////songmeanings.com//query//?query=replace(If(!IsEmpty([Artist],0),[Artist]/ ,)[Name],/ ,+)&amp;type=songtitles</Item>
<Item Name="Filter">[Media Type]=[Audio],[Video] [Media Sub Type]=[],[Music],[Music Video]</Item>
</Link>
Just copy everything in that code block above.

4. Switch back to the Links Manager in MC, and with the new link you added still highlighted, click the Paste Link Information from Clipboard button.
5. Rename the link and re-order it in your list of links if you want.
6. Click OK to save it.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #30 on: May 24, 2015, 04:05:29 pm »

Quote
2) If so could you give a bit more detail as to what of the code goes where?  After Manage Link > Add a link, rename the link I am lost..
Copy the code from here, then press the "paste from clipboard" button.

What glynor said ;)

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #31 on: May 24, 2015, 04:09:10 pm »

Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #32 on: July 06, 2015, 04:19:48 pm »

I found that Tidal (or Wimp) has some high quality cover art (1280x1280). Here is the code for a Google search of Tidal:

Code: [Select]
<Link version="1.2">
<Item Name="Name">Tidal Cover Art</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.google.com</Item>
<Item Name="Search URL">https:////www.google.com//search?as_st=y&amp;tbm=isch&amp;as_q=Hexify([Album Artist (auto)] [Album])&amp;safe=images&amp;as_sitesearch=wimpmusic.com&amp;e&amp;as_st=y&amp;tbm=isch&amp;tbs=isz:l,imgo:1</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #33 on: August 01, 2015, 03:00:12 pm »

Just thought I'd add this one .. Musixmatch is a very large lyrics data base and pretty good for more esoteric stuff like old standards and indie artists.

Quote
<Link version="1,2">
<Item Name="Name">Musixmatch</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">https://www.musixmatch.com/</Item>
<Item Name="Search URL">https:////www.musixmatch.com//search//Replace([name],/ ,+)  Replace([artist],/ ,+)</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>

you can of course remove the artist part of the search url if you get better results
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #34 on: November 17, 2015, 04:33:04 pm »

Adding one for Lyrics.com.  I still like Songmeanings better, though, so if you're just looking for lyrics, head on up to my previous post for Songmeanings.  But, if you want Lyrics.com, I took the time to sort it out.

Code: [Select]
<Link version="1.2">
<Item Name="Name">Lyrics.com</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://www.lyrics.com</Item>
<Item Name="Search URL">http:////www.lyrics.com//search.php?keyword=Replace(If(!IsEmpty([Artist],0),[Artist]/ ,)[Name],/ ,+)&amp;what=all&amp;search_btn=Search</Item>
<Item Name="Filter">[Media Type]=[Audio],[Video] [Media Sub Type]=[],[Music],[Music Video]</Item>
</Link>

I also tweaked the Songmeanings post with slightly improved code, so if you previously made one, you should update it.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #35 on: February 10, 2016, 11:47:58 am »

Starting with build 21.0.46, link version needs to be "1.3".

Edit:  This is no longer necessary.
Logged

rudyrednose

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 344
  • nothing more to say...
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #36 on: February 10, 2016, 12:25:25 pm »

I jumped seeing this thread !
I thought for a second that MrC was back among us  :o
Logged

Ferdi

  • World Citizen
  • ***
  • Posts: 195
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #37 on: March 01, 2017, 07:45:53 pm »

Has anyone ever created a link to Pitchfork? Would love that one.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #38 on: March 02, 2017, 12:51:09 am »

Code: [Select]
<Link version="1.2">
<Item Name="Name">Pitchfork</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://pitchfork.com</Item>
<Item Name="Search URL">http:////pitchfork.com//search//?query=Hexify([artist])</Item>
<Item Name="Filter">[Media Type]=[Audio]</Item>
</Link>

That's the best I can get for audio. I don't think it's possible to get right at the album due to them adding a number in front of the album name for each album's page. The sites a tad sparse in my, very humble, opinion. Many albums missing, many artists missing, and no artist biographies...

Ferdi

  • World Citizen
  • ***
  • Posts: 195
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #39 on: March 02, 2017, 03:29:45 pm »

Superb Marko, thanks a lot!
Yes it's more a review site than a database. I love their reviews though and like to start here when I read about releases. So - thanks much again!
Logged

slayerist

  • Member
  • *
  • Posts: 2
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #40 on: August 30, 2017, 09:18:41 am »

Any chance of adding www.metal-archives.com ?
Logged

slayerist

  • Member
  • *
  • Posts: 2
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #41 on: August 31, 2017, 03:38:03 am »

www.metal-archives.com

Band (Artist)
Code: [Select]
<Link version="1,2">
<Item Name="Name">Metal Archives Band</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://metal-archives.com</Item>
<Item Name="Search URL">http:////metal-archives.com//search?searchString=Replace([artist],/ ,+)&amp;type=band_name</Item>
<Item Name="Filter">[media type]=[audio]</Item>
</Link>

Album title
Code: [Select]
<Link version="1,2">
<Item Name="Name">Metal Archives Album</Item>
<Item Name="Action">1</Item>
<Item Name="Base URL">http://metal-archives.com</Item>
<Item Name="Search URL">http:////metal-archives.com//search?searchString=Replace([album],/ ,+)&amp;type=album_title</Item>
<Item Name="Filter"/>
</Link>
Logged

FrankEPaul

  • Member
  • *
  • Posts: 3
I've read the threads but still need help with creating CUSTOM LINKS
« Reply #42 on: November 09, 2017, 04:08:08 pm »

Hi

Let me explain myself briefly before posting my query, because that might provide useful context: I've been greatly enjoying MC for the past few months. After having tried out a bunch of other media players, I feel like I finally found the player that does pretty much everything I want and is totally immersive to use.  But there's one MC functionality I would like to way more fully leverage - namely, MANAGE LINKS - but due to my lack of sufficient scripting skills and knowledge for the job, I'm finding I'm not able to do so, even after having read numerous threads on the topic, including the "Tips of the Weeks" entries. 

So far, I've been able to get separate Album and Artist links working for both AMG and Pitchfork, mostly due to the fact that dead-simple scripting for the "Search Link" element seems to work fine for those sites. It's when I get to any of about another dozen or so music-related sites (Bandcamp, Discogs, Tiny Mix Tapes, Boomkat, Resident Advisor, Drowned in Sound, Exclaim, etc. etc.) where I find myself totally lost in terms of tweaking the scripts to make the search commands for Artist and/pr Album workable for these other sites.  I stare at examples posted by other people but have no clue what bits of code like "&amp" and "ifempty" (but two of many examples) refer to or how (or why) I may need to use them.  The generic coding examples previously posted do not generate satisfactory results for these other sites.

So, my two-part question I was hoping somebody could help me with is as follows:

1) Is there any online resource available which fully explains the different coding elements I need to know in order to program the SEARCH URL script so I can get workable links functioning easily and effectively? (Again, I'm no techy, but have been able to learn dribs and drabs of coding logic for things I've needed before, e.g. CSS/HTML)

2) Perhaps an easier solution: Would any forum members out there who know the MANAGE LINKS function like the back of their hand be able to simply program a list of sites for me?  Name your price and I can let you know if I can afford your expertise  ;)

Thanks in advance for any help anybody out there might be able to offer. If I can get the MANAGE LINKS function to work for me the way I think it's capable, the last piece of the puzzle would be in place letting me conclude that being set up in MC is like dying and going to digital music heaven.   :)
Logged

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: I've read the threads but still need help with creating CUSTOM LINKS
« Reply #43 on: November 09, 2017, 04:12:23 pm »

Hi

1) Is there any online resource available which fully explains the different coding elements I need to know in order to program the SEARCH URL script so I can get workable links functioning easily and effectively? (Again, I'm no techy, but have been able to learn dribs and drabs of coding logic for things I've needed before, e.g. CSS/HTML)


Here is a great place to start...

https://wiki.jriver.com/index.php/Expression_Language

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

FrankEPaul

  • Member
  • *
  • Posts: 3
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #44 on: November 09, 2017, 06:18:45 pm »

Ken

Thank you so much for passing that on, I appreciate it!  (Now comes the test to see if my thick skull can comprehend it all!  ;D)

Cheers
Frank
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #45 on: November 09, 2017, 06:43:17 pm »

Here is another hint.

Use the examples above to see what is required for a search. For example, with www.metal-archives.com above, if you go to the site and search for a band that doesn't exist (Deaf Leopard in my case), then the URL shown is something like this:
https://www.metal-archives.com/search?searchString=Deaf+Leopard&type=band_name

Now compare that to the string in Slayerist's example above:
<Item Name="Search URL">http:////metal-archives.com//search?searchString=Replace([artist],/ ,+)&amp;type=band_name</Item>

It is easy to see what needs to be done. It is all about finding out the correct search string used for a site and then building it using the Expression Language and tags that exist in MC. Then the rest is just about filtering results and so on.

I haven't built a lot, but once you see what is required, it isn't that onerous.

&amp; is required to insert "&" into a URL, and in other situations. Google will explain.
"/" is the escape character used in the Expression Language to allow you to pass a real "/" to a URL. Hence "////" is read as "//" and "//" as "/".
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

FrankEPaul

  • Member
  • *
  • Posts: 3
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #46 on: November 09, 2017, 08:31:56 pm »

Hi Roderick

Thanks for taking the time to explain all that.

When I first checked out those other coding examples, I did sort of inadvertently end up trying to replicate bits of code in relation to the other sites I'm interested in, trying to see if I could figure out which bits applied and which didn't. Based on your advice, it sounds as though I need to try that a bit further. I guess I gave up when and where I did out of a sense of not having a feel for the underlying logic and thus copy-and-pasting kind of blind. Perhaps boning up on the expression language and then trying your deductive approach again will make it become easier. In any event, I appreciate your help!

Cheers
Frank
Logged

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 690
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #47 on: November 09, 2017, 11:44:43 pm »

MrC, you are missed around here. Thanks for your help and contributions.
Logged

terrya64

  • Junior Woodchuck
  • **
  • Posts: 68
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #48 on: February 03, 2018, 04:31:10 pm »

I am hoping someone can help with the proper coding for a couple external searches.
I have been trying to get artist search links working to:

https://rateyourmusic.com/
http://www.musicvf.com/

Not sure what I'm doing wrong but can't get these to work right.

thanks!!
Logged
His mind is not for rent..to any god or government

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: • MrC's Tip of the Week 2013.36: Links
« Reply #49 on: February 03, 2018, 06:26:17 pm »

You just need to work out the search URL used by the site and structure that into a link, as per my post here https://yabb.jriver.com/interact/index.php/topic,83371.msg782412.html#msg782412, plus complete the other bits of the link.

The only complex bits are the Replace function, using the "&", and making sure you escape any special characters such as "/" with a "/", which means using the following character literally. Hence in the Replace command "/ ,+" means literally replacing the Space with a "+" character.


The RateYourMusic site seems to have a pretty simple search engine, and it returns a list of Artists that match or come close, rather than a single Artist.

Using my Deaf Leopard example, the search URL for an Artist search is:
https://rateyourmusic.com/search?searchtype=a&searchterm=Deaf+Leopard

Which codes into the following Search URL using tags in MC:
<Item Name="Search URL">https:////rateyourmusic.com//search?searchtype=a&amp;searchterm=Replace([artist],/ ,+)</Item>

So the full code you can paste into the Links dialogue is:

Code: [Select]
<Link version="1.2">
<Item Name="Name">RateYourMusic</Item>
<Item Name="Action">2</Item>
<Item Name="Base URL">https:////rateyourmusic.com//</Item>
<Item Name="Search URL">https:////rateyourmusic.com//search?searchtype=a&amp;searchterm=Replace([artist],/ ,+)</Item>
</Link>

As per Marko's instructions above, copy that and use the "Paste Link Information From Clipboard" in the Manage Links dialogue.

Note that;
<Item Name="Action">0</Item>
opens the result in the same tab inside MC.

<Item Name="Action">1</Item>
opens the result in an external browser.

<Item Name="Action">2</Item>
opens the result in a new tab inside MC. My preferred option.

Choose which you prefer.


Music VF is similar.

Code: [Select]
<Link version="1.2">
<Item Name="Name">MusicVF</Item>
<Item Name="Action">2</Item>
<Item Name="Base URL">http:////www.musicvf.com//</Item>
<Item Name="Search URL">http:////www.musicvf.com//search.php?searchtype=searchartist&amp;searchstring=Replace([artist],/ ,+)</Item>
</Link>

I tested both and they work.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1] 2   Go Up