1

Fix Release Dates

This commit is contained in:
Kim Wittenburg
2018-09-03 18:33:40 +02:00
parent e41983998a
commit 73b3de8985

View File

@@ -249,6 +249,9 @@ class SearchAPIPlugin(BeetsPlugin):
def make_album_info(self, album, matched=False):
tracks = [ self.make_track_info(track, index) for (index, track) in enumerate(album.get_tracks()) ]
year = int(album.release_date[0:4])
month = int(album.release_date[5:7])
day = int(album.release_date[8:10])
info = AlbumInfo(album.collection_name,
album.collection_id,
album.artist_name,
@@ -257,9 +260,9 @@ class SearchAPIPlugin(BeetsPlugin):
asin = None,
albumtype = None,
va = album.artist_id == VA_ARTIST_ID,
year = album.release_date[0:4],
month = album.release_date[5:7],
day = album.release_date[8:10],
year = year,
month = month,
day = day,
label = "iTunes Match" if matched else "iTunes Store",
mediums = album.get_tracks()[0].disc_count,
artist_sort = sort_string(album.artist_name),
@@ -271,10 +274,10 @@ class SearchAPIPlugin(BeetsPlugin):
albumstatus = None,
media = None,
albumdisambig = None,
artist_credit = None, # Or Artist?
original_year = None,
original_month = None,
original_day = None,
artist_credit = None,
original_year = year, # In order to eliminate the unneccessary year penalty
original_month = month, # See original_year
original_day = day, # See original_year
data_source = "iTunes",
data_url = album.collection_view_url)
info.album_sort = sort_string(album.collection_name)