diff --git a/lb_content_resolver/formats/flac.py b/lb_content_resolver/formats/flac.py index bc384c0..ae69778 100755 --- a/lb_content_resolver/formats/flac.py +++ b/lb_content_resolver/formats/flac.py @@ -19,7 +19,7 @@ def read(file): mdata["release_name"] = get_tag_value(tags, "album") mdata["recording_name"] = get_tag_value(tags, "title") mdata["track_num"] = extract_track_number(get_tag_value(tags, "tracknumber")) - mdata["disc_num"] = int(get_tag_value(tags, "discnumber")) + mdata["disc_num"] = int(get_tag_value(tags, "discnumber") or 1) mdata["artist_mbid"] = get_tag_value(tags, "musicbrainz_artistid") mdata["recording_mbid"] = get_tag_value(tags, "musicbrainz_trackid") mdata["release_mbid"] = get_tag_value(tags, "musicbrainz_albumid") diff --git a/lb_content_resolver/formats/mp3.py b/lb_content_resolver/formats/mp3.py index a4a442b..98ae4e9 100755 --- a/lb_content_resolver/formats/mp3.py +++ b/lb_content_resolver/formats/mp3.py @@ -45,7 +45,7 @@ def read(file): if "TPOS" in tags: mdata["disc_num"] = extract_track_number(str(tags["TPOS"])) else: - mdata["disc_num"] = 0 + mdata["disc_num"] = 1 if "TXXX:MusicBrainz Artist Id" in tags: id = str(tags["TXXX:MusicBrainz Artist Id"]) diff --git a/lb_content_resolver/formats/ogg_opus.py b/lb_content_resolver/formats/ogg_opus.py index 6de53c7..13ecf52 100755 --- a/lb_content_resolver/formats/ogg_opus.py +++ b/lb_content_resolver/formats/ogg_opus.py @@ -19,7 +19,7 @@ def read(file): mdata["release_name"] = get_tag_value(tags, "album") mdata["recording_name"] = get_tag_value(tags, "title") mdata["track_num"] = extract_track_number(get_tag_value(tags, "tracknumber")) - mdata["disc_num"] = int(get_tag_value(tags, "discnumber")) + mdata["disc_num"] = int(get_tag_value(tags, "discnumber") or 1) mdata["artist_mbid"] = get_tag_value(tags, "musicbrainz_artistid", "") mdata["recording_mbid"] = get_tag_value(tags, "musicbrainz_trackid", "") mdata["release_mbid"] = get_tag_value(tags, "musicbrainz_albumid", "") diff --git a/lb_content_resolver/formats/ogg_vorbis.py b/lb_content_resolver/formats/ogg_vorbis.py index fcf1b9b..9f76463 100755 --- a/lb_content_resolver/formats/ogg_vorbis.py +++ b/lb_content_resolver/formats/ogg_vorbis.py @@ -19,7 +19,7 @@ def read(file): mdata["release_name"] = get_tag_value(tags, "album") mdata["recording_name"] = get_tag_value(tags, "title") mdata["track_num"] = extract_track_number(get_tag_value(tags, "tracknumber")) - mdata["disc_num"] = int(get_tag_value(tags, "discnumber")) + mdata["disc_num"] = int(get_tag_value(tags, "discnumber") or 1) mdata["artist_mbid"] = get_tag_value(tags, "musicbrainz_artistid", "") mdata["recording_mbid"] = get_tag_value(tags, "musicbrainz_trackid", "") mdata["release_mbid"] = get_tag_value(tags, "musicbrainz_albumid", "") diff --git a/lb_content_resolver/formats/wma.py b/lb_content_resolver/formats/wma.py index 040abd8..bde38e9 100755 --- a/lb_content_resolver/formats/wma.py +++ b/lb_content_resolver/formats/wma.py @@ -19,7 +19,7 @@ def read(file): mdata["release_name"] = str(get_tag_value(tags, "WM/AlbumTitle")) mdata["recording_name"] = str(get_tag_value(tags, "Title")) mdata["track_num"] = extract_track_number(str(get_tag_value(tags, "WM/TrackNumber"))) - mdata["disc_num"] = int(get_tag_value(tags, "WM/SetSubTitle")) + mdata["disc_num"] = int(get_tag_value(tags, "WM/SetSubTitle") or 1) mdata["artist_mbid"] = str(get_tag_value(tags, "MusicBrainz/Artist Id")) mdata["recording_mbid"] = str(get_tag_value(tags, "MusicBrainz/Release Track Id")) mdata["release_mbid"] = str(get_tag_value(tags, "MusicBrainz/Album Id"))