Similar Artists Javascript Widget Mod

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Re: Similar Artists Javascript Widget Mod

Postby Minime » Thu Sep 01, 2011 5:31 am

I have finally had a bit of spare time and first updated to SS 4.5 and everything went smooth - love the way it retained all my existing settings. Love the sharing feature as well. Then redone a couple of my existing mods - and to top it up added your mod. Glad to report that all is running like a charm. Subsonic just keeps on getting better and better. Thank you very much mqchen for this awesome mod.
Best Regards
Minime,
-----------------------------------------------------------------
Subsonic 4.6 | Ubuntu 10.04 LTS inside a VMWare host
Galaxy SII with ICS 4.0.1 & Android App v3.0 Combo
XBMC Dharma with t0mm0-xbmc-addons
+ A few custom Mods
User avatar
Minime
 
Posts: 68
Joined: Fri Dec 17, 2010 5:19 am
Location: UK

Re: Similar Artists Javascript Widget Mod

Postby dcuellar » Mon Sep 12, 2011 9:29 pm

Screen Shot 2011-09-12 at 5.25.34 PM.png


Installed on my own server. Everything works fine. Thank you for the great add-on!!
dcuellar
 
Posts: 97
Joined: Sat Feb 05, 2011 3:23 pm

Re: Similar Artists Javascript Widget Mod

Postby osnet » Tue Sep 20, 2011 7:06 am

/signed
this is a great addon.
works fine w/o any troubles

but how to implement it like 3r3 has shown it ?

EDIT:
mmh this .js stuff is kinda wierd ...
as known from other prog-languages i tried all possibilities to show the similar-artist list directly under the users "nowplaying" stuff matching the artist.name ..
no way ...

in the end i wanted to put the open/close trigger right after the lyrics link. the matching sim.art. list should expand under it ...
til now i'm stuck with it. maybe there will be any solution anytime later.
Version 4.5 (build 2384) – 10. August 2011
Server jetty-6.1.x, java 1.6.0_22, Linux
osnet
 
Posts: 16
Joined: Thu Aug 25, 2011 6:05 am

Re: Similar Artists Javascript Widget Mod

Postby BKKKPewsey » Tue Sep 20, 2011 5:57 pm

