liamks / libpytunes

Python Itunes Library parser
https://github.com/liamks/pyitunes
MIT License
220 stars 88 forks source link

Counts are off #7

Closed shacker closed 7 years ago

shacker commented 10 years ago

I'm seeing pretty big differences between the counts provided by pyitunes and iTunes itself. For example iTunes thinks I have 89,203 tracks but:

l = Library("iTunes Music Library.xml")

(Pdb) len(l.songs)
90744

Seeing similar discrepancies with playlist counts. Ideas?

liamks commented 10 years ago

I'm wondering if you have duplicate songs and iTunes knows to filter them out? Honestly though that seems unlikely that you have 1500 duplicates.

It's also possible that the itunes xml file has changed formats slightly since I first wrote this library. I'm going to leave this issue open until we get a few more confirmations. Hopefully it's a simple fix to the parser (assuming an incompatibility with a new version of the xml file).

shacker commented 10 years ago

That's possible. Also possible that iTunes doesn't count things like podcasts and voice memos? (I have quite a few of those).

Testing... yep, confirmed. Just noted my song count in iTunes, then deleted an old podcast subscription and all of its files. The track count did not change.

So, probably not a pyitunes issue after all.

liamks commented 10 years ago

Excellent. Until I note this issue on the Readme, I'm going to leave this open for others to read (If you have some free time and are able to update the readme with a description of your issue and its cause, I'd gladly accept the pull request).

rfilmyer commented 9 years ago

Something to note is that "Music" is stored in its own playlist, as opposed to "iTunes U", "TV Shows", "Podcasts", etc. So the counts should match if you compare the number of elements in the Music playlist to the iTunes count.

shacker commented 7 years ago

Thanks @rfilmyer . No longer an issue, closing.