Skip to content

Commit

Permalink
fix: multiple bugs including tpb, anime showing at end of homepage wi…
Browse files Browse the repository at this point in the history
…th no anime,

* feat: automatically force a show refresh when changing anime, sports, air-by-date, or scene

This might need switched to a forced update instead of refresh.

Also, I want to use property setters and getters for most properties and get rid of DirtySetter. I might use a decorator to handle the dirty flag.
DirtySetter throws too many warnings with linters and checkers because it is non-standard practice.

We need to move refresh, update, delete, etx from sickchill.show.Show, to avoid passing an indexerid from a show object which it then loops over the show_list to get an object and then pass the object to the show_queue.

* fix: do not show anime between shows and anime when not splitting shows and animes

TODO: Rework the passed show_list to use a dict so we can sort, filter, and join the lists better in mako and make it more efficient.

* fix: error concatinating set and list in tpb

* fix keyError in postProcessor

* refactor: add type hints to Show, show_queue, show_updater, and some other places, refactor code for efficiency and clarity, remove dead code

* feat: add wip windows service in pure python, undocumented for now

* fix: missed refactor on SickChill.py

---------

Signed-off-by: miigotu <[email protected]>
Co-authored-by: BKSteve <[email protected]>
  • Loading branch information
miigotu and BKSteve authored Feb 25, 2024
1 parent 6a51e7e commit 671a316
Show file tree
Hide file tree
Showing 64 changed files with 636 additions and 575 deletions.
6 changes: 4 additions & 2 deletions SickChill.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
setup_gettext()

mimetypes.add_type("text/css", ".css")
# noinspection SpellCheckingInspection
mimetypes.add_type("application/sfont", ".otf")
# noinspection SpellCheckingInspection
mimetypes.add_type("application/sfont", ".ttf")
mimetypes.add_type("application/javascript", ".js")
mimetypes.add_type("application/font-woff", ".woff")
# Not sure about this one, but we also have halflings in .woff, so I think it won't matter
# mimetypes.add_type("application/font-woff2", ".woff2")

from configobj import ConfigObj

Expand Down Expand Up @@ -332,7 +332,9 @@ def shutdown(self, event):
popen_list = [sys.executable, settings.MY_FULLNAME]
if popen_list and not settings.NO_RESTART:
popen_list += settings.MY_ARGS
# noinspection SpellCheckingInspection
if "--nolaunch" not in popen_list:
# noinspection SpellCheckingInspection
popen_list += ["--nolaunch"]
logger.info("Restarting SickChill with {options}".format(options=popen_list))
# shutdown the logger to make sure it's released the logfile BEFORE it restarts SC.
Expand Down
2 changes: 2 additions & 0 deletions sickchill/gui/slick/views/home.mako
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@
<div class="loading-spinner"></div>
% endif
% for cur_show_list in sorted_show_lists:
% if cur_show_list[1]:
<div class="row">
<div class="col-md-12">
<%include file="/inc_home_show_list.mako" args="curListType=cur_show_list[0], myShowList=cur_show_list[1]" />
</div>
</div>
% endif
% endfor
</div>
</div>
Expand Down
11 changes: 5 additions & 6 deletions sickchill/locale/af_ZA/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5697,7 +5697,7 @@ msgstr "Program Lys"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -5895,7 +5895,7 @@ msgid "Skipped"
msgstr ""

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6508,7 +6508,7 @@ msgid "The old status had a quality in it, using that: "
msgstr ""

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7061,7 +7061,7 @@ msgid "Unable to create subtitles folder {subs_new_path}"
msgstr ""

#: sickchill/oldbeard/show_queue.py:381
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr ""

#: sickchill/views/manage/add_shows.py:632
Expand Down Expand Up @@ -7108,7 +7108,7 @@ msgid "Unable to force an update on scene numbering of the show."
msgstr ""

#: sickchill/oldbeard/show_queue.py:361
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr ""

#: sickchill/oldbeard/helpers.py:1448
Expand Down Expand Up @@ -9540,4 +9540,3 @@ msgstr ""
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr ""

