diff --git a/SickBeard.py b/SickBeard.py index 2ee3659706e1d7b46a869a33ff6133a8973bf6b3..0955ca7dbf77f67bf8ff4395bf4899ff482c936f 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -147,6 +147,30 @@ class SickRage(object): help_msg += " --noresize Prevent resizing of the banner/posters even if PIL is installed\n" return help_msg + + def fix_clients_nonsense(): + + files = ["sickbeard/clients/download_station.py", + "sickbeard/clients/utorrent.py", + "sickbeard/clients/generic.py", + "sickbeard/clients/qbittorrent.py", + "sickbeard/clients/transmission.py", + "sickbeard/clients/deluge.py", + "sickbeard/clients/rtorrent.py" + ] + + for file in files: + file = ek.ek(os.path.join, sickbeard.PROG_DIR, file) + try: + if ek.ek(os.path.exists, file): + ek.ek(os.remove, file) + except: + pass + try: + if ek.ek(os.path.exists, file + "c"): + ek.ek(os.remove, file + "c") + except: + pass def start(self): # do some preliminary stuff @@ -317,6 +341,9 @@ class SickRage(object): # Get PID sickbeard.PID = os.getpid() + + # Fix clients old files + self.fix_clients_nonsense() # Build from the DB to start with self.loadShowsFromDB()