artemis-model 0.1.142__tar.gz → 0.1.144__tar.gz

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.

Potentially problematic release.


This version of artemis-model might be problematic. Click here for more details.

Files changed (32) hide show
  1. {artemis_model-0.1.142 → artemis_model-0.1.144}/PKG-INFO +1 -1
  2. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/redis/__init__.py +2 -2
  3. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/redis/zone_state.py +4 -11
  4. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/sqs/messages.py +2 -2
  5. {artemis_model-0.1.142 → artemis_model-0.1.144}/pyproject.toml +1 -1
  6. {artemis_model-0.1.142 → artemis_model-0.1.144}/README.md +0 -0
  7. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/__init__.py +0 -0
  8. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/album.py +0 -0
  9. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/artist.py +0 -0
  10. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/auth.py +0 -0
  11. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/banned_tracks.py +0 -0
  12. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/base.py +0 -0
  13. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/category.py +0 -0
  14. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/dj_set.py +0 -0
  15. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/genre.py +0 -0
  16. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/location.py +0 -0
  17. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/message.py +0 -0
  18. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/organization.py +0 -0
  19. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/otp.py +0 -0
  20. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/permission.py +0 -0
  21. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/playlist.py +0 -0
  22. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/redis/bucket.py +0 -0
  23. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/redis/device.py +0 -0
  24. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/redis/keys.py +0 -0
  25. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/redis/play_history.py +0 -0
  26. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/schedule.py +0 -0
  27. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/setting.py +0 -0
  28. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/sqs/__init__.py +0 -0
  29. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/track.py +0 -0
  30. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/user.py +0 -0
  31. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/zone.py +0 -0
  32. {artemis_model-0.1.142 → artemis_model-0.1.144}/artemis_model/zone_activity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: artemis-model
3
- Version: 0.1.142
3
+ Version: 0.1.144
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -4,7 +4,7 @@ from .zone_state import (
4
4
  ZoneState,
5
5
  NowPlaying,
6
6
  SessionId,
7
- BucketId,
7
+ BucketTS,
8
8
  PlaylistSimple,
9
9
  PushedPlaylistDetails,
10
10
  ScheduleDetails,
@@ -25,7 +25,7 @@ __all__ = [
25
25
  "ZoneState",
26
26
  "NowPlaying",
27
27
  "SessionId",
28
- "BucketId",
28
+ "BucketTS",
29
29
  "ActiveDevice",
30
30
  "PlaylistSimple",
31
31
  "PushedPlaylistDetails",
@@ -21,10 +21,10 @@ SessionId = Annotated[
21
21
  description="The session id of the pushed playlist. It's generated as a timestamp value of the current time."
22
22
  ),
23
23
  ]
24
- BucketId = Annotated[
24
+ BucketTS = Annotated[
25
25
  int | None,
26
26
  Field(
27
- description="The bucket id of the pushed playlist. It's calculated in set_bucket_track as the timestamp value of the timeslot."
27
+ description="The bucket id of the pushed playlist. It's calculated as the timestamp value of the timeslot."
28
28
  ),
29
29
  ]
30
30
 
@@ -56,11 +56,10 @@ class ScheduleDetails(BaseModel):
56
56
  class PushedPlaylistDetails(BaseModel):
57
57
  """Player details schema."""
58
58
 
59
- redis_details: dict[SessionId, BucketId] | None = Field(
59
+ bucket_ts: BucketTS | None = Field(
60
60
  default_factory=dict,
61
61
  description="""Pushed playlists does exist in Redis with a timestamp.
62
62
  Example: zone_{zone_id}_pp_bucket_{ts}
63
- Every pushplaylist action has a session id. Here we map these session ids to the bucket id.
64
63
  """,
65
64
  )
66
65
  playlists: list[PlaylistSimple] | None = Field(
@@ -76,12 +75,6 @@ class PushedPlaylistDetails(BaseModel):
76
75
  description="The expiry type of the pushed playlist",
77
76
  )
78
77
 
79
- @field_validator("redis_details", mode="before")
80
- @classmethod
81
- def default_empty_dict_if_none(cls, v):
82
- """Override none value to empty dict."""
83
- return v or {}
84
-
85
78
 
86
79
  class ZoneState(BaseModel):
87
80
  """Zone state schema."""
@@ -112,7 +105,7 @@ __all__ = [
112
105
  "ZoneState",
113
106
  "NowPlaying",
114
107
  "SessionId",
115
- "BucketId",
108
+ "BucketTS",
116
109
  "PlaylistSimple",
117
110
  "PushedPlaylistDetails",
118
111
  "ScheduleDetails",
@@ -6,7 +6,7 @@ from typing import Literal
6
6
  from uuid import UUID
7
7
 
8
8
 
9
- from artemis_model.redis.zone_state import BucketId, SessionId
9
+ from artemis_model.redis.zone_state import BucketTS, SessionId
10
10
  from artemis_model.schedule import ScheduleItem
11
11
  from pydantic import BaseModel, Field
12
12
 
@@ -88,7 +88,7 @@ class RefreshTrackBucketIn(BaseMessage):
88
88
 
89
89
  action: Action = Action.REFRESH_TRACK_BUCKET
90
90
  zone_id: int
91
- bucket_key: str
91
+ bucket_ts: BucketTS
92
92
 
93
93
 
94
94
  class RecalculateScheduleIn(BaseMessage):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "artemis-model"
3
- version = "0.1.142"
3
+ version = "0.1.144"
4
4
  description = ""
5
5
  authors = ["Jukeboxy"]
6
6
  readme = "README.md"