libpytunes
libpytunes copied to clipboard
Are length and total_time same or different?
Spot-checking my library, these two fields seem to yield the same results. Is there any case where they're different? If not, should we drop one of them? Which one?
Which two fields please?
I can’t tell from your comment in the issue.
Thanks
Nathan
On 18 May 2017, at 07:54, Scot Hacker [email protected] wrote:
Spot-checking my library, these two fields seem to yield the same results. Is there any case where they're different? If not, should we drop one of them? Which one?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Per the ticket title - length and total_time
(song.length
and song.total_time
)
They seem to be the same (modulo conversion to int
): https://github.com/liamks/libpytunes/blob/master/libpytunes/Library.py#L82 says:
s.length = int(attributes.get('Total Time')) if attributes.get('Total Time') else None
The XML calls it Total Time.