11 changes: 5 additions & 6 deletions sickchill/locale/ar_SA/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5830,7 +5830,7 @@ msgstr "قائمة المسلسلات"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -6030,7 +6030,7 @@ msgid "Skipped"
msgstr ""

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6651,7 +6651,7 @@ msgid "The old status had a quality in it, using that: "
msgstr ""

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7215,7 +7215,7 @@ msgstr "غير قادر على إنشاء المجلد {show_dir}، لا يمك
#: sickchill/oldbeard/show_queue.py:381
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr "غير قادر على إنشاء المجلد {show_dir}، لا يمكن إضافة المسلسل"

#: sickchill/views/manage/add_shows.py:632
Expand Down Expand Up @@ -7264,7 +7264,7 @@ msgstr "غير قادر على فرض التحديث على (استثناءات
#: sickchill/oldbeard/show_queue.py:361
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr "غير قادر على إنشاء المجلد {show_dir}، لا يمكن إضافة المسلسل"

#: sickchill/oldbeard/helpers.py:1448
Expand Down Expand Up @@ -9712,4 +9712,3 @@ msgstr "{show_name} قد تم {deleted_trashed} {was_deleted}"
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr "{show_name} قد تم{paused_resumed}"

11 changes: 5 additions & 6 deletions sickchill/locale/bg_BG/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5966,7 +5966,7 @@ msgstr "Предаването е пропуснато"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -6168,7 +6168,7 @@ msgid "Skipped"
msgstr "Предаването е пропуснато"

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6795,7 +6795,7 @@ msgid "The old status had a quality in it, using that: "
msgstr "Стария статус съдържа данни за качество, ще използвам тях: "

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7381,7 +7381,7 @@ msgstr "Не успя да създаде папка за надписи {0}"
#: sickchill/oldbeard/show_queue.py:381
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr ""
"Не може да бъде създадена папката {show_dir}, сериалът не може да бъде "
"добавен"
Expand Down Expand Up @@ -7438,7 +7438,7 @@ msgstr "Неуспешна принудителна актуализация н
#: sickchill/oldbeard/show_queue.py:361
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr ""
"Не може да бъде създадена папката {show_dir}, сериалът не може да бъде "
"добавен"
Expand Down Expand Up @@ -9943,4 +9943,3 @@ msgstr "{show_name} беше {deleted_trashed} {was_deleted}"
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr "{show_name} беше {paused_resumed}"

11 changes: 5 additions & 6 deletions sickchill/locale/ca_ES/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5683,7 +5683,7 @@ msgstr "Mostrar llistat"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -5881,7 +5881,7 @@ msgid "Skipped"
msgstr ""

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6486,7 +6486,7 @@ msgid "The old status had a quality in it, using that: "
msgstr ""

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7037,7 +7037,7 @@ msgid "Unable to create subtitles folder {subs_new_path}"
msgstr ""

#: sickchill/oldbeard/show_queue.py:381
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr ""

#: sickchill/views/manage/add_shows.py:632
Expand Down Expand Up @@ -7084,7 +7084,7 @@ msgid "Unable to force an update on scene numbering of the show."
msgstr ""

#: sickchill/oldbeard/show_queue.py:361
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr ""

#: sickchill/oldbeard/helpers.py:1448
Expand Down Expand Up @@ -9494,4 +9494,3 @@ msgstr ""
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr ""

11 changes: 5 additions & 6 deletions sickchill/locale/cs_CZ/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5856,7 +5856,7 @@ msgstr "Seznam seriálů"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -6056,7 +6056,7 @@ msgid "Skipped"
msgstr ""

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6677,7 +6677,7 @@ msgid "The old status had a quality in it, using that: "
msgstr ""

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7239,7 +7239,7 @@ msgid "Unable to create subtitles folder {subs_new_path}"
msgstr ""

#: sickchill/oldbeard/show_queue.py:381
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr ""

#: sickchill/views/manage/add_shows.py:632
Expand Down Expand Up @@ -7286,7 +7286,7 @@ msgid "Unable to force an update on scene numbering of the show."
msgstr "Nelze vynutit aktualizaci číslování dílů seriálu."

