PDA

View Full Version : Track Numbers in Now Playing on SBC



smc2911
2008-03-24, 00:19
Apologies for the cross-post, but this thread (http://forums.slimdevices.com/showthread.php?t=44770) didn't get much of a response under General Discussion, and is a better fit here. If it's possible to get track and disc numbers displayed in the SBC Now Playing list, I'd love to know how.

gerph
2008-03-24, 02:11
Apologies for the cross-post, but this thread (http://forums.slimdevices.com/showthread.php?t=44770) didn't get much of a response under General Discussion, and is a better fit here. If it's possible to get track and disc numbers displayed in the SBC Now Playing list, I'd love to know how.

Locate Slim/Control/Queries.pm.

Look around line 4134 in there (might be a little way out) in the sub titlesQuery.

Locate the sequence:


# open a window with icon etc...


my $text = $item->title;
my $album;
my $albumObj = $item->album();

# Bug 7443, check for a track cover before usinng the album cover
my $iconId = $item->coverArtExists ? $id : 0;


Change this to:


# open a window with icon etc...


my $text = $item->title;
my $album;
my $albumObj = $item->album();
my $trackNum = $item->tracknum;

if (defined $trackNum)
{
$text = "$trackNum. " . $text;
}

# Bug 7443, check for a track cover before usinng the album cover
my $iconId = $item->coverArtExists ? $id : 0;


ie insert the new bits dealing with $trackNum.

This is VERY rough and ready and doesn't follow the configuration (presumable the Slim::Music::TitleFormatter is the thing I should be using), but I've just thrown this together quickly before I go to work.

Oh, that'll teach me to not read the post properly. You said /in Now Playing/. Bother. Ok. Well, the above will work, but only for the tracks in the track selector, not 'Now Playing'. I'll try to remember to look at this more closely when I get home tonight.

max.spicer
2008-03-24, 02:13
Apologies for the cross-post, but this thread (http://forums.slimdevices.com/showthread.php?t=44770) didn't get much of a response under General Discussion, and is a better fit here. If it's possible to get track and disc numbers displayed in the SBC Now Playing list, I'd love to know how.

There was a thread on this last week. Basically, you can't. But it's a known bug - a quick search on bugzilla should find the relevant bug. Please avoid the temptation to add "me too" comments to the bug though. ;-)

Max

smc2911
2008-03-24, 02:22
Thanks for the responses. I have searched the bugs, but must not have settled on the appropriate keywords as I am yet to find it. If someone can point me in the right direction, I'll vote for it (no "me too" comments though :))

erland
2008-03-24, 04:33
Thanks for the responses. I have searched the bugs, but must not have settled on the appropriate keywords as I am yet to find it. If someone can point me in the right direction, I'll vote for it (no "me too" comments though :))

http://bugs.slimdevices.com/show_bug.cgi?id=7190

smc2911
2008-03-25, 01:51
Thanks erland. I've noted (early but not often!).