-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.py
55 lines (44 loc) · 1.1 KB
/
classes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import os
import sqlite3
#
# scene2arr.py
#
class IgnoreError(Exception):
pass
class PVR(object):
def __init__(self, name):
self.url = None
self.apikey = None
self.response = None
self.required = None
self.ignored = None
self.checked = []
self.skip = False
self.name = name
#
# scene2arr.py, scenerename.py
#
class DB(object):
def __init__(self, dbname):
self.connection = sqlite3.connect(dbname)
self.cursor = self.connection.cursor()
#
# scenerename.py
#
class ReleaseNotFoundError(Exception):
pass
class SkipFileError(Exception):
pass
class FileToCheck(object):
def __init__(self, dirpath, filename):
self.dirpath = dirpath
self.filename = filename
self.filepath = os.path.join(dirpath, filename)
self.releaseName = os.path.splitext(filename)[0]
self.extension = os.path.splitext(filename)[1].lower()
self.realName = None
self.sizeondisk = None
self.sizeonsrrdb = None
self.crccalc = None
self.crcweb = None
self.page = None