stephen / nodetunes

AirTunes v2 Server implementation
215 stars 64 forks source link

Extend onMetaChange response data #38

Closed kylewelsby closed 3 years ago

kylewelsby commented 8 years ago

I have taken the liberty of building a library that decodes the application/x-dmap-tagged response and converts the content into a manageable JSON response. Its called node-daap.

There are now two verities. metadataChange which retains backwards compatibility but with more content. and metadataChangePretty which changes the key's to human readable names.

example.

{
    "dmap.itemkind": 2,
    "daap.songalbum": "Beat Tape 2",
    "daap.songartist": "Tom Misch",
    "daap.songbitrate": 256,
    "daap.songcompilation": 0,
    "dmap.itemdateadded": 1447281526,
    "daap.songdateadded": 1447281526,
    "dmap.itemdateplayed": 1447528517,
    "daap.songdateplayed": 1447528517,
    "daap.songdatemodified": 1447281587,
    "daap.songdisccount": 1,
    "daap.songdiscnumber": 1,
    "daap.songgenre": "Alternative",
    "daap.songdescription": "Purchased AAC audio file",
    "daap.songrelativevolume": 0,
    "daap.songsamplerate": 44100,
    "daap.songsize": 9194382,
    "daap.songstarttime ": 0,
    "daap.songstoptime ": 0,
    "daap.songtime": 257328,
    "daap.songtrackcount": 12,
    "daap.songtracknumber": 7,
    "daap.songuserrating": 0,
    "daap.songyear": 2015,
    "daap.songformat": "m4a",
    "dmap.itemid": 25588,
    "dmap.itemname": "Come Back",
    "dmap.persistentid": 7136977865545740000,
    "daap.songdisabled": 0,
    "com.apple.itunes.norm-volume": 1305,
    "daap.songdatakind": 0,
    "daap.songsbeatsperminute": 0,
    "daap.songcodectype": 1836069985,
    "daap.songcodecsubtype": 2,
    "com.apple.itunes.is-podcast": 0,
    "daap.songcontentrating": 0,
    "com.apple.itunes.has-video": 0,
    "com.apple.itunes.mediakind": 1,
    "com.apple.itunes.episode-sort": 0,
    "com.apple.itunes.season-num": 0,
    "com.apple.itunes.gapless-heur": 1,
    "com.apple.itunes.gapless-enc-dr": 730,
    "com.apple.itunes.gapless-dur": 11348198,
    "com.apple.itunes.gapless-resy": 0,
    "com.apple.itunes.gapless-enc-del": 2112,
    "daap.songalbumartist": "Tom Misch",
    "daap.songgapless": 0,
    "dmap.objectextradata": 1,
    "daap.songextradata": 1,
    "daap.songhasbeenplayed": 1,
    "daap.sortname": "Come Back",
    "daap.sortartist": "Tom Misch",
    "daap.sortalbum": "Beat Tape 2",
    "daap.bookmarkable": 0,
    "daap.songalbumid": -5712788265707270000,
    "daap.songlongsize": 9194382,
    "com.apple.itunes.store-pers-id": 1023678734,
    "com.apple.itunes.drm-versions": 0,
    "com.apple.itunes.drm-platform-id": 0,
    "com.apple.itunes.drm-user-id": 0,
    "com.apple.itunes.non-drm-user-id": 171200441,
    "com.apple.itunes.drm-key1-id": 0,
    "com.apple.itunes.drm-key2-id": 0,
    "com.apple.itunes.drm-downloader-user-id": 0,
    "com.apple.itunes.drm-family-id": 0,
    "com.apple.itunes.xid": "AWALUK:isrc:GBWWP1501117",
    "com.apple.itunes.extended-media-kind": 0,
    "com.apple.itunes.movie-info-xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>asset-info</key>\n\t<dict>\n\t\t<key>file-size</key>\n\t\t<integer>9194382</integer>\n\t\t<key>flavor</key>\n\t\t<string>2:256</string>\n\t</dict>\n</dict>\n</plist>\n",
    "daap.songuserplaycount": 1,
    "daap.songartistid": -6588044044045134000,
    "com.apple.itunes.artworkchecksum": 91252,
    "daap.songuserskipcount": 0,
    "daap.songlastskipdate": -2082844800,
    "dmap.downloadstatus": 1,
    "daap.songexcludefromshuffle": 0,
    "daap.songuserratingstatus": 0,
    "daap.songalbumuserrating": 0,
    "daap.songalbumuserratingstatus": 32,
    "com.apple.itunes.can-be-genius-seed": 1,
    "com.apple.itunes.liked-state": 0,
    "com.apple.itunes.store.album-liked-state": 0
}
kylewelsby commented 3 years ago

Closing due to inactivity