trackma 0.3__tar.gz → 0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Trackma-0.3 → Trackma-0.4}/PKG-INFO +1 -1
- {Trackma-0.3 → Trackma-0.4}/Trackma.egg-info/PKG-INFO +1 -1
- {Trackma-0.3 → Trackma-0.4}/Trackma.egg-info/SOURCES.txt +4 -4
- {Trackma-0.3 → Trackma-0.4}/setup.py +1 -1
- {Trackma-0.3 → Trackma-0.4}/trackma/accounts.py +10 -10
- Trackma-0.4/trackma/data/anilist.jpg +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/data.py +143 -107
- {Trackma-0.3 → Trackma-0.4}/trackma/engine.py +216 -142
- Trackma-0.3/trackma/tracker.py → Trackma-0.4/trackma/extras/AnimeInfoExtractor.py +0 -194
- Trackma-0.4/trackma/extras/plex.py +100 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/lib/lib.py +34 -24
- Trackma-0.4/trackma/lib/libanilist.py +355 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/lib/libhb.py +33 -30
- {Trackma-0.3 → Trackma-0.4}/trackma/lib/libmal.py +73 -49
- {Trackma-0.3 → Trackma-0.4}/trackma/lib/libmelative.py +26 -26
- {Trackma-0.3 → Trackma-0.4}/trackma/lib/libvndb.py +66 -61
- {Trackma-0.3 → Trackma-0.4}/trackma/messenger.py +5 -5
- Trackma-0.4/trackma/tracker.py +301 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/ui/cli.py +315 -225
- {Trackma-0.3 → Trackma-0.4}/trackma/ui/curses.py +187 -170
- {Trackma-0.3 → Trackma-0.4}/trackma/ui/gtkui.py +723 -400
- {Trackma-0.3 → Trackma-0.4}/trackma/ui/qtui.py +522 -246
- {Trackma-0.3 → Trackma-0.4}/trackma/utils.py +98 -19
- Trackma-0.3/trackma/data/anilist.jpg +0 -0
- Trackma-0.3/trackma/lib/libanilist.py +0 -131
- Trackma-0.3/trackma/ui/remote/client.py +0 -16
- Trackma-0.3/trackma/ui/remote/daemon.py +0 -53
- {Trackma-0.3 → Trackma-0.4}/Trackma.egg-info/dependency_links.txt +0 -0
- {Trackma-0.3 → Trackma-0.4}/Trackma.egg-info/entry_points.txt +0 -0
- {Trackma-0.3 → Trackma-0.4}/Trackma.egg-info/requires.txt +0 -0
- {Trackma-0.3 → Trackma-0.4}/Trackma.egg-info/top_level.txt +0 -0
- {Trackma-0.3 → Trackma-0.4}/setup.cfg +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/__init__.py +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/data/hb.jpg +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/data/icon.png +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/data/mal.jpg +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/data/melative.jpg +0 -0
- {Trackma-0.3 → Trackma-0.4}/trackma/data/vndb.jpg +0 -0
- {Trackma-0.3/trackma/lib → Trackma-0.4/trackma/extras}/__init__.py +0 -0
- {Trackma-0.3/trackma/ui → Trackma-0.4/trackma/lib}/__init__.py +0 -0
- {Trackma-0.3/trackma/ui/remote → Trackma-0.4/trackma/ui}/__init__.py +0 -0
|
@@ -18,6 +18,9 @@ trackma/data/icon.png
|
|
|
18
18
|
trackma/data/mal.jpg
|
|
19
19
|
trackma/data/melative.jpg
|
|
20
20
|
trackma/data/vndb.jpg
|
|
21
|
+
trackma/extras/AnimeInfoExtractor.py
|
|
22
|
+
trackma/extras/__init__.py
|
|
23
|
+
trackma/extras/plex.py
|
|
21
24
|
trackma/lib/__init__.py
|
|
22
25
|
trackma/lib/lib.py
|
|
23
26
|
trackma/lib/libanilist.py
|
|
@@ -29,7 +32,4 @@ trackma/ui/__init__.py
|
|
|
29
32
|
trackma/ui/cli.py
|
|
30
33
|
trackma/ui/curses.py
|
|
31
34
|
trackma/ui/gtkui.py
|
|
32
|
-
trackma/ui/qtui.py
|
|
33
|
-
trackma/ui/remote/__init__.py
|
|
34
|
-
trackma/ui/remote/client.py
|
|
35
|
-
trackma/ui/remote/daemon.py
|
|
35
|
+
trackma/ui/qtui.py
|
|
@@ -4,10 +4,10 @@ import cPickle
|
|
|
4
4
|
class AccountManager(object):
|
|
5
5
|
"""
|
|
6
6
|
This is the account manager.
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
It provides a generic way for the user interface to query for the
|
|
9
9
|
available registered accounts, and add or delete accounts.
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
This class returns an Account Dictionary used by
|
|
12
12
|
the :class:`Engine` to start.
|
|
13
13
|
"""
|
|
@@ -31,13 +31,13 @@ class AccountManager(object):
|
|
|
31
31
|
"""
|
|
32
32
|
Registers a new account with the specified
|
|
33
33
|
*username*, *password* and *api*.
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
The *api* must be one of the available APIs
|
|
36
36
|
found in the utils.available_libs dict.
|
|
37
37
|
"""
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
available_libs = utils.available_libs.keys()
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
if not username:
|
|
42
42
|
raise utils.AccountError('Empty username.')
|
|
43
43
|
if not password:
|
|
@@ -54,26 +54,26 @@ class AccountManager(object):
|
|
|
54
54
|
self.accounts['accounts'][nextnum] = account
|
|
55
55
|
self.accounts['next'] += 1
|
|
56
56
|
self._save()
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
def delete_account(self, num):
|
|
59
59
|
"""
|
|
60
60
|
Deletes the account number **num**.
|
|
61
61
|
"""
|
|
62
62
|
self.accounts['default'] = None
|
|
63
63
|
del self.accounts['accounts'][num]
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
# Reset index if there are no accounts left
|
|
66
66
|
if not self.accounts['accounts']:
|
|
67
67
|
self.accounts['next'] = 1
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
self._save()
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
def get_account(self, num):
|
|
72
72
|
"""
|
|
73
73
|
Returns the account dict **num**.
|
|
74
74
|
"""
|
|
75
75
|
return self.accounts['accounts'][num]
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
def get_accounts(self):
|
|
78
78
|
"""
|
|
79
79
|
Returns an iterator of available accounts.
|
|
Binary file
|