Fix #2931
This commit is contained in:
Kallys
2017-04-30 14:00:10 +02:00
parent bc0ce99adf
commit cd2860f4e3
3 changed files with 13 additions and 3 deletions
+7 -1
View File
@@ -335,12 +335,18 @@
</label> </label>
<input type="text" name="aria_token" value="${config['aria_token']}" size="36"> <input type="text" name="aria_token" value="${config['aria_token']}" size="36">
</div> </div>
<div class="row">
<small>Note: With Aria2, you can specify a different download directory for downloads sent from Headphones.
Set it in the Music Download Directory below</small>
</div>
</fieldset>
<fieldset id="general_ddl_options">
<div class="row"> <div class="row">
<label title="Path to folder where Headphones can find the downloads."> <label title="Path to folder where Headphones can find the downloads.">
Music Download Directory: Music Download Directory:
</label> </label>
<input type="text" name="download_ddl_dir" value="${config['download_ddl_dir']}" size="50"> <input type="text" name="download_ddl_dir" value="${config['download_ddl_dir']}" size="50">
<small>Full path where ddl client downloads your music, e.g. /Users/name/Downloads/music</small> <small>Full path where your direct download client downloads your music, e.g. /Users/name/Downloads/music</small>
</div> </div>
</fieldset> </fieldset>
</td> </td>
+2 -1
View File
@@ -350,6 +350,7 @@ def decryptTracks(paths):
decrypted_tracks[album_folder][disk_number] = {} decrypted_tracks[album_folder][disk_number] = {}
decrypted_tracks[album_folder][disk_number][track_number] = track decrypted_tracks[album_folder][disk_number][track_number] = track
decrypted_tracks[album_folder][disk_number][track_number]['path'] = path
except Exception as e: except Exception as e:
logger.error(u'Unable to load deezer track infos "%s": %s' % (path, e)) logger.error(u'Unable to load deezer track infos "%s": %s' % (path, e))
@@ -371,7 +372,7 @@ def decryptTracks(paths):
# Decrypt track if not already done # Decrypt track if not already done
if not os.path.exists(dest): if not os.path.exists(dest):
try: try:
__decryptDownload(path, sng_id, dest) __decryptDownload(track['path'], track['SNG_ID'], dest)
__tagTrack(dest, track) __tagTrack(dest, track)
except Exception as e: except Exception as e:
logger.error(u'Unable to decrypt deezer track "%s": %s' % (path, e)) logger.error(u'Unable to decrypt deezer track "%s": %s' % (path, e))
+4 -1
View File
@@ -894,7 +894,10 @@ def send_to_downloader(data, bestqual, album):
if track: if track:
filename = track['SNG_ID'] + '.dzr' filename = track['SNG_ID'] + '.dzr'
logger.debug(u'Sending song "%s" to Aria' % track['SNG_TITLE']) logger.debug(u'Sending song "%s" to Aria' % track['SNG_TITLE'])
getAria2RPC().addUri([track['downloadUrl']], {'out': filename, 'auto-file-renaming': 'false', 'continue': 'true', 'dir': folder_name}) getAria2RPC().addUri(
[track['downloadUrl']],
{'out': filename, 'auto-file-renaming': 'false', 'continue': 'true',
'dir': os.path.join(headphones.CONFIG.DOWNLOAD_DDL_DIR, folder_name)})
except Exception as e: except Exception as e:
logger.error(u'Error sending torrent to Aria2. Are you sure it\'s running? (%s)' % e) logger.error(u'Error sending torrent to Aria2. Are you sure it\'s running? (%s)' % e)