#: sickchill/oldbeard/show_queue.py:361
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr ""

#: sickchill/oldbeard/helpers.py:1448
Expand Down Expand Up @@ -9736,4 +9736,3 @@ msgstr "{show_name} byl {deleted_trashed} {was_deleted}"
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr "{show_name} byl {paused_resumed}"

11 changes: 5 additions & 6 deletions sickchill/locale/da_DK/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5837,7 +5837,7 @@ msgstr "Serie Liste"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -6037,7 +6037,7 @@ msgid "Skipped"
msgstr ""

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6658,7 +6658,7 @@ msgid "The old status had a quality in it, using that: "
msgstr ""

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7222,7 +7222,7 @@ msgstr "Ikke i stand til at oprette folderen {show_dir}, kan ikke tilføje serie
#: sickchill/oldbeard/show_queue.py:381
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr "Ikke i stand til at oprette folderen {show_dir}, kan ikke tilføje serien"

#: sickchill/views/manage/add_shows.py:632
Expand Down Expand Up @@ -7275,7 +7275,7 @@ msgstr ""
#: sickchill/oldbeard/show_queue.py:361
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr "Ikke i stand til at oprette folderen {show_dir}, kan ikke tilføje serien"

#: sickchill/oldbeard/helpers.py:1448
Expand Down Expand Up @@ -9729,4 +9729,3 @@ msgstr "{show_name} blev {deleted_trashed} {was_deleted}"
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr "{show_name} blev {paused_resumed}"

11 changes: 5 additions & 6 deletions sickchill/locale/de_DE/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5861,7 +5861,7 @@ msgstr "Serienliste"

#: sickchill/oldbeard/show_queue.py:390
msgid ""
"Show in {showDir} has no name on {indexer}, probably searched with the "
"Show in {show_dir} has no name on {indexer}, probably searched with the "
"wrong language. Delete .nfo and add manually in the correct language."
msgstr ""

Expand Down Expand Up @@ -6061,7 +6061,7 @@ msgid "Skipped"
msgstr ""

#: sickchill/oldbeard/show_queue.py:377
msgid "Skipping initial creation of {showDir} due to config.ini setting"
msgid "Skipping initial creation of {show_dir} due to config.ini setting"
msgstr ""

#: sickchill/gui/slick/views/config.mako:250
Expand Down Expand Up @@ -6686,7 +6686,7 @@ msgid "The old status had a quality in it, using that: "
msgstr ""

#: sickchill/oldbeard/show_queue.py:478
msgid "The show in {showDir} is already in your show list, skipping"
msgid "The show in {show_dir} is already in your show list, skipping"
msgstr ""

#: sickchill/gui/slick/views/config_notifications.mako:1306
Expand Down Expand Up @@ -7268,7 +7268,7 @@ msgstr ""
#: sickchill/oldbeard/show_queue.py:381
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to create the folder {showDir}, can't add the show"
msgid "Unable to create the folder {show_dir}, can't add the show"
msgstr ""
"Kann den Ordner {show_dir} nicht erstellen, Serie kann nicht hinzugefügt "
"werden"
Expand Down Expand Up @@ -7325,7 +7325,7 @@ msgstr ""
#: sickchill/oldbeard/show_queue.py:361
#, fuzzy
#| msgid "Unable to create the folder {show_dir}, can't add the show"
msgid "Unable to get a show {showDir}, can't add the show"
msgid "Unable to get a show {show_dir}, can't add the show"
msgstr ""
"Kann den Ordner {show_dir} nicht erstellen, Serie kann nicht hinzugefügt "
"werden"
Expand Down Expand Up @@ -9787,4 +9787,3 @@ msgstr "{show_name} wurde {deleted_trashed}{was_deleted}"
#: sickchill/views/home.py:1280
msgid "{show_name} has been {paused_resumed}"
msgstr "{show_name} wurde {paused_resumed}"

Loading

0 comments on commit 671a316

Please sign in to comment.