Similar Artists Javascript Widget Mod

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

Moderator: moderators

Re: Similar Artists Javascript Widget Mod

Postby Pcace » Wed Dec 28, 2011 12:22 pm

Hey, i tried to install the mod, but without success...
hopefully someone can help me out there: im using subsonic 4.6 with around 100.000mp3 files. The server is a debian machine.
One Client is a Mac, with Safari and Chrome.

The Problem is, that i simply dont see the "Similar Artist" Tab....
Everything else works great!

The scripts.js looks like that:

Code: Select all
function noop() {
}

function popup(mylink, windowname) {
    return popupSize(mylink, windowname, 400, 200);
}

function popupSize(mylink, windowname, width, height) {
    var href;
    if (typeof(mylink) == "string") {
        href = mylink;
    } else {
        href = mylink.href;
    }

    var w = window.open(href, windowname, "width=" + width + ",height=" + height + ",scrollbars=yes,resizable=yes");
    w.focus();
    w.moveTo(300, 200);
    return false;
}

/// Add similar artists
(function() {
   
   Node.prototype.insertAfter = function(newNode, refNode) {
      if(refNode.nextSibling) {
         return this.insertBefore(newNode, refNode.nextSibling);
      } else {
         return this.appendChild(newNode);
      }
   };
   
   var loaded = function() {
      //load.injectDependency('https://github.com/cowboy/jquery-postmessage/raw/master/jquery.ba-postmessage.js');
      load.injectDependency('./script/similar_artists/similar_artists.js');
   };
   
    var load = function() {
       load.injectDependency('./script/similar_artists/jquery-1.5.1.min.js');
       load.tryReady(0);
    };
   
    load.injectDependency = function(script) {
        var sa = document.createElement('script');
        sa.type = 'text/javascript';
        sa.async = 'async';
        sa.src = script;
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertAfter(sa, s);
    };
   
    load.tryReady = function(time_elapsed) {
       // Continually polls to see if jQuery is loaded.
       if(typeof(jQuery) === undefined) { // if jQuery isn't loaded yet...
          if (time_elapsed <= 15000) { // and we havn't given up trying...
             //setTimeout("load.tryReady(" + (time_elapsed + 200) + ")", 200); // set a timer to check again in 200 ms.
             setTimeout(function() {
                load.tryReady(200);
             }, 200);
          }
          else {
             alert("Timed out while loading jQuery.");
          }
       }
       else {
          loaded();
       }
   };
   
   load();
})();



Any Idea?


Thanks,

Pcace



EDIT:Works now! Thank you sooooo much for the script... i simply had to restart the server....
Pcace
 
Posts: 115
Joined: Tue Nov 29, 2011 2:44 pm

Re: Similar Artists Javascript Widget Mod

Postby Hellscream » Wed Dec 28, 2011 10:18 pm

This is very strange I use similar artist from very beginning and its a part of my SS, after i upgrade to SS 4.6 i have problem starting this widget and believe me i try everything.
Can someone help me with this problem
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: Similar Artists Javascript Widget Mod

Postby BKKKPewsey » Wed Dec 28, 2011 11:46 pm

Hi Hellscream
Long time no hear? here ? :D
I am running 4.6 with this mod NP (thank you mqchen)
This and the EQ mod are the only ones I have implemented at that moment so perhaps your mods are clashing? :?
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 Dec 28, 2011 11:47 pm

@Hellscream

Obvious stupid question: Did you try re-installing the widget (i.e. copying everything again)?
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby Hellscream » Wed Dec 28, 2011 11:58 pm

thx for fast reply yes i install all from beginning i even download latest version .
I start to suspect that my server have some issues i will try another link for host .
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: Similar Artists Javascript Widget Mod

Postby Pcace » Thu Dec 29, 2011 12:04 am

Hey, first try to disable and than enable this setting:

Bildschirmfoto 2011-12-29 um 01.01.51.png


under Settings:

Bildschirmfoto 2011-12-29 um 01.02.02.png


That was the Problem here with 4.6...

Success?


Pcace
Last edited by Pcace on Thu Dec 29, 2011 12:06 am, edited 1 time in total.
Pcace
 
Posts: 115
Joined: Tue Nov 29, 2011 2:44 pm

Re: Similar Artists Javascript Widget Mod

Postby mqchen » Thu Dec 29, 2011 12:05 am

Another stupid obvious question: Did you restart your subsonic server?

If you've done that, could you open up Firebug and see if we get any errors?
User avatar
mqchen
 
Posts: 28
Joined: Mon Feb 28, 2011 2:33 am

Re: Similar Artists Javascript Widget Mod

Postby Hellscream » Thu Dec 29, 2011 12:15 am

@pcace nop that doesnt help at all
can someone test my host at least i will eliminate something
http://hellscream.dyndns.org/ArtistInfo/jsonp.php
thx in advance

@mqchen
i dont have firebug installed kinda lazy to do that tonight
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: Similar Artists Javascript Widget Mod

Postby Pcace » Thu Dec 29, 2011 12:18 am

Bildschirmfoto 2011-12-29 um 01.18.01.png
Pcace
 
Posts: 115
Joined: Tue Nov 29, 2011 2:44 pm

Re: Similar Artists Javascript Widget Mod

Postby Hellscream » Thu Dec 29, 2011 12:22 am

i mean to replace link in similar_artists.js with link i post and check does it all working fine
line 81 var url = 'http://hellscream.dyndns.org/ArtistInfo/jsonp.php';
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: Similar Artists Javascript Widget Mod

Postby Pcace » Thu Dec 29, 2011 12:24 am

heheh,

im too tired...

now i got it ;)
im going to try....
Pcace
 
Posts: 115
Joined: Tue Nov 29, 2011 2:44 pm

Re: Similar Artists Javascript Widget Mod

Postby Hellscream » Thu Dec 29, 2011 12:28 am

Rly appreciate your help this is very important widget for me :P
But if everything work on your side with my host problem might be customized index.jsp file :(
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: Similar Artists Javascript Widget Mod

Postby Pcace » Thu Dec 29, 2011 12:30 am

Here it works perfectly!

Bildschirmfoto 2011-12-29 um 01.29.42.png


Bildschirmfoto 2011-12-29 um 01.31.02.png
Pcace
 
Posts: 115
Joined: Tue Nov 29, 2011 2:44 pm

Re: Similar Artists Javascript Widget Mod

Postby Hellscream » Thu Dec 29, 2011 12:32 am

O man ty for testing now im pissed i need to fix this
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: Similar Artists Javascript Widget Mod

Postby Pcace » Thu Dec 29, 2011 12:38 am

Im sorry,
i think i cannot help you then... :(
i also have no idea how php/java etc works...

Pcace
Pcace
 
Posts: 115
Joined: Tue Nov 29, 2011 2:44 pm

PreviousNext

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 4 guests