mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 00:44:00 +01:00
Strip trailing whitespace when creating a temp folder for preserving torrent files
This commit is contained in:
@@ -320,7 +320,8 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list,
|
|||||||
logger.info('Starting post-processing for: %s - %s' % (release['ArtistName'], release['AlbumTitle']))
|
logger.info('Starting post-processing for: %s - %s' % (release['ArtistName'], release['AlbumTitle']))
|
||||||
# Check to see if we're preserving the torrent dir
|
# Check to see if we're preserving the torrent dir
|
||||||
if headphones.KEEP_TORRENT_FILES and Kind=="torrent":
|
if headphones.KEEP_TORRENT_FILES and Kind=="torrent":
|
||||||
new_folder = os.path.join(os.path.dirname(albumpath), ('temp' + release['AlbumTitle'][:5]).encode(headphones.SYS_ENCODING, 'replace'))
|
new_folder = os.path.join(os.path.dirname(albumpath), ('temp' + release['AlbumTitle'][:8]).encode(headphones.SYS_ENCODING, 'replace'))
|
||||||
|
new_folder = new_folder.strip()
|
||||||
try:
|
try:
|
||||||
shutil.copytree(albumpath, new_folder)
|
shutil.copytree(albumpath, new_folder)
|
||||||
albumpath = new_folder
|
albumpath = new_folder
|
||||||
|
|||||||
Reference in New Issue
Block a user