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