View Single Post
Old 05-28-2011, 07:19 PM   #28
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
my changes (tested only by me):
Spoiler:

Code:
    def _remove_itunes_plist(self, container):
        self.log('\tLooking for iTunes files')
        removed_itunes_total = 0
        for name in list(container.name_map.keys()):
            if name == 'iTunesMetadata.plist':
                self.log('\tFound iTunes plist file to remove')
                container.delete_name(name)
                removed_itunes_total += 1
            if name == 'iTunesArtwork':
                self.log('\tFound iTunesArtwork file to remove')
                container.delete_name(name)
                removed_itunes_total += 1
            if removed_itunes_total == 2:
                return True
        if removed_itunes_total == 1:
            return True
        return False

Last edited by drMerry; 05-28-2011 at 07:23 PM.
drMerry is offline   Reply With Quote