Finished implementing "Create folder structure for singles"
Now the app saves the cover in the folder and uses the album track template for naming
This commit is contained in:
parent
3c120251c1
commit
0be0e8370e
|
@ -789,6 +789,10 @@ def after_download_single(track, settings, queueItem):
|
|||
return None
|
||||
if 'extrasPath' not in track:
|
||||
track['extrasPath'] = settings['downloadLocation']
|
||||
if settings['saveArtwork'] and 'albumPath' in track:
|
||||
downloadImage(track['albumURL'], track['albumPath'])
|
||||
if settings['saveArtworkArtist'] and 'artistPath' in track:
|
||||
downloadImage(track['artistURL'], track['artistPath'])
|
||||
if settings['logSearched'] and 'searched' in track:
|
||||
with open(os.path.join(track['extrasPath'], 'searched.txt'), 'wb+') as f:
|
||||
orig = f.read().decode('utf-8')
|
||||
|
|
|
@ -51,6 +51,9 @@ def generateQueueItem(dz, sp, url, settings, bitrate=None, albumAPI=None, interf
|
|||
trackAPI = dz.get_track_gw(id)
|
||||
if albumAPI:
|
||||
trackAPI['_EXTRA_ALBUM'] = albumAPI
|
||||
if settings['createSingleFolder']:
|
||||
trackAPI['FILENAME_TEMPLATE'] = settings['albumTracknameTemplate']
|
||||
else:
|
||||
trackAPI['FILENAME_TEMPLATE'] = settings['tracknameTemplate']
|
||||
trackAPI['SINGLE_TRACK'] = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue