Re: Code confusion...playlists
dean blackketter <dean-qV/[email protected]>
| Newsgroups | gmane.music.equipment.slimp3.dev |
|---|---|
| Message-ID | <a0510101db7fbbda379e4@[10.0.1.204]> |
Ok, I'm a little confused. Goal: I'm successfully grabbing artist/title info from the remote live365 stream from within Playlist.pm now, and I want to display it on the SliMP3. Problem: If I brute-force it (i.e., if I just call SliMP3::VFD::vfdUpdate), the data is displayed and the immediately replaced by the "Now playing (1 of 1)/title" display. Confusion: I understand that the display above is handled by the showPlayList() sub in Playlist.pm, but what I'm not understanding is how/where it decides what to display on the 2nd line. After looking over the code a bit, it would seem to display whatever's in the $client->playlist as indexed by $client->currentsong, but attempting to create a playlist containing the appropriate data and pointing to it fails. Specifically, it assumes I've scrolled, and goes and calls things like isFile() and such. This control goes through SliMP3::Playlist::executecommand(), you could use: SliMP3::Playlist::executecommand($client,"playlist", "play", $thepathorurlyouwishtoplay); then use: SliMP3::Playlist::showPlaylist($client); to update the display. Right now the metadata is either extracted from the file (in the case of a local file path or file: URL) or from the path (in the case of an HTTP url.) Problem is, that you want to have metadata that's gathered separately and cached. Sean and I have talked about a metadata cache (to speed up HTTP serving), and this would help you out too. Wanna go ahead and add it? Otherwise, stub out your metadata somewhere obvious and I'll hook it into the cache when I get to it. I'm in the middle of tweaking the buttons per our discussions, so it'll have to wait a little bit.