PDA

View Full Version : Skinning Question



JJZolx
2005-07-08, 23:06
When at a browse level that lists tracks, for example:

Home / Browse Artists / The Band / Rock of Ages

is there any means of accessing the songinfo for the individual tracks or is that data only exposed on the songinfo.html page?

Two things I'd like to try on the above page: 1) List the song duration and 2) Use JavaScript for mouseovers that would display the detailed track info here instead of having to descend another level.

If this info isn't exposed, is there any way to do this from within a skin, without altering the Perl code? Can you execute a query from within a template and then access the results?

kdf
2005-07-08, 23:24
On 8-Jul-05, at 11:06 PM, JJZolx wrote:

>
> When at a browse level that lists tracks, for example:
>
> Home / Browse Artists / The Band / Rock of Ages
>
> is there any means of accessing the songinfo for the individual tracks
> or is that data only exposed on the songinfo.html page?
>
> Two things I'd like to try on the above page: 1) List the song duration
> and 2) Use JavaScript for mouseovers that would display the detailed
> track info here instead of having to descend another level.
>
> If this info isn't exposed, is there any way to do this from within a
> skin, without altering the Perl code? Can you execute a query from
> within a template and then access the results?
>
in many cases, itemObj is exposed at track level. If it is missing in
any places, then altering the code to fix that is certainly welcome.
I'll even help you do it if perl isn't your bag. Once the itemObj is
present, you can then call up any aspect of the track that's in the db
like so:

[% itemObj.title %]
[% itemObj.artist %]

look at the status_header.html files for more examples.

-kdf

JJZolx
2005-07-09, 19:39
On 8-Jul-05, at 11:06 PM, JJZolx wrote:

>
> When at a browse level that lists tracks, for example:
>
> Home / Browse Artists / The Band / Rock of Ages
>
> is there any means of accessing the songinfo for the individual tracks
> or is that data only exposed on the songinfo.html page?
>
> Two things I'd like to try on the above page: 1) List the song duration
> and 2) Use JavaScript for mouseovers that would display the detailed
> track info here instead of having to descend another level.
>
> If this info isn't exposed, is there any way to do this from within a
> skin, without altering the Perl code? Can you execute a query from
> within a template and then access the results?
>
>in many cases, itemObj is exposed at track level. If it is missing in
>any places, then altering the code to fix that is certainly welcome.
>I'll even help you do it if perl isn't your bag.

Correct me if I'm wrong, but I believe I'm talking about at the album level.

If I'm at

Home / Browse Artists / The Band / Rock of Ages

then I see a list of the album's tracks, with a fairly minimal amount of track information displayed. Enough to link to the songinfo.html page, or to play the track or add it to the playlist.

Would there be a way of requesting the browsedb.html page such that when the tracks are returned for an album (or perhaps the result of a search, or any other request that returns a list of tracks), you could access "all" the detailed information for those tracks? I'm guessing you wouldn't always want all that data if it's only used in browsing by certain skins, so seems like it might be better to explicitly request it.

Likewise, on a page displaying a list of albums, say at

Home / Browse Artists / Frank Sinatra

It would be nice to be able to access all the _tracks_ in those albums. Then some creative scripting could give you access to queue up any track from any album without descending another level. I'm thinking of an interface where the page first appears as it does now, but you'd have an "expand/contract" link to open up an area on the page displaying the album's tracks, with individual play/add links.

This might be looked at at something of a alternative to the AJAX approach, where you never even have to go back to the server for the information. The tradeoff being somewhat larger pages to be rendered at the browser.

[quote]Once the itemObj is present, you can then call up any aspect of the track that's in the db
like so:

[% itemObj.title %]
[% itemObj.artist %]

look at the status_header.html files for more examples.

Thanks. I looked at that and saw quite a bit of track.data type variables being referenced. Poking around in the browsedb.html pages I wasn't able to discover anything similar.

kdf
2005-07-09, 22:41
On 9-Jul-05, at 7:39 PM, JJZolx wrote:

>
> kdf Wrote:
>> On 8-Jul-05, at 11:06 PM, JJZolx wrote:
>>
>>>
>>> When at a browse level that lists tracks, for example:
>>>
>>> Home / Browse Artists / The Band / Rock of Ages
>>>
>>> is there any means of accessing the songinfo for the individual
>> tracks
>>> or is that data only exposed on the songinfo.html page?
>>>
>>> Two things I'd like to try on the above page: 1) List the song
>> duration
>>> and 2) Use JavaScript for mouseovers that would display the detailed
>>> track info here instead of having to descend another level.
>>>
>>> If this info isn't exposed, is there any way to do this from within
>> a
>>> skin, without altering the Perl code? Can you execute a query from
>>> within a template and then access the results?
>>>
>>> in many cases, itemObj is exposed at track level. If it is missing
>>> in
>>
>>> any places, then altering the code to fix that is certainly welcome.
>>
>>> I'll even help you do it if perl isn't your bag.
>>
>> Correct me if I'm wrong, but I believe I'm talking about at the album
>> level.

yes, you are.
>>
>> If I'm at
>>
>> Home / Browse Artists / The Band / Rock of Ages
>>
>> then I see a list of the album's tracks, with a fairly minimal amount
>> of track information displayed. Enough to link to the songinfo.html
>> page, or to play the track or add it to the playlist.

if you have a list of tracks, then the server could be changed to
supply the track object instead of all the items about a track. Much
the same way that songinfo does it, you'd then have the ability to
operate on all those available parts of the track object.

>>
>>
>> It would be nice to be able to access all the _tracks_ in those
>> albums.
>> Then some creative scripting could give you access to queue up any
>> track from any album without descending another level. I'm thinking
>> of
>> an interface where the page first appears as it does now, but you'd
>> have
>> an "expand/contract" link to open up an area on the page displaying
>> the
>> album's tracks, with individual play/add links.

This would be a bit more complex, because an album object only contains
a list of track ids.

>> Poking around in the browsedb.html pages
>> I wasn't able to discover anything similar.
>>

the track object isn't being served up in all places. I'm not sure
what the implications are for speed or memory use when including the
entire object. The code can certainly be simpler in most cases since
its just one param to deliver instead of several. It always seemed to
me to be a logical progression to use $itemObj a bit more. It might
already be in browseDB, with no skins using it. I haven't looked for
it specifically in the code for a while.

-kdf