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

Add notifications support #38

Closed
wants to merge 40 commits into from

Conversation

gnesterif
Copy link
Contributor

@gnesterif gnesterif commented Nov 3, 2023

Adds notifications and badges to TicketBooth.
Other smaller changes are also included in this branch like showing the next air date of an episode if known.
Not yet done is translation support for the new strings.
In the process I refactored a lot of sql related code to be more debugging friendly, not that I needed that 😅🥲🫣
Closes #30

Added four new fields for notification managment.
And added a more flexible way to create SeriesModel from local db
In db the field is called activate_notification, and all the series that
have the field set to true are called notification list.
Readded the year pill below the image. Also added the status of the
movie or series. And then added a tooltip to the badges to explain the
meaning.
This fixes the movie details page.
Added more margin to the badges so that they sit more nicely in the
poster.
Second added preliminary support for coloring the badges white or black
depending on the poster background in the upper right corner.
Add color field, add handling in manual dialog, add calculation method
to relevant places. Also update update_series_table to include color and
create update_movies_table to update color.
This adds activate_notification, soon/new_release to the MovieModel.
Adds necessary functions or alters exsisting functions in LocalProvider
to accomodate MovieModels.
Activates badges for movies in poster_button.
Adds logic for movies to the update_notification_list in main_view.
And adds relevant buttons in details_page.
This column is used to handle the removal of the new_release flag
better. Now if the newest released episode is marked as watched the
new_release field is set to false.
This view adds new columns to the database, fetches all content newly
from TMDB and shows the progress in a progress bar.
This adds the recent_change flag to the models and adds the
corresponding functions in the LocalProvider including the
update_*_table() functions.
If the recent_change field is true add a box-shadow and a pulsating
effect to the PosterButtons in ContentView.
Reset recent_change on closing of application.
On every change of notification status and recent_change the ContentView
gets now refreshed assuring that the badges are uptodate.
Remember hours and minutes of the last notification list update.
Set recent_change in the logic and improve the notifications.
Now only one notification will be shown.
Add a watched detection, that where for some reason not set in my old
db. Also included some varios clean up all over the code base.
We now set the watched flag of series to false if a new epsiode has come
out.
After the update is finished we ask the user if he wants to activate
notification or not. This is done by showing a new page in a carousel
@gnesterif gnesterif marked this pull request as ready for review November 7, 2023 18:03
@gnesterif
Copy link
Contributor Author

To test the update procedure from the old db to the new you will need to copy the data and config folder from the release to the development folder and change the first line of config/glib-2.0/settings/keyfile to [me/iepure/Ticketbooth/Devel]

@gnesterif gnesterif force-pushed the notification-on-release branch from 617f207 to 9412672 Compare November 9, 2023 15:03
Adds all new strings to gettext and updates po folder.
Also added some new labels some other small cleanup.
I could generate some strange behaviour before, now I cannot. I do not
know exactly what was the problem, but this seems to fix it.
@gnesterif gnesterif force-pushed the notification-on-release branch from 9412672 to 8358dc1 Compare November 10, 2023 16:01
gnesterif and others added 2 commits November 22, 2023 23:09
Corrects soon_release flag calculation in MovieModel, and also adds it
to SeriesModel. Therefore removes it from update_series in
LocalProvider. Then we improve the badge logic in poster_button.py. And
finally corrects a typo in main_view.py that is triggered rarely.
@aleiepure
Copy link
Owner

aleiepure commented Feb 10, 2025

Sorry for taking so long, life got in the way.
Been a while since this was opened 😅

I fixed a few merge conflicts, checked out your PR to test it locally (got it working after some finagling), and then IDK what happened while pushing the latest changes as GitHub created another PR (#53). I am going to close this as is and merge the other which has the latest commit.

@aleiepure aleiepure closed this Feb 10, 2025
@gnesterif
Copy link
Contributor Author

Hey, glad you're back and glad you could get this to run. I think I have some other branches on my hard disk. I will check if I can push them next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Notification on newly released episodes
2 participants