openairplay / airplay2-receiver

AirPlay 2 Receiver - Python implementation
2.13k stars 133 forks source link

DAAP parser #28

Closed levvij closed 3 years ago

levvij commented 3 years ago

Thank you for this awesome project! I added a simple DAAP parser and added artwork* and events.bin to .gitignore

systemcrash commented 3 years ago

How about more comprehensive DAAP?

0x6173616C /* 'asal' */, "daap.songalbum"
0x61736172 /* 'asar' */, "daap.songartist"
0x61736370 /* 'ascp' */, "daap.songcomposer"
0x61736372 /* 'ascr' */, "daap.songcontentrating"
0x6173646B /* 'asdk' */, "daap.songdatakind"
0x61736463 /* 'asdc' */, "daap.songdisccount"
0x6173646E /* 'asdn' */, "daap.songdiscnumber"
0x6173676E /* 'asgn' */, "daap.songgenre"
0x6173746D /* 'astm' */, "daap.songtime"
0x61737463 /* 'astc' */, "daap.songtrackcount"
0x6173746E /* 'astn' */, "daap.songtracknumber"
0x63617073 /* 'caps' */, "dacp.playerstate"
0x6D636E61 /* 'mcna' */, "dmap.contentcodesname"
0x6D636E6D /* 'mcnm' */, "dmap.contentcodesnumber"
0x6D637479 /* 'mcty' */, "dmap.contentcodestype"
0x6D64636C /* 'mdcl' */, "dmap.dictionary"
0x6D696964 /* 'miid' */, "dmap.itemid"
0x6D696E6D /* 'minm' */, "dmap.itemname"
0x6D6C6974 /* 'mlit' */, "dmap.listingitem"
0x6D706572 /* 'mper' */, "dmap.persistentid"
0x6D737276 /* 'msrv' */, "dmap.serverinforesponse"
0x6D737474 /* 'mstt' */, "dmap.status"
0x6D737473 /* 'msts' */, "dmap.statusstring"
0x61655349 /* 'aeSI' */, "com.apple.itunes.itms-songid"
systemcrash commented 3 years ago

See here for inspiration ;)

Neustradamus commented 3 years ago

@systemcrash: Are you okay for merging?

systemcrash commented 3 years ago

Not really. I think it's better to have what we have, than a broken 'something'. The PR contains code which might work, assuming that ALBUM and ARTIST etc are in the order that the code picks them with read_text_frame() . But this may not always be the case. The linked code (in C) which I linked to has a much more comprehensive handling of these blobs, and is not complicated to implement, I think.

Many people turn to this project because they want a quick tool which works. Compiling C is not fun for most people. The main goal of this tool is to eventually have a working model to convert to C, if I understand correctly, but as long as this works for those who are in a pinch, even better.

glmnet commented 3 years ago

I've been using this without issues for a while. If the code is probably buggy May be a try except on the parser call will be enough to not stop the show

levvij commented 3 years ago

I see @systemcrash point, I just added it for simple parsing of the data but this is not stable code at all.

I couldn't find proper documentation of the format. I'd be happy to implement it if you can give me a link to some doc!

systemcrash commented 3 years ago

I see @systemcrash point, I just added it for simple parsing of the data but this is not stable code at all.

I couldn't find proper documentation of the format. I'd be happy to implement it if you can give me a link to some doc!

Thanks for the PR! We welcome contributions.

See https://github.com/openairplay/airplay2-receiver/pull/30 for how it should be done

If you see anything else worth hacking away at, fire away 😄

systemcrash commented 3 years ago

Recommend closing this PR, since #30 works correctly.