mirror of
https://github.com/nikdoof/tvorganise.git
synced 2025-12-13 06:42:16 +00:00
Further PEP8 work.
This commit is contained in:
@@ -63,8 +63,9 @@ class TvOrganiser():
|
||||
|
||||
def _findFiles(self, args):
|
||||
"""
|
||||
Takes a list of files/folders, grabs files inside them. Does not recurse
|
||||
more than one level (if a folder is supplied, it will list files within)
|
||||
Takes a list of files/folders, grabs files inside them. Does not
|
||||
recurse more than one level (if a folder is supplied, it will list
|
||||
files within)
|
||||
"""
|
||||
allfiles = []
|
||||
for cfile in args:
|
||||
@@ -94,7 +95,7 @@ class TvOrganiser():
|
||||
if match:
|
||||
showname, seasno, epno, epname = match.groups()
|
||||
|
||||
#remove ._- characters from name (- removed only if next to end of line)
|
||||
#remove ._- characters from name
|
||||
showname = re.sub("[\._]|\-(?=$)", " ", showname).strip()
|
||||
|
||||
seasno, epno = int(seasno), int(epno)
|
||||
@@ -154,9 +155,10 @@ class TvOrganiser():
|
||||
sys.exit(0)
|
||||
|
||||
for name in files:
|
||||
oldfile = os.path.join(name['filepath'], name['filename']) + "." + name['ext']
|
||||
filename = "%s.%s" % (name['filename'], name['ext'])
|
||||
oldfile = os.path.join(name['filepath'], filename)
|
||||
newpath = config['target_path'] % name
|
||||
newfile = os.path.join(newpath, name['filename']) + "." + name['ext']
|
||||
newfile = os.path.join(newpath, filename)
|
||||
|
||||
self._logger.info("Old path:", oldfile)
|
||||
self._logger.info("New path:", newfile)
|
||||
|
||||
Reference in New Issue
Block a user