My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 55: smart radiostation field parsing
1 person starred this issue and may be notified of changes. Back to list
Status:  Wishlist
Owner:  ----
Type-Enhancement
Priority-Medium


Sign in to add a comment
 
Reported by grinsted, Aug 21, 2007
This is a suggestion for an enhancement.

It would be great if the radio station field could automatically guess 
what you mean if you enter something that does not start with lastfm:// in 
the radiostation box. Examples:

"jazz" -> "lastfm://globaltags/jazz"
"jimi hendrix" -> "lastfm://artist/jimi+hendrix"

One way it could be implemented would be to execute a google search 
restricted to lastfm:

http://www.google.com/search?hl=en&q=site%3Alast.fm+%22jimi+hendrix%22
http://www.google.com/search?hl=en&q=site%3Alast.fm+%22jazz%22

The urls of the search results tell whether it is a tag or an artist. 
TheLastRipper could just pick the first result or present the user with a 
choice.

Comment 1 by jopsen, Aug 21, 2007
I'm pretty sure that Last.fm has some API's to do this... It might be implemented in
a future version...

But definitively a great idea...

I guess it could be implemented the same way Last-Exit has implemented it...
Status: Wishlist
Labels: -Type-Defect Type-Enhancement
Comment 2 by grinsted, Oct 04, 2007
Perhaps you could use the audioscrobbler webservices to achieve this...

You could request "http://ws.audioscrobbler.com/1.0/artist/jazz/similar.xml"
based on whether it gives a 404 or if the xml is really short then you can guess if 
it a tag or an artist.


Compare these examples:
Tag: http://ws.audioscrobbler.com/1.0/artist/jazz/similar.xml
Tag: http://ws.audioscrobbler.com/1.0/artist/rock/similar.xml
Tag: http://ws.audioscrobbler.com/1.0/artist/pop/similar.xml
Tag: http://ws.audioscrobbler.com/1.0/artist/60s/similar.xml
Tag: http://ws.audioscrobbler.com/1.0/artist/zimbabwe/similar.xml
Tag: http://ws.audioscrobbler.com/1.0/artist/nujazz/similar.xml

Artist: http://ws.audioscrobbler.com/1.0/artist/metallica/similar.xml
Artist: http://ws.audioscrobbler.com/1.0/artist/laila+kinnunen/similar.xml
Artist: http://ws.audioscrobbler.com/1.0/artist/erik+sumo/similar.xml
Artist: http://ws.audioscrobbler.com/1.0/artist/stateless/similar.xml

I think you can determine whether it is a tag or an artist by using the following 
rules to interpret the result of http://ws.audioscrobbler.com/1.0/artist/.... :
* 404 error:  it is a tag
* streamable=0: it is a tag
* number of artists in xml less than e.g. 5: it is a tag
* otherwise it is an artist.

-----
Some other suggestions:

You could also prefill the dropdown with the most popular tags:
Tag: http://ws.audioscrobbler.com/1.0/tag/toptags.xml

if text in the radiostation field matches one of the popular tags then you could 
avoid making a request to check if the user is thinking of an artist. Same thing 
with most popular artists. Also if the text matches one of the folder names in the 
download directory ... then it is an artist.



Sign in to add a comment

Hosted by Google Code