-
Notifications
You must be signed in to change notification settings - Fork 82
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
New 'Next episode column' in GTK and for MAL (Qt and GTK) + miscellaneous code refactor #722
base: master
Are you sure you want to change the base?
Conversation
UI: - QoL changes to the right-click context menu of a show, dynamic site name in particular - Added "Next episode" column with custom sorting - Renamed the old "Progress" column (e.g: 7/13) to Watched, and renamed "Percent" column (the progress bar) to "Progress". - Set minimum width for the progress bar to 200 pixels Code: - Refactored a significant part of the list tree (showtreeview.py), making it much easier to read and build upon. - Unified column / row reference constants - The tree model is now set immediately after tree initialisation
- Replaced deprecated datetime.utcnow() with timezone aware datetime.now(datetime.UTC).
- Added 'New episode' as default column - Reset visible columns config to accommodate the new column names
- Remove redundant comments / commented code blocks - Add comments to new code - Refactored relative time regex to multiple shorter lines
- Added comments to tree references - Renamed some local tree variables to be more intuitive - Changed percentage progress variable type to int
- columns are only sorted when the header is clicked - Disabled sorting indicators for inactive columns - Centred columns and contents (except Title)
- Slightly rewrote code for the sorting setup again - Fixed multiple sort indicator issue - Sort indicators now have uniform default direction
- Bump required python version to 3.10, as 3.8 is outdated and 3.10 brings a lot of QoL changes. The "oldest" main distro is Ubuntu 22.04 and even that ships with Python 3.10 by default. Pretty much every other distro should be 3.10 or newer as well.
- Increased window size from 740x480 to 1080x720. The default was last changed and set in 2015, which made sense back then, but it's way too small for most modern displays.
- Replaced python >=3.11 exclusive `datetime.timezone.utc` alias `datetime.UTC`. Should run in 3.10 now.
- Displays 'Next episode' for MAL, where applicable - Added a bunch of comments for clarity - Indents in `libmal.py` were cleaned up a bit - Renamed `header_button_press` to `header_right_click` for clarity. - The state of MAL is pretty sad, it does not give an actual weekly airing time, just a general broadcast schedule, so if an episode gets delayed, there is no way of knowing without 3rd party sites. This is not an issue with the code, but with MAL. Use Anilist.
- Displays 'Next episode' for MAL, where applicable (new in Qt) - Added a bunch of comments for clarity - Indents in `libmal.py` were cleaned up a bit - Renamed `header_button_press` to `header_right_click` for clarity. - The state of MAL is pretty sad, it does not give an actual weekly airing time, just a general broadcast schedule, so if an episode gets delayed, there is no way of knowing without 3rd party sites. This is not an issue with the code, but with MAL. Use Anilist.
…GTK-'Next-episode-column'
Added MAL support, with all of their information. Kitsu provides no information and Shikimori is dead. The poetry update consists mostly of minor version changes, the only difference being urllib3, but I don't think this is an issue for Trackma, as only barebones urllib functionality is being used. The other major change is obviously python 3.8 → 3.10, but I think this shouldn't be an issue either. Could someone take a look? I promise the code is readable and well commented, so it shouldn't take too long. The GTK version is well tested, but Qt should be stable as well. |
Doesn't apply cleanly to master due to some extraneous changes but easy to clean up by hand. Absolutely essential feature, especially now that Qt5 is obsoleted but PyQt6 port is stalled. |
I now realise this probably should have been a few different PRs instead of one.
Changelist
Screenshots are at the bottom
GTK
UI
E.g: 10, 10, 8, 4 etc. Changed columns:
Code
ShowTreeView.py
:TreeConstants
class to improve readability and uniformityQt
UI
Code
datetime.utcnow()
with time zone awaredatetime.now(datetime.timezone.utc)
Other
poetry.lock
Screenshots GTK
Default
Next episode sorting down (Anilist)
Next episode sorting up (Anilist)
MAL Support
Context menu Anilist
Context menu MAL
Screenshots Qt
Anilist
MAL