Skip to content

Commit 8141337

Browse files
committed
feat: add media type preferences and UI settings to user model
1 parent b02ebda commit 8141337

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

src/users/models.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class User(AbstractUser):
9999
choices=HomeSortChoices.choices,
100100
)
101101

102+
# Media type preferences: TV Shows
102103
tv_enabled = models.BooleanField(default=True)
103104
tv_layout = models.CharField(
104105
max_length=20,
@@ -116,6 +117,7 @@ class User(AbstractUser):
116117
choices=MediaStatusChoices.choices,
117118
)
118119

120+
# Media type preferences: TV Seasons
119121
season_enabled = models.BooleanField(default=True)
120122
season_layout = models.CharField(
121123
max_length=20,
@@ -133,6 +135,7 @@ class User(AbstractUser):
133135
choices=MediaStatusChoices.choices,
134136
)
135137

138+
# Media type preferences: Movies
136139
movie_enabled = models.BooleanField(default=True)
137140
movie_layout = models.CharField(
138141
max_length=20,
@@ -150,6 +153,7 @@ class User(AbstractUser):
150153
choices=MediaStatusChoices.choices,
151154
)
152155

156+
# Media type preferences: Anime
153157
anime_enabled = models.BooleanField(default=True)
154158
anime_layout = models.CharField(
155159
max_length=20,
@@ -167,6 +171,7 @@ class User(AbstractUser):
167171
choices=MediaStatusChoices.choices,
168172
)
169173

174+
# Media type preferences: Manga
170175
manga_enabled = models.BooleanField(default=True)
171176
manga_layout = models.CharField(
172177
max_length=20,
@@ -184,6 +189,7 @@ class User(AbstractUser):
184189
choices=MediaStatusChoices.choices,
185190
)
186191

192+
# Media type preferences: Games
187193
game_enabled = models.BooleanField(default=True)
188194
game_layout = models.CharField(
189195
max_length=20,
@@ -201,6 +207,7 @@ class User(AbstractUser):
201207
choices=MediaStatusChoices.choices,
202208
)
203209

210+
# Media type preferences: Books
204211
book_enabled = models.BooleanField(default=True)
205212
book_layout = models.CharField(
206213
max_length=20,
@@ -218,6 +225,7 @@ class User(AbstractUser):
218225
choices=MediaStatusChoices.choices,
219226
)
220227

228+
# Media type preferences: Comics
221229
comic_enabled = models.BooleanField(default=True)
222230
comic_layout = models.CharField(
223231
max_length=20,
@@ -235,58 +243,58 @@ class User(AbstractUser):
235243
choices=MediaStatusChoices.choices,
236244
)
237245

246+
# UI preferences
238247
clickable_media_cards = models.BooleanField(
239248
default=False,
240249
help_text="Hide hover overlay on touch devices",
241250
)
242251

252+
# Calendar preferences
243253
calendar_layout = models.CharField(
244254
max_length=20,
245255
default=CalendarLayoutChoices.GRID,
246256
choices=CalendarLayoutChoices.choices,
247257
)
248258

259+
# Lists preferences
249260
lists_sort = models.CharField(
250261
max_length=20,
251262
default=ListSortChoices.LAST_ITEM_ADDED,
252263
choices=ListSortChoices.choices,
253264
)
254-
255265
list_detail_sort = models.CharField(
256266
max_length=20,
257267
default=ListDetailSortChoices.DATE_ADDED,
258268
choices=ListDetailSortChoices.choices,
259269
)
260270

271+
# Notification settings
261272
notification_urls = models.TextField(
262273
blank=True,
263274
help_text="Apprise URLs for notifications",
264275
)
265-
266276
notification_excluded_items = models.ManyToManyField(
267277
Item,
268278
related_name="excluded_by_users",
269279
blank=True,
270280
help_text="Items excluded from notifications",
271281
)
272-
273282
release_notifications_enabled = models.BooleanField(
274283
default=True,
275284
help_text="Receive notifications for recently released media",
276285
)
277-
278286
daily_digest_enabled = models.BooleanField(
279287
default=True,
280288
help_text="Receive a daily digest of upcoming releases",
281289
)
282290

291+
# Integration settings
283292
token = models.CharField(
284293
max_length=32,
285294
unique=True,
286295
default=generate_token,
287296
help_text="Token for external integrations",
288297
)
289-
290298
plex_usernames = models.TextField(
291299
blank=True,
292300
help_text="Comma-separated list of Plex usernames for webhook matching",

0 commit comments

Comments
 (0)