mirror of
https://github.com/KevinMidboe/transatlanticTorrentExpress.git
synced 2025-10-29 18:00:19 +00:00
Error when moving files without parent folders
This will check if file ends with a know video extension, if so use os.makedirs to create a folder at destination and update rsync destination with this folder.
This commit is contained in:
10
utils.py
10
utils.py
@@ -4,6 +4,14 @@ from configparser import RawConfigParser, NoOptionError
|
||||
|
||||
pwd = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
VIDEO_EXTENSIONS = ('.3g2', '.3gp', '.3gp2', '.3gpp', '.60d', '.ajp', '.asf', '.asx', '.avchd', '.avi', '.bik',
|
||||
'.bix', '.box', '.cam', '.dat', '.divx', '.dmf', '.dv', '.dvr-ms', '.evo', '.flc', '.fli',
|
||||
'.flic', '.flv', '.flx', '.gvi', '.gvp', '.h264', '.m1v', '.m2p', '.m2v', '.m4e',
|
||||
'.m4v', '.mjp', '.mjpeg', '.mjpg', '.mkv', '.moov', '.mov', '.movhd', '.movie', '.movx', '.mp4',
|
||||
'.mpe', '.mpeg', '.mpg', '.mpv', '.mpv2', '.mxf', '.nsv', '.nut', '.ogg', '.ogm' '.ogv', '.omf',
|
||||
'.ps', '.qt', '.ram', '.rm', '.rmvb', '.swf', '.ts', '.vfw', '.vid', '.video', '.viv', '.vivo',
|
||||
'.vob', '.vro', '.wm', '.wmv', '.wmx', '.wrap', '.wvx', '.wx', '.x264', '.xvid')
|
||||
|
||||
class NoneOptionConfigParser(RawConfigParser):
|
||||
def get(self, section, option):
|
||||
try:
|
||||
@@ -43,4 +51,4 @@ def readAvgSpeedFromDisk():
|
||||
if data == '':
|
||||
data = '1'
|
||||
|
||||
return int(data)
|
||||
return int(data)
|
||||
|
||||
Reference in New Issue
Block a user