In order to sync my iPod and my local music repository, I created a unique key for each track using its metadata. The unique track consists of the track's following metadata fields: artist, album, track number, duration. The iPod saves the track's duration in milliseconds, but my local repository saves it in seconds. For example: 437590 milliseconds on iPod is 438 seconds in my Local repository.
When I divide the ipod's track duration by 1000 I get 437. I tried using round(), but round (b.tracklen/1000) prints 437.
I can hack this by checking math.ceil(), math.floor() for the iPod duration if there is no match but it's a lousy solution.
What is the best approach to this issue?
if abs(numA - numB) < thresh: everything_looks_good();round(b.tracklen/1000.0)//operator for integer division.