Skip to content

Commit

Permalink
Added notes section in details page
Browse files Browse the repository at this point in the history
Fixed marking seasons/episodes as watched resulted always in mobile buttons to show

Closes #41
  • Loading branch information
aleiepure committed Feb 11, 2025
1 parent c5c19cc commit 367574a
Show file tree
Hide file tree
Showing 9 changed files with 382 additions and 144 deletions.
2 changes: 2 additions & 0 deletions data/icons/symbolic/floppy-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 17 additions & 9 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

/* Light mode CSS - Main style */

.notes {
border-radius: 12px;
background-color: alpha(#dddddd, 0.2);
}

.chip {
padding: 0 7px;
line-height: 20px;
Expand All @@ -17,20 +22,23 @@
border-radius: 12px;
}

.light{
color:@light_2;
.light {
color: @light_2;
}
.dark{
color:@dark_3;

.dark {
color: @dark_3;
}

.still {
border-radius: 6px;
}

.shadow{
.shadow {
box-shadow: 0px 0px 4px 4px @accent_color;
}
.pulse{

.pulse {
animation-name: breathing;
animation-duration: 3s;
animation-timing-function: ease-in-out;
Expand All @@ -40,7 +48,7 @@
animation-fill-mode: none;
animation-play-state: running;
}

@keyframes breathing {
0% {
transform: scale(1);
Expand All @@ -60,7 +68,7 @@
}

.progress_complete progress {
background-color: @success_color;
background-color: @success_color;
}

.progress_error progress {
Expand Down Expand Up @@ -123,4 +131,4 @@
-gtk-icon-source: -gtk-icontheme("object-select-symbolic");
background-color: @theme_selected_bg_color;
color: @theme_selected_fg_color;
}
}
4 changes: 4 additions & 0 deletions src/models/movie_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class MovieModel(GObject.GObject):
status (str): movie status, usually released or planned
title (str): movie title
watched (bool): if the movie has been market as watched
notes (str): additional notes added by the user
Methods:
None
Expand Down Expand Up @@ -77,6 +78,7 @@ class MovieModel(GObject.GObject):
tagline = GObject.Property(type=str, default='')
title = GObject.Property(type=str, default='')
watched = GObject.Property(type=bool, default=False)
notes = GObject.Property(type=str, default='')

def __init__(self, d=None, t=None):
super().__init__()
Expand Down Expand Up @@ -109,6 +111,7 @@ def __init__(self, d=None, t=None):
self.activate_notification = datetime.strptime(self.release_date, '%Y-%m-%d') > datetime.strptime(
# if the release date is in the future activate notifications
self.add_date, '%Y-%m-%d') if self.release_date and self.add_date else False
self.notes = ''
else:
self.activate_notification = t["activate_notification"] # type: ignore
self.add_date = t["add_date"] # type: ignore
Expand All @@ -134,6 +137,7 @@ def __init__(self, d=None, t=None):
self.tagline = t["tagline"] # type: ignore
self.title = t["title"] # type: ignore
self.watched = t["watched"] # type:ignore
self.notes = t["notes"] # type: ignore

def _parse_genres(self, api_dict: dict = {}, db_str: str = '') -> List[str]:
"""
Expand Down
5 changes: 5 additions & 0 deletions src/models/series_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class SeriesModel(GObject.GObject):
title (str): series title
watched (bool): whether the series has been watched completely or not
activate_notification (bool): whether the series should be checked for new releases
notes (str): user notes
Methods:
None
Expand Down Expand Up @@ -85,6 +86,7 @@ class SeriesModel(GObject.GObject):
tagline = GObject.Property(type=str, default='')
title = GObject.Property(type=str, default='')
watched = GObject.Property(type=bool, default=False)
notes = GObject.Property(type=str, default='')

def __init__(self, d=None, t=None):
super().__init__()
Expand Down Expand Up @@ -124,6 +126,7 @@ def __init__(self, d=None, t=None):
self.soon_release = datetime.strptime(self.next_air_date, '%Y-%m-%d') < datetime.now() + timedelta(days=6)
else:
self.soon_release = False
self.notes = ''
else:
self.activate_notification = t["activate_notification"]
self.add_date = t["add_date"] # type: ignore
Expand Down Expand Up @@ -158,6 +161,8 @@ def __init__(self, d=None, t=None):
else:
self.seasons = local.LocalProvider.get_all_seasons(
self.id) # type: ignore

self.notes = t["notes"] # type: ignore

def _parse_genres(self, api_dict: dict = {}, db_str: str = '') -> List[str]:
"""
Expand Down
Loading

0 comments on commit 367574a

Please sign in to comment.