artemis-model 0.1.67__py3-none-any.whl → 0.1.69__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/__init__.py CHANGED
@@ -14,4 +14,3 @@ from artemis_model.track import * # noqa
14
14
  from artemis_model.user import * # noqa
15
15
  from artemis_model.zone import * # noqa
16
16
  from artemis_model.otp import * # noqa
17
-
artemis_model/playlist.py CHANGED
@@ -33,7 +33,6 @@ 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)
37
36
 
38
37
  name_tsv = mapped_column(
39
38
  TSVector(),
@@ -94,6 +93,10 @@ class PlaylistMixin(TimeStampMixin):
94
93
  secondary="playlist_category_assoc", viewonly=True
95
94
  )
96
95
 
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
+
97
100
  # __table_args__ = (
98
101
  # Index(
99
102
  # "fts_ix_playlist_name_tsv",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: artemis-model
3
- Version: 0.1.67
3
+ Version: 0.1.69
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -1,4 +1,4 @@
1
- artemis_model/__init__.py,sha256=ioJbxHgpk27FMPMDlM--9ZzSDKZet98VzW0wDjU2DqI,693
1
+ artemis_model/__init__.py,sha256=VwCQjY-_A2WqI4wLdUwVKh8diUOE67qkGK_8KqL665k,692
2
2
  artemis_model/album.py,sha256=cnjrE0catTK24uWTrAoRcZUQB3CPt5l8s9PeM2sxLrc,2103
3
3
  artemis_model/artist.py,sha256=Mx2bnl7bxqm2ELjDIePGFfIkQU_DbnfOTc507dzh14g,1577
4
4
  artemis_model/auth.py,sha256=WVonoYbCE0uvRuPR2Fz1hZJ-xmbyTuBVt6H51X6OfEs,4087
@@ -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=sXiXil3ezCuU-L9EI1URKIRUs1fnO2z9VuwILSxBBwI,5815
14
+ artemis_model/playlist.py,sha256=MPdb9uKZd2f0M2A_V5OUAz-fG7u2FhN2ztlxXblYpps,5890
15
15
  artemis_model/schedule.py,sha256=Noj6CAcw4xJS8wvtiLiPNvQyzjImU8wuhKo0c6c2zb4,1155
16
16
  artemis_model/setting.py,sha256=McWbeDZP45km3VSSwP1BgAmmjO4qCL0pTnOmJVAz0WI,1265
17
17
  artemis_model/track.py,sha256=XOSUEqGvz0XladvriWFNXdwvVKYlwvQlbcqW7E-mEuU,3774
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.67.dist-info/METADATA,sha256=0fPg_ZLAmHRFuWjhxm7iOlWeD0VxDQuMNY4pRsHO03A,3351
21
- artemis_model-0.1.67.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
- artemis_model-0.1.67.dist-info/RECORD,,
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,,