You are here: Home » Topic » xslt to list tunes stored in mt-daapd

xslt to list tunes stored in mt-daapd

This topic contains 3 replies, has 2 voices, and was last updated by  rpedde 10 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #747

    barnseyboy
    Participant

    i have written a few chunks of xslt to get out my latest tunes. i have a playlist of ‘recently added’ which i get the xml for using ..


    GET /databases/1/containers/8/items?output=xml

    my xslt then goes through all the items and outputs the track name


    < ?xml version="1.0" encoding="ISO-8859-1"?>






    Recently Added














    Id Track Name







    i have an additional piece of xslt which can show all the details for an item when its clicked on.

    my problem is, i want to get out a little more information in the first list, such as album and artist. i looked through the api and cant find it. and for obvious reasons i dont want to go through every item and get its details as my recently added list may have 1000’s of items in it.

    1) is there a good way to get more information out from my initial listing (without having to call to get the full details of each track).
    2) is there any way of getting the underlying location or filename of the item.

    thanks in advance

    db

    #7153

    rpedde
    Participant

    @barnseyboy wrote:

    i have written a few chunks of xslt to get out my latest tunes. i have a playlist of ‘recently added’ which i get the xml for using ..

    my problem is, i want to get out a little more information in the first list, such as album and artist. i looked through the api and cant find it. and for obvious reasons i dont want to go through every item and get its details as my recently added list may have 1000’s of items in it.

    here is the reference for it.

    Generally, you can choose what info you get back from that query:

    get /databases/1/items/output=xml&meta=dmap.itemid,daap.songalbum,daap.songartist
    [/quote]

    Would get what you want (except the path).

    I could add a non-standard meta code for path, if that’s something you need.

    — Ron

    1) is there a good way to get more information out from my initial listing (without having to call to get the full details of each track).
    2) is there any way of getting the underlying location or filename of the item.

    thanks in advance

    db[/quote][code]

    get /databases/1/items/output=xml&meta=dmap.itemid,daap.songalbum,daap.songartist
    [/quote]

    Would get what you want (except the path).

    I could add a non-standard meta code for path, if that’s something you need.

    — Ron

    1) is there a good way to get more information out from my initial listing (without having to call to get the full details of each track).
    2) is there any way of getting the underlying location or filename of the item.

    thanks in advance

    db[/quote]

    #7154

    barnseyboy
    Participant

    great thanks. i missed the doc saying you could pass in ‘meta’ to dictate what items came back.

    the thing about getting access to the path, is that it would make it really easy to create rss out from mt-daapd with enclosures. this would be really useful for the psp, which can then be used as a music player from mt-daapd via rss.

    there would obviously be a few issues about the file being available via a url, and ‘something’ outside mt-daapd having to prepend on the http servername but do you kinda get my drift?

    some urls on this subject are ..

    rss spec for enclosures
    http://www.playstation.com/manual/psp/rss/en/spec.html

    heres a guy who has written an app to do this straight from itunes (including the webserver part)
    http://skattertech.com/2006/04/stream-itunes-library-to-psp/

    #7155

    rpedde
    Participant

    @barnseyboy wrote:

    the thing about getting access to the path, is that it would make it really easy to create rss out from mt-daapd with enclosures. this would be really useful for the psp, which can then be used as a music player from mt-daapd via rss.

    Gotcha. There is another way to get at the data, and that’s with RSP, which is closer to the database, and allows for retrieving all the fields (including path).

    What I *don’t* have right now is a way to specify what particular db fields you are interested.

    I could put that together, though.

    Let me see what I can put together this weekend.

    — Ron

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.