mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 12:19:27 +00:00
Merge remote-tracking branch 'doskir/master' into develop
This commit is contained in:
@@ -285,14 +285,7 @@ def getReleaseGroup(rgid):
|
||||
time.sleep(5)
|
||||
|
||||
if not releaseResult:
|
||||
continue
|
||||
|
||||
#skip releases that do not have any release date associated with them
|
||||
#if we don't do this the albums will get the release date "None" and will
|
||||
#automatically be set to wanted if "Automatically Mark Upcoming Albums as Wanted" is set
|
||||
#because None is not a valid date and will never be in the past so it is always upcoming
|
||||
if 'date' not in releaseResult:
|
||||
continue
|
||||
continue
|
||||
|
||||
if releaseGroup['type'] == 'live' and releaseResult['status'] != 'Official':
|
||||
logger.debug('%s is not an official live album. Skipping' % releaseResult.name)
|
||||
@@ -342,7 +335,7 @@ def getReleaseGroup(rgid):
|
||||
'asin': unicode(releaseResult.get('asin')) if 'asin' in releaseResult else None,
|
||||
'trackscount': totalTracks,
|
||||
'releaseid': unicode(releaseResult.get('id')),
|
||||
'releasedate': unicode(releaseResult.get('date')),
|
||||
'releasedate': unicode(releaseResult.get('date')) if 'date' in releaseResult else None,
|
||||
'format': format,
|
||||
'country': country
|
||||
}
|
||||
@@ -350,6 +343,9 @@ def getReleaseGroup(rgid):
|
||||
releaselist.append(release_dict)
|
||||
#necessary to make dates that miss the month and/or day show up after full dates
|
||||
def getSortableReleaseDate(releaseDate):
|
||||
if releaseDate == None:
|
||||
return 'None';#change this value to change the sorting behaviour of none, returning 'None' will put it at the top
|
||||
#which was normal behaviour for pre-ngs versions
|
||||
if releaseDate.count('-') == 2:
|
||||
return releaseDate
|
||||
elif releaseDate.count('-') == 1:
|
||||
@@ -366,7 +362,7 @@ def getReleaseGroup(rgid):
|
||||
a = multikeysort(releaselist, ['-hasasin', 'country', 'format', 'trackscount_delta'])
|
||||
|
||||
release_dict = {'releaseid' :a[0]['releaseid'],
|
||||
'releasedate' : unicode(releaselist[0]['releasedate']),
|
||||
'releasedate' : releaselist[0]['releasedate'],
|
||||
'trackcount' : a[0]['trackscount'],
|
||||
'tracks' : a[0]['tracks'],
|
||||
'asin' : a[0]['asin'],
|
||||
|
||||
Reference in New Issue
Block a user