1
0
Fork 0
mirror of https://github.com/Jonny007-MKD/OTR-SaneRename synced 2024-10-03 06:37:29 +02:00
OTR-SaneRename/editSeriesCache.py
2020-04-03 22:19:39 +02:00

28 lines
591 B
Python

import os
import pickle
import sys
workingDir = os.path.dirname(os.path.realpath(__file__))
path = os.path.join(workingDir, "series.cache")
def loadCache():
if not os.path.isfile(path): return None
try:
with open(path, 'rb') as f:
cache = pickle.load(f)
return cache
except Exception as e:
return None
def writeCache(cache):
with open(path, 'wb') as f:
pickle.dump(cache, f)
cache = loadCache()
print(cache)
sys.exit()
if cache:
cache.pop("Ein Fall für TKKG (2014)", None)
cache.pop("Ein Fall für TKKG", None)
cache.pop("Ein Fall fuer TKKG", None)
writeCache(cache)