Change title of the page to display current track name

Got an idea? Missing something? Post your feature request here.

Moderator: moderators

Change title of the page to display current track name

Postby mvo » Wed Jan 05, 2011 8:30 pm

Hi,
Is it possible to give an option to allow the track name to be displayed on the title so the user can quickly glance at the title bar or tab to see what is playing? Even better if the title scrolled if the name is too long.

Thanks
mvo
 
Posts: 13
Joined: Wed Dec 08, 2010 3:09 am

Postby kramttocs » Fri Jan 07, 2011 2:28 pm

+1

There have been many times that I have also thought that a scrolling title with the song title would be nice.
kramttocs
 
Posts: 110
Joined: Thu Nov 25, 2010 4:59 am
Location: Southwest Missouri, USA

Postby plarpco » Fri Mar 18, 2011 5:57 pm

I thought this was a good idea as well... I decided to write a greasemonkey script to handle it. YMMV. I'm sure it can be improved.

Currently this just sets the title to the LAST found "now playing" item in the right frame. I'm pretty much the only listener on my system, so this works for me. If you have multiple users, you might have to do some additional parsing.

Should work wheverever greasemonkey does. Create a new script, and paste this in, replacing the @include portion to point to your domain of subsonic.

Basically, this parses the right.view frame every 5 seconds and grabs a valid title (tooltip) from an anchor.

Code: Select all
// ==UserScript==
// @name           Now Playing in Subsonic
// @namespace      npsub
// @include        http://<domaintoyoursubsonicinstall>/right.view?*
// ==/UserScript==

function getNowPlayingName (){

   var links = document.getElementsByTagName('a');
   var element;

   for (var i = 0; i < links.length; i++) {
     
      element = links[i];

      if (element.title != '') {
         parent.document.title=element.title;
      }
   }

}

setInterval(getNowPlayingName, 5000);
plarpco
 
Posts: 1
Joined: Fri Mar 18, 2011 5:50 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests