Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Ralph Edington
    Guest

    Question MusicInfoSCR.pm

    Hello Mr. Herger,

    I have a neat idea for an additional option on the MusicInfoScr.pm module.

    Would it be possible to have the name of the currently playing playlist as
    one of the displayable options?

    Option for displaying filename with or without the filename extension (.m3u,
    ..pls etc) would be nice too.

    The driving force for this request is: When listening to radio stations (at
    least those accessed by a saved .m3u file), it would be neat if the top line
    could display the playlist title (i.e. the name of the radio station, if
    I've saved my .m3u "correctly"), and then the bottom could display just the
    song "title" (usually preformatted to ARTIST-TITLE by the radio station.)

    What do you think? I'm just trying to eke out a little more "MusicInfo"
    when listening to radio stations...

    Thanks,

    RE

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,438

    Question MusicInfoSCR.pm

    > Hello Mr. Herger,

    You can call me Michael :-)

    > I have a neat idea for an additional option on the MusicInfoScr.pm
    > module.
    >
    > Would it be possible to have the name of the currently playing playlist
    > as one of the displayable options?


    I'll have to look into this. Basically I'm using the formats defined in
    "Server settings/Formats/Title formats", I only added some stuff like
    PLAYTIME and XofY.

    > Option for displaying filename with or without the filename extension
    > (.m3u, .pls etc) would be nice too.


    I don't know if it's possible to get the playlist's name. I'd need some
    help from the core developpers.

    [..]
    > What do you think? I'm just trying to eke out a little more "MusicInfo"
    > when listening to radio stations...


    It's a good idea! I only did a hack to fill the empty first line with that
    "now playing" instead of using something more usefull. I'll dig through
    the code...

    --

    Michael

    -----------------------------------------------------------
    Help translate SlimServer by using the
    SlimString Translation Helper (http://www.herger.net/slim/)

  3. #3
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    Question MusicInfoSCR.pm

    Quoting Michael Herger <slim (AT) herger (DOT) net>:


    > > Option for displaying filename with or without the filename extension
    > > (.m3u, .pls etc) would be nice too.

    >
    > I don't know if it's possible to get the playlist's name. I'd need some
    > help from the core developpers.


    try somethign like these:
    $client->currentPlaylist();
    $client->currentPlaylistModified();
    Slim::Music::Info::standardTitle($client, $client->currentPlaylist());

    the first is a raw filename, second is a flag saying the playlist has been
    modified since loading, and the last is the friendly name for the playlist file
    (usually just the filename w/o extension).

    -kdf

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,438

    Question MusicInfoSCR.pm

    >> > Option for displaying filename with or without the filename extension
    >> > (.m3u, .pls etc) would be nice too.

    >>
    >> I don't know if it's possible to get the playlist's name. I'd need some
    >> help from the core developpers.

    >
    > try somethign like these:
    > $client->currentPlaylist();
    > $client->currentPlaylistModified();
    > Slim::Music::Info::standardTitle($client, $client->currentPlaylist());
    >
    > the first is a raw filename, second is a flag saying the playlist has
    > been
    > modified since loading, and the last is the friendly name for the
    > playlist file
    > (usually just the filename w/o extension).


    Thanks for this! I was already digging my way through several modules
    without finding where to start.

    When you say "try something like these" you're aware of the fact, that I'm
    only able to do this for my plugin, aren't you? I tried to understand
    Slim::Music::Info::infoFormat()...

    --

    Michael

    -----------------------------------------------------------
    Help translate SlimServer by using the
    SlimString Translation Helper (http://www.herger.net/slim/)

  5. #5
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    Question MusicInfoSCR.pm

    Quoting Michael Herger <slim (AT) herger (DOT) net>:

    > >> > Option for displaying filename with or without the filename extension
    > >> > (.m3u, .pls etc) would be nice too.
    > >>
    > >> I don't know if it's possible to get the playlist's name. I'd need some
    > >> help from the core developpers.

    > >
    > > try somethign like these:
    > > $client->currentPlaylist();
    > > $client->currentPlaylistModified();
    > > Slim::Music::Info::standardTitle($client, $client->currentPlaylist());
    > >
    > > the first is a raw filename, second is a flag saying the playlist has
    > > been
    > > modified since loading, and the last is the friendly name for the
    > > playlist file
    > > (usually just the filename w/o extension).

    >
    > Thanks for this! I was already digging my way through several modules
    > without finding where to start.
    >
    > When you say "try something like these" you're aware of the fact, that I'm
    > only able to do this for my plugin, aren't you? I tried to understand
    > Slim::Music::Info::infoFormat()...
    >

    yeah...do NOT go into that mess. you'll never be seen again.

    There was a request on bugs (#584) to add Current Time to the now playing
    options. There is a patch included there, which so far Dean has been reluctant
    to add, since the now playing display is tied down by too much legacy to go
    adding option after option. Your plugin is a great place to provide this
    option, however, and you can probably leverage a lot of what is in that patch.
    -kdf

  6. #6
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,438

    Question MusicInfoSCR.pm

    >> > Option for displaying filename with or without the filename extension
    >> > (.m3u, .pls etc) would be nice too.

    >>
    >> I don't know if it's possible to get the playlist's name. I'd need some
    >> help from the core developpers.

    >
    > try somethign like these:
    > $client->currentPlaylist();
    > $client->currentPlaylistModified();
    > Slim::Music::Info::standardTitle($client, $client->currentPlaylist());


    These only work if I explicitly select a playlist. Pretty often I just hit
    the play button to continue from where I left. In this case
    currentPlaylist() seems to be empty. Is that right?

    And I'll add that "CURRENTTIME" tag.

    --

    Michael

    -----------------------------------------------------------
    Help translate SlimServer by using the
    SlimString Translation Helper (http://www.herger.net/slim/)

  7. #7
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    Question MusicInfoSCR.pm

    Quoting Michael Herger <slim (AT) herger (DOT) net>:

    > >> > Option for displaying filename with or without the filename extension
    > >> > (.m3u, .pls etc) would be nice too.
    > >>
    > >> I don't know if it's possible to get the playlist's name. I'd need some
    > >> help from the core developpers.

    > >
    > > try somethign like these:
    > > $client->currentPlaylist();
    > > $client->currentPlaylistModified();
    > > Slim::Music::Info::standardTitle($client, $client->currentPlaylist());

    >
    > These only work if I explicitly select a playlist. Pretty often I just hit
    > the play button to continue from where I left. In this case
    > currentPlaylist() seems to be empty. Is that right?


    that's how the function works on the right side of the web UI as well

    > And I'll add that "CURRENTTIME" tag.
    >

    cool

    you rock, man!

    -kdf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •