Now only deletes the files in trash
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# @Author: KevinMidboe
|
# @Author: KevinMidboe
|
||||||
# @Date: 2017-03-05 13:52:45
|
# @Date: 2017-03-05 13:52:45
|
||||||
# @Last Modified by: KevinMidboe
|
# @Last Modified by: KevinMidboe
|
||||||
# @Last Modified time: 2017-03-05 17:07:44
|
# @Last Modified time: 2017-03-05 17:09:29
|
||||||
|
|
||||||
import sqlite3, json, os, tweepy
|
import sqlite3, json, os, tweepy
|
||||||
from re import sub
|
from re import sub
|
||||||
@@ -99,7 +99,10 @@ def moveFiles(episode):
|
|||||||
os.rename(old_location, new_location)
|
os.rename(old_location, new_location)
|
||||||
|
|
||||||
# shutil.rmtree(showDir + episode['original'])
|
# shutil.rmtree(showDir + episode['original'])
|
||||||
os.remove(showDir + episode['original'] + '/*')
|
if episode['trash']:
|
||||||
|
for trash in episode['trash']:
|
||||||
|
os.remove(showDir + episode['original'] + trash)
|
||||||
|
|
||||||
os.rmdir(showDir + episode['original'])
|
os.rmdir(showDir + episode['original'])
|
||||||
|
|
||||||
updateMovedStatus(episode)
|
updateMovedStatus(episode)
|
||||||
|
|||||||
Reference in New Issue
Block a user