I think I have discovered a small "buglet" which I think can be easily solved by anyone with a rudimentary knowledge of php (which I aint got :( )
It would appear to get very confused if you have multiple artists in your id tags, I was playing an album by Steve Roach/Stephen Kent and it came back as 柯宗佑 as the artist :shock:
However Steve Roach on his own is reported correctly. Is there a way to alter the server code to only send the artist name up to the ID tag separator "/" to musicBrainz ?
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: Similar Artists Javascript Widget Mod

Postby osnet » Tue Sep 20, 2011 7:50 pm

this cuts lalala.jpg to lalala

Code: Select all
<?
$filename = 'lalala.jpg';
$extension = substr(strrchr($filename, "."), 1);
?>


the same could be used in your case
Version 4.5 (build 2384) – 10. August 2011
Server jetty-6.1.x, java 1.6.0_22, Linux
osnet
 
Posts: 16
Joined: Thu Aug 25, 2011 6:05 am

Re: Similar Artists Javascript Widget Mod

Postby mqchen » Tue Sep 20, 2011 9:16 pm

BKKKPewsey wrote:I think I have discovered a small "buglet" which I think can be easily solved by anyone with a rudimentary knowledge of php (which I aint got :( )
It would appear to get very confused if you have multiple artists in your id tags, I was playing an album by Steve Roach/Stephen Kent and it came back as 柯宗佑 as the artist :shock:
However Steve Roach on his own is reported correctly. Is there a way to alter the server code to only send the artist name up to the ID tag separator "/" to musicBrainz ?


Wow, that is a strange one...

Anyway, I have added support for this case now.

To get latest update:
  • If you are using my PHP server (the default), then you don't have to do anything. Your widget should already support similar artists for multiple-artist-songs.
  • If you have set up your own PHP server, just grab the latest from the repository. The only files that have been changed are "jsonp.php" and "Net/ArtistInfo.php".

How it works.
It splits the artist name by ", / &" (ignores the special case where artist names are "Beatles, The", which it treats correctly as "The Beatles" instead of "Beatles" and "The" - which is actually a band).

For example, if you are playing a song by "Paul McCartney & Stevie Wonder" it will fetch the similar artists for both of them individually. Then the lists are merged and sorted so that the artists who are common for both comes higher up (their similarity rating is summed). In this case it suggests: "Paul McCartney & Wings","Wings","George Harrison","Ringo Starr","The Beatles", etc.
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby osnet » Tue Sep 20, 2011 9:35 pm

hmm and what about bands that NEED the slash ?

for example De/Vision -> http://www.devision-music.de/index.php? ... navobj=0,1
Version 4.5 (build 2384) – 10. August 2011
Server jetty-6.1.x, java 1.6.0_22, Linux
osnet
 
Posts: 16
Joined: Thu Aug 25, 2011 6:05 am

Re: Similar Artists Javascript Widget Mod

Postby mqchen » Tue Sep 20, 2011 11:09 pm

I didn't consider any bands with those characters in their names, but I have added a special case for that. It now checks the given name to see if it gives a match with a name that is 65% similar, then it doesn't consider it as multiple artists.

If you are running your own PHP server just get the latest commit from the repository: https://github.com/mqchen/SimilarArtist ... r-Subsonic
Otherwise, you don't have to do anything.

However, I did notice a bug, and it is something which unfortunately is quite difficult to work with. If you are playing a song by "Clint Eastwood, Jamie Cullum", Subsonic shows it up as "Clint Eastwood, Jamie..." to save place. This widget then splits it up to "Clint Eastwood" and "Jamie...", and "Jamie..." apparently returns "薛忠銘" from MusicBrainz. I'll see if I can find a solution to this.
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby BKKKPewsey » Wed Sep 21, 2011 1:07 am

:D Excellent that works a treat Thank You
I was still on Chapter 2 of PHP for Dummies when you posted this :oops:

Now if you can explain why the band Queen gets such strange results that will really make my day :P

eg Queen on their own

Image

and showing the new mod in action

Image

has MusicBrainz got something against Queen :?
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: Similar Artists Javascript Widget Mod

Postby mqchen » Wed Sep 21, 2011 6:18 am

Wow, that's weird as well. If you search for Queen using MusicBrainz's API that Japanese band actually comes first: http://musicbrainz.org/ws/1/artist/?type=xml&name=Queen

But I think I might have an idea on how to by-pass problems like this...
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby mqchen » Wed Sep 21, 2011 6:33 am

Ok, I have found the problem. Seems MusicBrainz gives some weird results (as you have notices) when using v1 of their API. I have updated the widget to use v2 which seems to solve some of the weird matches.

If you are running your own PHP server, just grab the latest from the repo: https://github.com/mqchen/SimilarArtist ... r-Subsonic
Only Server/Music/ArtistInfo.php has been updated.

If you are using the default server it has already been updated.
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby BKKKPewsey » Wed Sep 21, 2011 1:42 pm

\\^// \\^// \\^//

Image


:D
EDIT: I just noticed that Last FM thinks that Pink Floyd are similar to Queen :?
Some of the Last FM users must be smokin' something stronger then Marlboro
:mrgreen:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: Similar Artists Javascript Widget Mod

Postby mqchen » Wed Sep 21, 2011 3:19 pm

Ok, one last update now: https://github.com/mqchen/SimilarArtist ... r-Subsonic
Only updated Server/Music/ArtistInfo.php for those of you who are running your own PHP server. For the rest; you don't need to do anything.

  • I have added support to check that names aren't too different from the name you are search with. This should also help prevent additional false hits.
  • Bug fixes which may have caused the multiple artist to malfunction slightly. Now fixed.
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby califrag » Fri Sep 30, 2011 2:31 am

Not sure if I did something wrong....

I'm using subsonic standalone 4.5

I followed the instructions on the github:
added the Client\scripts.js info and copied the 'similar_artists' folder into my 'script' folder, but nothing is showing up...

Would like to get this working :[
califrag
 
Posts: 72
Joined: Mon Sep 26, 2011 3:43 am

Re: Similar Artists Javascript Widget Mod

Postby BKKKPewsey » Sat Oct 01, 2011 1:05 am

No 1 rule DON'T use IE9 it doesnt work in that browser.
:mrgreen:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

PreviousNext

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 2 guests