|
#1
|
|||
|
|||
|
Hi,
creating customized title formats is really fun! after i've played a while with the different templates a few questions are still left: - CT, TAGSIZE and VOLUME does nothing? is this okay? - BITRATE shows bit/s (no surprise ;-), any way to so some calculations to get kbps? e.g. BITRATE/1024 does not work... - PLAYTIME counts down to 0, is there a template which counts up to SONGTIME? (ELAPSED?) - any counterparts for PLAYTIME/SONGTIME/"ELAPSED" on the playlist level? Slimserver 6.5.1 + MusicInfoSCR 3.0 happy customizing :-) tia & kind regards, Markus |
|
#2
|
||||
|
||||
|
Hi Markus
> creating customized title formats is really fun! after i've played a > while with the different templates a few questions are still left: You must be the patient type of guy, testing all these :-). > - CT, TAGSIZE and VOLUME does nothing? is this okay? I surely never tested TAGSIZE and VOLUME. VOLUME (sadly translated in the list, which results in something completely different...) returns the volume/disk on which my music collection is stored. I thought CT once worked. I'll see what happened to them (it's not in MusicInfoSCR but in the server code). But after all it's not the most important tags. > - BITRATE shows bit/s (no surprise ;-), any way to so some calculations > to get kbps? e.g. BITRATE/1024 does not work... 128000/1024 won't give you the expected 128kbps :-). I'll see what I can do. > - PLAYTIME counts down to 0, is there a template which counts up to > SONGTIME? (ELAPSED?) PLAYTIME depends on your settings for the Now Playing screen: by repeatedly hitting the NOW PLAYING button on the remote you can shoose between the elapsed and the remaining time. > - any counterparts for PLAYTIME/SONGTIME/"ELAPSED" on the playlist > level? This has been asked for before for the server, but it's not there. > happy customizing :-) I'm glad you like it. -- Michael ----------------------------------------------------------------- http://www.herger.net/SlimCD - your SlimServer on a CD http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR |
|
#3
|
|||
|
|||
|
Quote:
Quote:
kind regards, Markus |
|
#4
|
|||
|
|||
|
Quote:
I do not know if this is the right way doing this, at least it works and gives you another placeholder called KBPS (usable in format tags). Do whatever you wish with this code :-) Code:
--- MusicInfoSCR/Info.pm.org 2006-10-09 11:03:38.000000000 +0200
+++ MusicInfoSCR/Info.pm 2006-12-16 16:30:27.000000000 +0100
@@ -329,6 +329,15 @@
return $songduration;
}
+sub getBitrate {
+ my $song = shift;
+
+ my $bitrate = Slim::Music::Info::getBitrate($song);
+ my $kbps = int($bitrate / 1000);
+
+ return $kbps;
+}
+
sub buttonIcons {
my ($client, $position, $line) = @_;
Code:
--- MusicInfoSCR/Plugin.pm.org 2006-10-27 16:29:48.000000000 +0200
+++ MusicInfoSCR/Plugin.pm 2006-12-16 16:21:37.000000000 +0100
@@ -94,6 +94,8 @@
Slim::Web::Setup::addPlayerChild('PLUGIN_SCREENSAVER_MUSICINFO');
Slim::Music::TitleFormatter::addFormat('SONGTIME', \&Plugins::MusicInfoSCR::Info::getSongTime);
+
+ Slim::Music::TitleFormatter::addFormat('KBPS', \&Plugins::MusicInfoSCR::Info::getBitrate);
}
sub shutdownPlugin {
Code:
--- MusicInfoSCR/Setup.pm.org 2006-10-27 16:30:14.000000000 +0200
+++ MusicInfoSCR/Setup.pm 2006-12-16 16:15:35.000000000 +0100
@@ -513,6 +513,7 @@
$formatStrings{'PLAYTIME'} = 'PLAYTIME';
$formatStrings{'PLAYTIME_PROGRESS'} = 'PLAYTIME_PROGRESS';
$formatStrings{'SONGTIME'} = 'SONGTIME';
+ $formatStrings{'KBPS'} = 'KBPS';
$formatStrings{'PLAYTIME / SONGTIME'} = 'PLAYTIME / SONGTIME';
$formatStrings{'PLAYLIST'} = 'PLAYLIST';
$formatStrings{'PLAYLIST (X_OF_Y)'} = 'PLAYLIST (X_OF_Y)';
|
|
#5
|
||||
|
||||
|
> I just was in the mood and did (tried) it myself.
> I do not know if this is the right way doing this, at least it works > and gives you another placeholder called KBPS (usable in format tags). Excellent! That's exactly the way to do it. > Do whatever you wish with this code I'll integrate it with the plugin :-). Thank you very much! -- Michael ----------------------------------------------------------------- http://www.herger.net/SlimCD - your SlimServer on a CD http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR |
|
#6
|
|||
|
|||
|
I have to thank you, as extending your plugin was not difficult. One (more) advantage of open source software - even more if it's perl based and therefore has no need for extra compiler, ide,...
|
|
#7
|
||||
|
||||
|
>> I'll integrate it with the plugin
I uploaded MusicInfoSCR 3.01 with your patch. Thanks again! -- Michael ----------------------------------------------------------------- http://www.herger.net/SlimCD - your SlimServer on a CD http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -7. The time now is 20:43.






Linear Mode

