mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
remove any samples from packed
This commit is contained in:
parent
f7ed953815
commit
23045c8db1
1 changed files with 5 additions and 1 deletions
|
@ -354,6 +354,10 @@ for dirpath, dirnames, filenames in os.walk(destination):
|
||||||
file_path = os.path.join(dirpath, file)
|
file_path = os.path.join(dirpath, file)
|
||||||
file_ext = os.path.splitext(file)[1]
|
file_ext = os.path.splitext(file)[1]
|
||||||
if file_ext in video_files: #if the file is a video file.
|
if file_ext in video_files: #if the file is a video file.
|
||||||
|
if is_sample(file_path, Name):
|
||||||
|
Logger.info("file %s is a sample file. Removing", file_path)
|
||||||
|
os.unlink(file_path) #remove samples
|
||||||
|
else:
|
||||||
video2 = video2 + 1
|
video2 = video2 + 1
|
||||||
if video2 >= video and video2 > 0: #check that all video files were moved.
|
if video2 >= video and video2 > 0: #check that all video files were moved.
|
||||||
status = 0
|
status = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue