Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mass refactor tv.py #8706

Merged
merged 31 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
83e529a
refactor: lowercase and typo function, parameter, and variable names …
miigotu Feb 3, 2024
a3055a7
fix: use property decorators instead of accessors to avoid type check…
miigotu Feb 3, 2024
e36b6fb
black
miigotu Feb 3, 2024
8a67418
chore: update release workflow
miigotu Feb 3, 2024
89546f4
refactor: missed changes
miigotu Feb 3, 2024
6989d8c
additional time error capture
BKSteve Feb 3, 2024
7ba09ac
refactor: more renaming and fixing types
miigotu Feb 3, 2024
0bcd73f
fix: can't add init to tornado base class? causes PageTemplate initia…
miigotu Feb 3, 2024
6850259
fix: try to fix airdate modify timestamp, remove some unneded mako co…
miigotu Feb 4, 2024
846aa4a
chore:black formatting
miigotu Feb 4, 2024
754e34f
air date tm_isdst
BKSteve Feb 4, 2024
c20da34
air date tm_isdst clean
BKSteve Feb 4, 2024
ae3e0ff
Merge branch 'develop' into wtf-is-wrong-with-me-lol
miigotu Feb 6, 2024
cb4c31b
backlog page variables - log reduction
BKSteve Feb 11, 2024
2a6deff
backlog page variables lowercase 2
BKSteve Feb 11, 2024
4735005
trending add - redirectable
BKSteve Feb 11, 2024
9614388
searchBacklog needs int
BKSteve Feb 11, 2024
0ac7c4c
subtitles remove legendastv
BKSteve Feb 11, 2024
7b58831
add shows redirect allowed
BKSteve Feb 12, 2024
18c4a7d
regex single char alternation - Qodana
BKSteve Feb 12, 2024
b44dc29
docstring parameters - Qodana
BKSteve Feb 12, 2024
6340a58
fstring logs
BKSteve Feb 12, 2024
212444f
fstring logs 2
BKSteve Feb 12, 2024
dacdd68
wordle
BKSteve Feb 12, 2024
140482a
remove show get*
BKSteve Feb 12, 2024
8e44069
snaking vars
BKSteve Feb 12, 2024
735ea0a
home unused var removal
BKSteve Feb 12, 2024
0fb6c6b
t.render layout
BKSteve Feb 12, 2024
bae210c
Failed download + params
BKSteve Feb 12, 2024
a6ed3a4
revert (_(f
BKSteve Feb 12, 2024
b96ea86
Merge branch 'develop' into wtf-is-wrong-with-me-lol
miigotu Feb 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
# and trailing whitespace removed
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{py,mako}]
charset = utf-8
indent_style = space
Expand All @@ -20,12 +15,9 @@ charset = utf-8
indent_style = space
indent_size = 4

# Matches configuration files for services like Travis, AppVeyor and Codecov
[*.yml]
indent_style = space
indent_size = 2

[{package.json, bower.json, webpack.config.js}]
charset = utf-8
indent_style = space
[{package.json,bower.json,webpack.config.js}]
indent_size = 2
miigotu marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: Build develop branch

on:
workflow_run:
workflows: [Python Packaging]
branches: |
- develop
types:
- completed
workflows: [ Python Packaging ]
branches: [ develop ]
types: [ completed, requested ]

jobs:
version:
Comment on lines 2 to 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [21-21]

Using cache: 'yarn' with actions/setup-node@v4 while running npm install -g yarn seems redundant. If Yarn is being used, consider removing the npm install -g yarn command or clarify the necessity of this approach.

Expand Down
11 changes: 6 additions & 5 deletions SickChill.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import datetime
import mimetypes
import os
import platform
import shutil
Expand Down Expand Up @@ -28,14 +29,12 @@

setup_gettext()

import mimetypes

mimetypes.add_type("text/css", ".css")
mimetypes.add_type("application/sfont", ".otf")
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 wont matter
# 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 @@ -67,6 +66,8 @@ def __init__(self):
self.run_as_daemon = False

# web server constants
self.flask_server = None

self.web_server = None
self.forced_port = None
self.no_launch = False
Expand Down Expand Up @@ -253,7 +254,7 @@ def load_shows_from_db():
for sql_show in sql_results:
try:
cur_show = TVShow(sql_show["indexer"], sql_show["indexer_id"])
cur_show.nextEpisode()
cur_show.next_episode()
settings.showList.append(cur_show)
except Exception as error:
logger.exception("There was an error creating the show in {}: Error {}".format(sql_show["location"], error))
Expand Down Expand Up @@ -301,7 +302,7 @@ def shutdown(self, event):
"""
if settings.started:
sickchill.start.halt() # stop all tasks
sickchill.start.saveAll() # save all shows to DB
sickchill.start.save_all() # save all shows to DB

# shutdown web server
if self.web_server:
Expand Down
2 changes: 1 addition & 1 deletion sickchill/gui/slick/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const SICKCHILL = {
+ '<input type="checkbox" id="deleteFiles" name="deleteFiles"/>&nbsp;'
+ '<label for="deleteFiles" class="red-text">Check to delete files as well. IRREVERSIBLE</label>',
confirm(event) {
location.href = event.context.href + ($('#deleteFiles')[0].checked ? '&full=1' : '');
location.href = event.context.href + ($('#deleteFiles')[0].checked ? '&full=1' : '&full=0');
},
});

Expand Down
2 changes: 1 addition & 1 deletion sickchill/gui/slick/views/addShows_favoriteShows.mako
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<i>${cur_result.siteRatingCount}</i>
<div class="traktShowTitleIcons">
<a href="${scRoot}/addShows/addShowByID?indexer_id=${cur_result.id}&amp;show_name=${cur_result.seriesName | u}&amp;indexer=TVDB"
class="btn btn-xs" data-no-redirect>${_('Add Show')}</a>
class="btn btn-xs">${_('Add Show')}</a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion sickchill/gui/slick/views/addShows_popularShows.mako
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

<div class="traktShowTitleIcons">
<a href="${scRoot}/addShows/addShowByID?indexer_id=${current_imdb_id}&amp;show_name=${current_result['title'] | u}&amp;indexer=IMDB"
class="btn btn-xs" data-no-redirect>${_('Add Show')}</a>
class="btn btn-xs">${_('Add Show')}</a>
</div>
</div>
</div>
Expand Down
Loading
Loading