Форум » Feedback & Ideas

RDF suggestions

 
    • CloCkWeRX пишет...
    • Пользователь
    • Сен 28 2004, 10:21

    RDF suggestions

    Hey guys:
    My name is Dan and I'll be your semwebber for this flight.
    I'm trying to author as much RDF for audioscrobbler as possible; for everything from FOAF to better feed information.

    I need encouragement however:
    -List links in this forum to feature requests related to RSS / RDF etc
    -Ideas for views of the data you'd like available as RDF.

    Top Tracks of Artist
    ...
    What else!

    • insane822 пишет...
    • Пользователь
    • Сен 28 2004, 16:11
    On the history feed, if only there was a way to know if the latest track is currently playing or not..

    • CortJstr пишет...
    • Пользователь
    • Сен 28 2004, 16:30
    I dunno if it's possible but I'd like to see album info included

    Want to eat your cake and have it too? Try new Schröedinger's Cake!
    Were you 1979 born?

    • [Удаленный пользователь] пишет...
    • Пользователь
    • Сен 28 2004, 17:20

    album info

    Album info is already in the "recent tracks" feed.

    A separate "recent albums" feed (most likely covering a longer timespan than the "recent tracks") would be cool.

    • CloCkWeRX пишет...
    • Пользователь
    • Сен 29 2004, 20:18
    On the history feed, if only there was a way to know if the latest track is currently playing or not..

    (1) Compare rdf:RDFchanneldc:date to rdf:RDFitemsdate - latest track should match.
    (2) dc:date fields are in ISO format (Link).

    For instance, I live in adelaide (+0930GMT), so I get my current time in ISO format and compare it to the feed build date

    Feed:
    2004-09-30T05:38:43+00:00
    Local:
    2004-09-31T05:38:43+09:30

    Means that the data here is hours old.

    05:38:43 - 09:30:00 =
    2004-09-30T:20:08:43+0:00

    So you can take a guess, assuming the average track length to be around 4 minutes, as to whether its still playing or not.
    Does that help?

    Отредактировано: CloCkWeRX Сен 29 2004, 20:19
    • CloCkWeRX пишет...
    • Пользователь
    • Сен 29 2004, 20:23

    Re: album info

    Quoth cron:
    Album info is already in the "recent tracks" feed.

    A separate "recent albums" feed (most likely covering a longer timespan than the "recent tracks") would be cool.


    See where it says http://mm.musicbrainz.org/track/MBIDHERE? Once that gets working, you can just query the musicbrainz web service for further information.

    http://mm.musicbrainz.org/mm-2.1/track/a423ed6d-b2e6-4d4f-b68e-4b3eb54b99d1
    For instance.
    I'll pester Russ / RJ about getting that working in the near future.

    • RJ пишет...
    • Alumni
    • Сен 30 2004, 11:08

    MBIDHERE

    Yeah we have lots of artists linked to MB already (see the musibrainz icon on artist pages)

    no tracks/albums linked yet. been talking to rob about it a bit, we'll put together a decent way of getting things connected soon :)

    Information wants to be beer.
    • shaneh пишет...
    • Пользователь
    • Окт 1 2004, 6:10
    Using my scripting plugin from here:
    http://forums.winamp.com/showthread.php?s=&threadid=191641&perpage=40&pagenumber=3

    Ive created the following script:
    ----------

    dim xmlhttp

    set xmlhttp = CreateObject("Msxml2.XMLHTTP.4.0")

    xmlhttp.Open "GET", "http://ws.audioscrobbler.com/rdf/history/shaneh";, false
    xmlhttp.Send
    set res = xmlhttp.responseXML

    ns = "xmlns:asx='http://purl.org/rss/1.0/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:mm='http://musicbrainz.org/mm/mm-2.1#'"

    res.setProperty "SelectionNamespaces", ns

    set nl = res.documentElement.selectNodes("asx:item")

    tx = "Your last 10 songs : " + VbCrLf + VBCrLf

    for each song in nl
    tx = tx + song.selectSingleNode("mm:Artist/dc:creator/dc:title").text + " - " + song.selectSingleNode("dc:title").text + VBCrLf
    next

    msgbox tx
    quit

    -----------

    Id really appreciate the feed for top songs from artists etc. I intend to be able to just right click a song in winamp and click 'enqueue top songs'. This will fire a script similar to the above and do ml queries to find the songs and enqueue them.

    Any other services which can be tied into this plugin in some creative ways would be cool. ie, a service which lets you query the recommended artists, then I would go query the top songs for those artists, then attempt to enqueue them.

    Also a 'top songs' service, so when I code my web interface, when you find a user you can enqueue their top songs etc.

    Id still like to see a custom protocol handler such as "as://song" with a link with every song displayed. This would allow you to create a protocol handler which looks on your local system for the file and enqueue it.

    Отредактировано: shaneh Окт 1 2004, 6:35
    • shaneh пишет...
    • Пользователь
    • Окт 1 2004, 7:15
    Also, trying to parse the html as XML gives all sorts of errors with &nbsp. I think you need to do something with &#160 or something. Im not sure, but I cant get it to work unfortuantly.

    set xmlhttp = CreateObject("Msxml2.XMLHTTP.4.0")
    set xmlDoc = CreateObject("Msxml2.DOMDocument.4.0")

    xmlhttp.Open "GET", "http://www.audioscrobbler.com/";, false
    xmlhttp.Send

    res = xmlhttp.responseText
    xmldoc.validateonparse = false
    xmldoc.resolveexternals = false

    xmldoc.loadxml(res)

    If (xmlDoc.parseError.errorCode <> 0) Then
    Dim myErr
    Set myErr = xmlDoc.parseError
    MsgBox(myerr.reason + " " + myErr.srctext)
    end if


    edit: Id also like to see feeds for most of the chart info too, for basically the same reason.

    Отредактировано: shaneh Окт 1 2004, 12:20
    • shaneh пишет...
    • Пользователь
    • Окт 2 2004, 2:19
    I have just stripped the '&'s from the HTML and it seems to parse ok. To demonstrate this, I have written a script which enqueues the top songs for an artist by just right clicking the artist in the playlist of winamp.

    http://forums.winamp.com/showthread.php?postid=1486379#post1486379


    Though I think if AS adds something like 'ENTITY nbsp' to its pages this '&' stripping may not be necessary.

    Отредактировано: shaneh Окт 2 2004, 2:44
    • CloCkWeRX пишет...
    • Пользователь
    • Окт 4 2004, 4:56

    Nifty plugin

    Very Oooh. We await the completion and release of it like salivating hounds.

    Отредактировано: CloCkWeRX Окт 4 2004, 5:04
    • shaneh пишет...
    • Пользователь
    • Окт 5 2004, 6:37
    HTTP request sent, awaiting response...
    1 HTTP/1.1 200 OK
    2 Date: Tue, 05 Oct 2004 06:34:53 GMT
    3 Server: Apache/1.3.31 (Unix) PHP/4.3.9
    4 X-Powered-By: PHP/4.3.9
    5 Vary: Cookie
    6 Last-Modified: Thu, 01 Jan 1970 00:00:00
    7 Connection: close
    8 Content-Type: text/xml;charset=utf-8

    wget'd on Tuesday 5 October. Note the 'Last-Modified' header and the lack of an Expires header. You continually get stale data if you have a cache. Adding an Expires header of a minute or two in advance should fix the problem.

    edit: The problem is partially at my end, a hard refresh causes it to be refetched. I can append ?rand=<random> or something to the URL to avoid the system cache.

    However fixing this header may prevent this need, and would avoid filling the cache with "different" pages which are really the same url.

    Отредактировано: shaneh Окт 5 2004, 7:17
    • WALoeIII пишет...
    • Пользователь
    • Окт 14 2004, 2:47
    I'm having a hard time converting the date in PHP. strtotime() (http://php.net/strtotime) doesn't know what to do with the time that I get. I'd like to print the time like 10:38am EST.

    • mpe пишет...
    • Подписчик
    • Окт 16 2004, 11:04

    AS RDF Resources differ from MB resources

    I just noticed that the AudioScrobbler RDF uses resources like "http://mm.musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458"; while the MusicBrainz RDF webservice uses "http://musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458";, without the 'mm' subdomain.

    I haven't used the AusioScrobbler data yet but it seems to me this wil make it impossible to merge the 2 graphs together in a clean way.
    For example when I query MB with this RDF:

    <mq:FindArtist >
    <mq:depth>3</mq:depth>
    <mq:artistName>Nick Drake</mq:artistName>
    </mq:FindArtist >

    MB responds with:

    <mq:Result>
    <mq:status>OK</mq:status>
    <mm:artistList>
    <rdf:Bag>
    <rdf:li rdf:resource="http://musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458"/>;
    </rdf:Bag>
    </mm:artistList>
    </mq:Result>
    [...]

    while AS identifies "Nick Drake" by: http://mm.musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458
    These resources do no match so the AS graph cannot be merged with MB's graph. The URL's do link to the same location btw.

    Will AudioScrobbler match its RDF resources with MB? what be nice too is to have the MB ID available in the RDF, now its embedded in a uri. Also, I'd love more stats offered through an AS RDF webservice but I'm not sure yet how this data would look like. I'd say AS needs its own namespace with classes en properties aimed at popularity stats/collaborative filtering of audio files, maybe this could be in the MusicBrainz Extended Metatadata namespace [MEM]. I'm not sure what MB has in mind for their RDF. Does anyone has ideas for this?

    Отредактировано: mpe Окт 16 2004, 11:21
    • CloCkWeRX пишет...
    • Пользователь
    • Окт 17 2004, 23:03

    Re:

    Quoth WALoeIII:
    I'm having a hard time converting the date in PHP. strtotime() (http://php.net/strtotime) doesn't know what to do with the time that I get. I'd like to print the time like 10:38am EST.


    Time in rss feed:

    2004-10-17T22:55:17+00:00


    What strtotime likes:

    $date_time2 = strtotime("2004-04-04 02:00:00 GMT");


    So... you have to be clever.


    <?php
    function as_strtotime($string)
    {
    list($Y, $M, $d, $h, $m, $s, $z1, $z2, $z3, $z) = sscanf($string, "%4d-%2d-%2dT%2d:%2d:%2d %1s%2d:%2d%3s");
    return strtotime("$d $M $y $h:$m:$s $z1$z2:$z3 $z");
    }
    ?>


    Mind you, that is off the top of my head. But it gives you an example of what to do.

    • CloCkWeRX пишет...
    • Пользователь
    • Окт 17 2004, 23:13

    Re: AS RDF Resources differ from MB resources

    Quoth mpe:
    I just noticed that the AudioScrobbler RDF uses resources like "http://mm.musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458"; while the MusicBrainz RDF webservice uses "http://musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458";, without the 'mm' subdomain.

    I haven't used the AusioScrobbler data yet but it seems to me this wil make it impossible to merge the 2 graphs together in a clean way.
    For example when I query MB with this RDF:

    <mq:FindArtist >
    <mq:depth>3</mq:depth>
    <mq:artistName>Nick Drake</mq:artistName>
    </mq:FindArtist >

    MB responds with:

    <mq:Result>
    <mq:status>OK</mq:status>
    <mm:artistList>
    <rdf:Bag>
    <rdf:li rdf:resource="http://musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458"/>;
    </rdf:Bag>
    </mm:artistList>
    </mq:Result>
    [...]

    while AS identifies "Nick Drake" by: http://mm.musicbrainz.org/artist/99ea432a-e3d8-42cb-9d5e-db316a6a8458
    These resources do no match so the AS graph cannot be merged with MB's graph. The URL's do link to the same location btw.

    Will AudioScrobbler match its RDF resources with MB? what be nice too is to have the MB ID available in the RDF, now its embedded in a uri. Also, I'd love more stats offered through an AS RDF webservice but I'm not sure yet how this data would look like. I'd say AS needs its own namespace with classes en properties aimed at popularity stats/collaborative filtering of audio files, maybe this could be in the MusicBrainz Extended Metatadata namespace [MEM]. I'm not sure what MB has in mind for their RDF. Does anyone has ideas for this?



    A pickle indeed. One solution (which is a hack) is to strip out all the mm.musicbrainz.org and musicbrainz.org and replace with an XML entity, ie, &mb; before it ever touches your parser. Not a good thing to do but a temporary fix till this gets resolved.
    I'll follow up on it at some time or another.

    http://www.ahsonline.com.au/audioscrobbler.owl is a draft ontology which is the purpose of this thread: gaining ideas pf the type of data it will need to represent and export.

    Feedback is more than welcomed.

    • riwilo пишет...
    • Пользователь
    • Окт 22 2004, 14:34

    LastModified

    Hi there,

    I'm not sure wether this is the proper place to post my question here, but since it is RDF related I think I'm on the right spot.

    I'm using SharpReader to monitor things that people played recently, but it doesn't update after initual subscription to the RDF. It seems like it doesn't want to update because in the HTTP header it gets the page last modified time in 1970 instead of the actual last update of the RDF. I hope you can fix this so that the http headers reflect the time of the last change.

    Best regards,
    Richard

    • CloCkWeRX пишет...
    • Пользователь
    • Окт 22 2004, 16:45

    Re: LastModified

    Quoth riwilo:
    Hi there,

    I'm not sure wether this is the proper place to post my question here, but since it is RDF related I think I'm on the right spot.

    I'm using SharpReader to monitor things that people played recently, but it doesn't update after initual subscription to the RDF. It seems like it doesn't want to update because in the HTTP header it gets the page last modified time in 1970 instead of the actual last update of the RDF. I hope you can fix this so that the http headers reflect the time of the last change.

    Best regards,
    Richard


    Well spotted, it's in the mailing list and should be fixed in the near future (I hope)

    • Coded пишет...
    • Пользователь
    • Окт 23 2004, 4:37

    Group Feeds

    A group rss feed that I could use to post the top "x" number of songs from a group on my site would rock.

    I run a music community site and a few readers and I have started a group here. I'd be willing to write a plugin for the CMS I use (e107 - similar to *Nuke) that other sites could use as well.

    Integration of group stats into various CMS's would kick mucho a$$.

    • shaneh пишет...
    • Пользователь
    • Окт 23 2004, 10:32
    @~riwilo: I posted this problem a couple weeks ago (see a few posts back). Appending some random data to the URL bypasses your cache if you are able to do that. Otherwise a Ctrl-F5 refresh forces a re-load, not necessarily possible using an RSS reader.

    • CloCkWeRX пишет...
    • Пользователь
    • Окт 24 2004, 21:39

    Lots of RDF

    Newly Authored FOAF / RDF...

    Authored for audioscrobbler, pending implementation in a few weeks to a month.

    Soliciting feedback and "missing stuff".

    Comments to daniel.oconnor@gmail.com or reply here.

    • aliguana пишет...
    • Пользователь
    • Окт 31 2004, 22:09

    Seconding...

    .. the call for RSS on group pages. I too run a music site, and would love to call the group RSS.

    On The Fiddle
    • tydes пишет...
    • Пользователь
    • Ноя 4 2004, 20:39

    Thirding...

    for RSS on group pages. As part of a music site, I would love to be able to see these group stats linked on our site.

    • CloCkWeRX пишет...
    • Пользователь
    • Ноя 5 2004, 4:35

    Alrighty. RSS for group pages

    Alright, that's a must have, any other suggestions?

    • shaneh пишет...
    • Пользователь
    • Ноя 5 2004, 5:58
    I think its been mentioned, but feeds for top songs for an artist would also be good. I think it should be implemented as a web service rather than a feed - though I realise theres not a hell of a lot of difference between the two.

    Feeds for all the charts too.

Анонимные пользователи не могут оставлять сообщения. Для того, чтобы писать в форумах, пожалуйста, войди на сайт или создай аккаунт.