trackma 0.7.5__py3.6.egg → 0.7.6__py3.6.egg
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.
- EGG-INFO/PKG-INFO +1 -1
- trackma/__pycache__/utils.cpython-36.pyc +0 -0
- trackma/lib/__pycache__/libanilist.cpython-36.pyc +0 -0
- trackma/lib/libanilist.py +4 -5
- trackma/ui/__pycache__/gtkui.cpython-36.pyc +0 -0
- trackma/ui/__pycache__/qtui.cpython-36.pyc +0 -0
- trackma/ui/gtkui.py +12 -7
- trackma/ui/qtui.py +11 -7
- trackma/utils.py +1 -1
EGG-INFO/PKG-INFO
CHANGED
|
Binary file
|
|
Binary file
|
trackma/lib/libanilist.py
CHANGED
|
@@ -103,11 +103,6 @@ class libanilist(lib):
|
|
|
103
103
|
self.pin = account['password'].strip()
|
|
104
104
|
self.userid = self._get_userconfig('userid')
|
|
105
105
|
|
|
106
|
-
if len(self.pin) == 40: # Old pins were 40 digits, new ones seem to be 654 digits
|
|
107
|
-
raise utils.APIFatal("This appears to be a V1 API PIN. You need a V2 API PIN to continue using Anilist.")
|
|
108
|
-
#elif len(self.pin) != 654:
|
|
109
|
-
# raise utils.APIFatal("Invalid PIN.")
|
|
110
|
-
|
|
111
106
|
if self.mediatype == 'manga':
|
|
112
107
|
self.total_str = "chapters"
|
|
113
108
|
self.watched_str = "chapters_read"
|
|
@@ -163,6 +158,10 @@ class libanilist(lib):
|
|
|
163
158
|
return self._raw_request('POST', self.query_url, jsonpost=data, auth=True)
|
|
164
159
|
|
|
165
160
|
def check_credentials(self):
|
|
161
|
+
if len(self.pin) == 40: # Old pins were 40 digits, new ones seem to be 654 digits
|
|
162
|
+
raise utils.APIFatal("This appears to be a V1 API PIN. You need a V2 API PIN to continue using AniList."
|
|
163
|
+
" Please re-authorize or re-create your AniList account.")
|
|
164
|
+
|
|
166
165
|
if not self.userid:
|
|
167
166
|
self._refresh_user_info()
|
|
168
167
|
|
|
Binary file
|
|
Binary file
|
trackma/ui/gtkui.py
CHANGED
|
@@ -85,8 +85,10 @@ class Trackma_gtk(object):
|
|
|
85
85
|
|
|
86
86
|
Gtk.main()
|
|
87
87
|
|
|
88
|
-
def __do_switch_account(self, widget, switch=True):
|
|
88
|
+
def __do_switch_account(self, widget, switch=True, forget=False):
|
|
89
89
|
manager = AccountManager()
|
|
90
|
+
if forget:
|
|
91
|
+
manager.set_default(None)
|
|
90
92
|
self.accountsel = AccountSelect(manager = AccountManager(), switch=switch)
|
|
91
93
|
self.accountsel.use_button.connect("clicked", self.use_account)
|
|
92
94
|
self.accountsel.create()
|
|
@@ -573,7 +575,7 @@ class Trackma_gtk(object):
|
|
|
573
575
|
def idle_restart_push(self):
|
|
574
576
|
self.quit = False
|
|
575
577
|
self.main.destroy()
|
|
576
|
-
self.__do_switch_account(None, False)
|
|
578
|
+
self.__do_switch_account(None, False, forget=True)
|
|
577
579
|
|
|
578
580
|
def on_destroy(self, widget):
|
|
579
581
|
if self.quit:
|
|
@@ -1826,7 +1828,10 @@ class InfoWidget(Gtk.VBox):
|
|
|
1826
1828
|
detail = list()
|
|
1827
1829
|
for line in self.details['extra']:
|
|
1828
1830
|
if line[0] and line[1]:
|
|
1829
|
-
|
|
1831
|
+
title, content, *_ = line
|
|
1832
|
+
if isinstance(content, list):
|
|
1833
|
+
content = ", ".join(filter(None, content))
|
|
1834
|
+
detail.append("<b>%s</b>\n%s" % (cgi.escape(str(title)), cgi.escape(str(content))))
|
|
1830
1835
|
|
|
1831
1836
|
self.w_content.set_text("\n\n".join(detail))
|
|
1832
1837
|
self.w_content.set_use_markup(True)
|
|
@@ -1975,13 +1980,13 @@ class Settings(Gtk.Window):
|
|
|
1975
1980
|
line9a.pack_start(self.chk_tracker_update_prompt, False, False, 0)
|
|
1976
1981
|
line9a.pack_start(self.chk_tracker_not_found_prompt, False, False, 0)
|
|
1977
1982
|
line9.pack_start(line9a, False, False, 0)
|
|
1978
|
-
|
|
1983
|
+
|
|
1979
1984
|
### Plex ###
|
|
1980
1985
|
header6 = Gtk.Label()
|
|
1981
1986
|
header6.set_text('<b>Plex Media Server</b>')
|
|
1982
1987
|
header6.set_use_markup(True)
|
|
1983
1988
|
header6.set_xalign(0)
|
|
1984
|
-
|
|
1989
|
+
|
|
1985
1990
|
# Labels
|
|
1986
1991
|
lbl_tracker_plex_host_port = Gtk.Label('Host and Port')
|
|
1987
1992
|
lbl_tracker_plex_host_port.set_size_request(120, -1)
|
|
@@ -1992,7 +1997,7 @@ class Settings(Gtk.Window):
|
|
|
1992
1997
|
lbl_tracker_plex_login = Gtk.Label('myPlex login (claimed server)')
|
|
1993
1998
|
lbl_tracker_plex_login.set_size_request(120, -1)
|
|
1994
1999
|
lbl_tracker_plex_login.set_xalign(0)
|
|
1995
|
-
|
|
2000
|
+
|
|
1996
2001
|
# Entries
|
|
1997
2002
|
self.txt_plex_host = Gtk.Entry()
|
|
1998
2003
|
self.txt_plex_host.set_max_length(4096)
|
|
@@ -2005,7 +2010,7 @@ class Settings(Gtk.Window):
|
|
|
2005
2010
|
self.txt_plex_passw.set_max_length(128)
|
|
2006
2011
|
self.txt_plex_passw.set_visibility(False)
|
|
2007
2012
|
self.chk_tracker_plex_obey_wait = Gtk.CheckButton()
|
|
2008
|
-
|
|
2013
|
+
|
|
2009
2014
|
# HBoxes
|
|
2010
2015
|
line7 = Gtk.HBox(False, 5)
|
|
2011
2016
|
line7.pack_start(lbl_tracker_plex_host_port, False, False, 5)
|
trackma/ui/qtui.py
CHANGED
|
@@ -540,6 +540,7 @@ class Trackma(QMainWindow):
|
|
|
540
540
|
|
|
541
541
|
def fatal(self, msg):
|
|
542
542
|
QMessageBox.critical(self, 'Fatal Error', "Fatal Error! Reason:\n\n{0}".format(msg), QMessageBox.Ok)
|
|
543
|
+
self.accountman.set_default(None)
|
|
543
544
|
self._busy()
|
|
544
545
|
self.finish = False
|
|
545
546
|
self.worker_call('unload', self.r_engine_unloaded)
|
|
@@ -1270,6 +1271,8 @@ class Trackma(QMainWindow):
|
|
|
1270
1271
|
def s_switch_account(self):
|
|
1271
1272
|
if not self.accountman_widget:
|
|
1272
1273
|
self.accountman_create()
|
|
1274
|
+
else:
|
|
1275
|
+
self.accountman_widget.update()
|
|
1273
1276
|
|
|
1274
1277
|
self.accountman_widget.setModal(True)
|
|
1275
1278
|
self.accountman_widget.show()
|
|
@@ -2471,8 +2474,6 @@ class AccountDialog(QDialog):
|
|
|
2471
2474
|
|
|
2472
2475
|
bottom_layout = QHBoxLayout()
|
|
2473
2476
|
self.remember_chk = QCheckBox('Remember')
|
|
2474
|
-
if self.accountman.get_default() is not None:
|
|
2475
|
-
self.remember_chk.setChecked(True)
|
|
2476
2477
|
cancel_btn = QPushButton('Cancel')
|
|
2477
2478
|
cancel_btn.clicked.connect(self.cancel)
|
|
2478
2479
|
add_btn = QPushButton('Add')
|
|
@@ -2504,6 +2505,7 @@ class AccountDialog(QDialog):
|
|
|
2504
2505
|
self.icons[libname] = QIcon(lib[1])
|
|
2505
2506
|
|
|
2506
2507
|
# Populate list
|
|
2508
|
+
self.update()
|
|
2507
2509
|
self.rebuild()
|
|
2508
2510
|
|
|
2509
2511
|
# Finish layout
|
|
@@ -2511,6 +2513,9 @@ class AccountDialog(QDialog):
|
|
|
2511
2513
|
layout.addLayout(bottom_layout)
|
|
2512
2514
|
self.setLayout(layout)
|
|
2513
2515
|
|
|
2516
|
+
def update(self):
|
|
2517
|
+
self.remember_chk.setChecked(self.accountman.get_default() is not None)
|
|
2518
|
+
|
|
2514
2519
|
def add(self):
|
|
2515
2520
|
result = AccountAddDialog.do(icons=self.icons)
|
|
2516
2521
|
if result:
|
|
@@ -2657,23 +2662,22 @@ class ShowItemNum(ShowItem):
|
|
|
2657
2662
|
|
|
2658
2663
|
class ShowItemDate(ShowItem):
|
|
2659
2664
|
def __init__(self, date, color=None):
|
|
2665
|
+
self.date = datetime.datetime(1, 1, 1)
|
|
2666
|
+
|
|
2660
2667
|
if date:
|
|
2661
2668
|
try:
|
|
2662
2669
|
datestr = date.strftime("%Y-%m-%d")
|
|
2670
|
+
self.date = date
|
|
2663
2671
|
except ValueError:
|
|
2664
2672
|
datestr = '?'
|
|
2665
2673
|
else:
|
|
2666
2674
|
datestr = '-'
|
|
2667
2675
|
|
|
2668
|
-
self.date = date
|
|
2669
2676
|
|
|
2670
2677
|
ShowItem.__init__(self, datestr, color, QtCore.Qt.AlignHCenter)
|
|
2671
2678
|
|
|
2672
2679
|
def __lt__(self, other):
|
|
2673
|
-
|
|
2674
|
-
return self.date < other.date
|
|
2675
|
-
else:
|
|
2676
|
-
return True
|
|
2680
|
+
return self.date < other.date
|
|
2677
2681
|
|
|
2678
2682
|
|
|
2679
2683
|
class FilterBar():
|