Added "/" to directory of trash deletor

This commit is contained in:
2017-03-05 17:14:46 +01:00
parent e014b32511
commit ecb7c46f34

View File

@@ -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:11:57 # @Last Modified time: 2017-03-05 17:14:25
import sqlite3, json, os, tweepy import sqlite3, json, os, tweepy
from re import sub from re import sub
@@ -101,7 +101,7 @@ def moveFiles(episode):
# shutil.rmtree(showDir + episode['original']) # shutil.rmtree(showDir + episode['original'])
if episode['trash']: if episode['trash']:
for trash in json.loads(episode['trash']): for trash in json.loads(episode['trash']):
os.remove(showDir + episode['original'] + trash) os.remove(showDir + episode['original'] + '/'+ trash)
os.rmdir(showDir + episode['original']) os.rmdir(showDir + episode['original'])