'Determine if a song was skipped or not and update its attributes.
To this end the difference between the song\'s supposed end time
and the current time is calculated. If it\'s greater than a threshold,
the song is considered skipped.
Returns whether the change was manual (skipped previous song or not)'

def handle_song_change(self, song):

    diff = abs((song['remaining'] - (time.time() - song['started'])))
    skipped = (diff >= self.time_threshold)
    if skipped:
        self.handle_skipped(song)
    else:
        self.handle_played(song)
    if self.do_rating:
        self.update_rating(song['beets_item'], skipped)
    return skipped
