Skip to content

Commit

Permalink
[PAY-2527] Return playlists_containing_track from track apis (#7764)
Browse files Browse the repository at this point in the history
  • Loading branch information
amendelsohn authored Mar 1, 2024
1 parent dbc6dc1 commit 4f6972f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def test_valid_parse_metadata(app):
"audio_upload_id": None,
"placement_hosts": None,
"ddex_app": None,
"playlists_containing_track": None,
},
"QmUpdatePlaylist1": {
"playlist_id": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ export type Tracks = {
is_download_gated: boolean;
download_conditions: unknown | null;
is_original_available: boolean;
playlists_containing_track: number[] | null;
orig_file_cid: string | null;
orig_filename: string | null;
ddex_app: string | null;
Expand Down
1 change: 1 addition & 0 deletions packages/discovery-provider/src/api/v1/models/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"permalink": fields.String,
"is_streamable": fields.Boolean,
"ddex_app": fields.String(allow_null=True),
"playlists_containing_track": fields.List(fields.Integer),
},
)

Expand Down
7 changes: 7 additions & 0 deletions packages/discovery-provider/src/schemas/track_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"type": "integer",
"default": 0
},
"playlists_containing_track": {
"type": "array",
"default": [],
"items": {
"type": "integer"
}
},
"preview_start_seconds": {
"type": [
"float",
Expand Down
2 changes: 2 additions & 0 deletions packages/discovery-provider/src/tasks/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class TrackMetadata(TypedDict):
is_download_gated: Optional[bool]
download_conditions: Optional[Any]
is_playlist_upload: Optional[bool]
playlists_containing_track: Optional[List[int]]
ai_attribution_user_id: Optional[int]
placement_hosts: Optional[str]
ddex_app: Optional[str]
Expand Down Expand Up @@ -121,6 +122,7 @@ class TrackMetadata(TypedDict):
"is_download_gated": False,
"download_conditions": None,
"is_playlist_upload": False,
"playlists_containing_track": None,
"ai_attribution_user_id": None,
"placement_hosts": None,
"ddex_app": None,
Expand Down

0 comments on commit 4f6972f

Please sign in to comment.