diff --git a/deemix/tagger.py b/deemix/tagger.py index ee5c543..ea577f4 100644 --- a/deemix/tagger.py +++ b/deemix/tagger.py @@ -90,7 +90,7 @@ def tagID3(path, track, save): if len(involved_people) > 0 and save['involvedPeople']: tag.add(IPLS(people=involved_people)) - if save['copyright']: + if save['copyright'] and track.copyright: tag.add(TCOP(text=track.copyright)) if save['savePlaylistAsCompilation'] and track.playlist or track.album.recordType == "compile": tag.add(TCMP(text="1")) @@ -201,7 +201,7 @@ def tagFLAC(path, track, save): elif role == 'musicpublisher' and save['involvedPeople']: tag["ORGANIZATION"] = track.contributors['musicpublisher'] - if save['copyright']: + if save['copyright'] and track.copyright: tag["COPYRIGHT"] = track.copyright if save['savePlaylistAsCompilation'] and track.playlist or track.album.recordType == "compile": tag["COMPILATION"] = "1" diff --git a/deemix/types/Album.py b/deemix/types/Album.py index 6238768..e95dae4 100644 --- a/deemix/types/Album.py +++ b/deemix/types/Album.py @@ -77,7 +77,7 @@ class Album: self.artist[artist['role']].append(artist['name']) self.trackTotal = albumAPI['nb_tracks'] - self.recordType = albumAPI['record_type'] + self.recordType = albumAPI.get('record_type', self.recordType) self.barcode = albumAPI.get('upc', self.barcode) self.label = albumAPI.get('label', self.label) @@ -92,7 +92,7 @@ class Album: self.date.fixDayMonth() self.discTotal = albumAPI.get('nb_disk', "1") - self.copyright = albumAPI.get('copyright') + self.copyright = albumAPI.get('copyright', "") if self.pic.md5 == "": if albumAPI.get('md5_image'):