artemis-model 0.1.69__py3-none-any.whl → 0.1.71__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
artemis_model/playlist.py CHANGED
@@ -33,6 +33,7 @@ class PlaylistMixin(TimeStampMixin):
33
33
  notes: Mapped[str | None] = mapped_column(nullable=True)
34
34
  published_at: Mapped[date | None] = mapped_column(nullable=True)
35
35
  is_private: Mapped[bool] = mapped_column(default=False)
36
+ total_duration: Mapped[int] = mapped_column(default=0)
36
37
 
37
38
  name_tsv = mapped_column(
38
39
  TSVector(),
@@ -93,10 +94,6 @@ class PlaylistMixin(TimeStampMixin):
93
94
  secondary="playlist_category_assoc", viewonly=True
94
95
  )
95
96
 
96
- @property
97
- def total_duration(self) -> int:
98
- return sum([0 if not t.duration else t.duration for t in self.tracks], 0)
99
-
100
97
  # __table_args__ = (
101
98
  # Index(
102
99
  # "fts_ix_playlist_name_tsv",
artemis_model/track.py CHANGED
@@ -2,7 +2,7 @@ import uuid
2
2
  from datetime import datetime
3
3
  from typing import List
4
4
 
5
- from sqlalchemy import UUID, Computed, ForeignKey, func, literal, text
5
+ from sqlalchemy import UUID, Computed, ForeignKey, func, literal, text, ARRAY, Integer
6
6
  from sqlalchemy.orm import Mapped, mapped_column, relationship
7
7
 
8
8
  from artemis_model.base import CustomBase, CustomSyncBase, TSVector, TimeStampMixin
@@ -32,6 +32,7 @@ class TrackMixin(TimeStampMixin):
32
32
  is_internal: Mapped[bool] = mapped_column(nullable=False, default=False)
33
33
  is_parental_advisory: Mapped[bool] = mapped_column(nullable=False, default=False)
34
34
  decade: Mapped[int] = mapped_column(nullable=True)
35
+ mood: Mapped[list[int]] = mapped_column(ARRAY(Integer), nullable=True)
35
36
  duration: Mapped[int] = mapped_column(nullable=True)
36
37
 
37
38
  name_tsv = mapped_column(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: artemis-model
3
- Version: 0.1.69
3
+ Version: 0.1.71
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -11,12 +11,12 @@ artemis_model/message.py,sha256=gua3X_1hS7akmS42wQGtL0I-FCJUHdTBM4n2DW4hTxQ,3280
11
11
  artemis_model/organization.py,sha256=hu9jKB2qu57BwN0sUUK13p3tC-Hqw9EghFMqjFP9Pr4,2387
12
12
  artemis_model/otp.py,sha256=TjZ_EHeIedjsLIqyZTtzd0s6Uc-1dleMEV8DhzsW44o,1046
13
13
  artemis_model/permission.py,sha256=sEBRN-bQJl2TNtRJ5LRuySoEbW1lY4DCoyRk0nOM-kY,1503
14
- artemis_model/playlist.py,sha256=MPdb9uKZd2f0M2A_V5OUAz-fG7u2FhN2ztlxXblYpps,5890
14
+ artemis_model/playlist.py,sha256=sXiXil3ezCuU-L9EI1URKIRUs1fnO2z9VuwILSxBBwI,5815
15
15
  artemis_model/schedule.py,sha256=Noj6CAcw4xJS8wvtiLiPNvQyzjImU8wuhKo0c6c2zb4,1155
16
16
  artemis_model/setting.py,sha256=McWbeDZP45km3VSSwP1BgAmmjO4qCL0pTnOmJVAz0WI,1265
17
- artemis_model/track.py,sha256=XOSUEqGvz0XladvriWFNXdwvVKYlwvQlbcqW7E-mEuU,3774
17
+ artemis_model/track.py,sha256=x8BHKDZl9uQmQH6DWpzH-SEsfecLghOBdBT7qXgN3d0,3865
18
18
  artemis_model/user.py,sha256=ZtZVwavSPoQmYM1_MarMULy-DJa2pH482G_G8su0b6c,2211
19
19
  artemis_model/zone.py,sha256=iGRUtzUwKh9LHT3MOfzzg1DnkPBts_ZBzZVTi2EmIgs,2282
20
- artemis_model-0.1.69.dist-info/METADATA,sha256=zINI5KAoXPDnI7MEmcabd9OJUKSrXTWRxKiULP5WQcg,3351
21
- artemis_model-0.1.69.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
- artemis_model-0.1.69.dist-info/RECORD,,
20
+ artemis_model-0.1.71.dist-info/METADATA,sha256=SZGgV0sWZk2EWFQ0LAUNMA-xL8u5wIzgoAsZlSzcX54,3351
21
+ artemis_model-0.1.71.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
+ artemis_model-0.1.71.dist-info/RECORD,,