mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 18:45:32 +01:00
PEP8
This commit is contained in:
@@ -639,14 +639,15 @@ def preserve_torrent_directory(albumpath):
|
||||
|
||||
# Copy to temp dir
|
||||
subdir = os.path.join(new_folder, "headphones")
|
||||
logger.info("Copying files to " + subdir.decode(headphones.SYS_ENCODING, 'replace')
|
||||
+ " subfolder to preserve downloaded files for seeding")
|
||||
logger.info("Copying files to " + subdir.decode(headphones.SYS_ENCODING,
|
||||
'replace') + " subfolder to preserve downloaded files for seeding")
|
||||
|
||||
# Attempt to stop multiple temp dirs being created for the same albumpath
|
||||
tempdir = os.path.join(tempdir, prefix)
|
||||
if len (glob.glob(tempdir + '*/')) >= 3:
|
||||
logger.error("Looks like a temp subfolder has previously been created for this albumpath, not continuing "
|
||||
+ tempdir.decode(headphones.SYS_ENCODING, 'replace'))
|
||||
if len(glob.glob(tempdir + '*/')) >= 3:
|
||||
logger.error(
|
||||
"Looks like a temp subfolder has previously been created for this albumpath, not continuing " + tempdir.decode(
|
||||
headphones.SYS_ENCODING, 'replace'))
|
||||
return None
|
||||
|
||||
try:
|
||||
@@ -659,7 +660,8 @@ def preserve_torrent_directory(albumpath):
|
||||
shutil.rmtree(new_folder)
|
||||
return None
|
||||
|
||||
def cue_split(albumpath,keep_original_folder=False):
|
||||
|
||||
def cue_split(albumpath, keep_original_folder=False):
|
||||
"""
|
||||
Attempts to check and split audio files by a cue for the given directory.
|
||||
"""
|
||||
|
||||
@@ -1266,7 +1266,7 @@ def forcePostProcess(dir=None, expand_subfolders=True, album_dir=None, keep_orig
|
||||
# Not found from meta data, check if there's a cue to split and try meta data again
|
||||
kind = None
|
||||
if headphones.CONFIG.CUE_SPLIT and not name and not album:
|
||||
cue_folder = helpers.cue_split(folder,keep_original_folder=keep_original_folder)
|
||||
cue_folder = helpers.cue_split(folder, keep_original_folder=keep_original_folder)
|
||||
if cue_folder:
|
||||
try:
|
||||
name, album, year = helpers.extract_metadata(cue_folder)
|
||||
|
||||
Reference in New Issue
Block a user