Skip to content

Commit

Permalink
Mjp unlisted tracks (#7860)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrombo authored Mar 15, 2024
1 parent 5c0017e commit 181429a
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/discovery-provider/src/api/v1/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class FullTrack(Resource):
@record_metrics
@full_ns.doc(
id="""Get Track""",
description="""Gets a track by ID. If `show_unlisted` is true, then `handle` and `url_title` are required.""",
description="""Gets a track by ID.""",
params={
"track_id": "A Track ID",
},
Expand Down
5 changes: 1 addition & 4 deletions packages/discovery-provider/src/tasks/index_user_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,4 @@ def index_user_bank(self):
finally:
if have_lock:
update_lock.release()
celery.send_task("index_user_bank", countdown=0.5, queue="index_nethermind")
celery.send_task(
"index_user_bank", countdown=0.5, queue="index_sol"
)
celery.send_task("index_user_bank", countdown=0.5, queue="index_sol")
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.0-SNAPSHOT
7.5.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ export interface Playlist {
* @memberof Playlist
*/
user: User;
/**
*
* @type {string}
* @memberof Playlist
*/
ddexApp?: string;
}

/**
Expand Down Expand Up @@ -153,6 +159,7 @@ export function PlaylistFromJSONTyped(json: any, ignoreDiscriminator: boolean):
'favoriteCount': json['favorite_count'],
'totalPlayCount': json['total_play_count'],
'user': UserFromJSON(json['user']),
'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'],
};
}

Expand All @@ -177,6 +184,7 @@ export function PlaylistToJSON(value?: Playlist | null): any {
'favorite_count': value.favoriteCount,
'total_play_count': value.totalPlayCount,
'user': UserToJSON(value.user),
'ddex_app': value.ddexApp,
};
}

16 changes: 16 additions & 0 deletions packages/libs/src/sdk/api/generated/default/models/Track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ export interface Track {
* @memberof Track
*/
isStreamable?: boolean;
/**
*
* @type {string}
* @memberof Track
*/
ddexApp?: string;
/**
*
* @type {Array<number>}
* @memberof Track
*/
playlistsContainingTrack?: Array<number>;
}

/**
Expand Down Expand Up @@ -228,6 +240,8 @@ export function TrackFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
'playCount': json['play_count'],
'permalink': !exists(json, 'permalink') ? undefined : json['permalink'],
'isStreamable': !exists(json, 'is_streamable') ? undefined : json['is_streamable'],
'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'],
'playlistsContainingTrack': !exists(json, 'playlists_containing_track') ? undefined : json['playlists_containing_track'],
};
}

Expand Down Expand Up @@ -263,6 +277,8 @@ export function TrackToJSON(value?: Track | null): any {
'play_count': value.playCount,
'permalink': value.permalink,
'is_streamable': value.isStreamable,
'ddex_app': value.ddexApp,
'playlists_containing_track': value.playlistsContainingTrack,
};
}

Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.0-SNAPSHOT
7.5.0-SNAPSHOT
19 changes: 2 additions & 17 deletions packages/libs/src/sdk/api/generated/full/apis/TracksApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ export interface GetRemixableTracksRequest {
export interface GetTrackRequest {
trackId: string;
userId?: string;
handle?: string;
urlTitle?: string;
showUnlisted?: boolean;
}

export interface GetTrackRemixParentsRequest {
Expand Down Expand Up @@ -537,7 +534,7 @@ export class TracksApi extends runtime.BaseAPI {

/**
* @hidden
* Gets a track by ID. If `show_unlisted` is true, then `handle` and `url_title` are required.
* Gets a track by ID.
*/
async getTrackRaw(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FullTrackResponse>> {
if (params.trackId === null || params.trackId === undefined) {
Expand All @@ -550,18 +547,6 @@ export class TracksApi extends runtime.BaseAPI {
queryParameters['user_id'] = params.userId;
}

if (params.handle !== undefined) {
queryParameters['handle'] = params.handle;
}

if (params.urlTitle !== undefined) {
queryParameters['url_title'] = params.urlTitle;
}

if (params.showUnlisted !== undefined) {
queryParameters['show_unlisted'] = params.showUnlisted;
}

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
Expand All @@ -575,7 +560,7 @@ export class TracksApi extends runtime.BaseAPI {
}

/**
* Gets a track by ID. If `show_unlisted` is true, then `handle` and `url_title` are required.
* Gets a track by ID.
*/
async getTrack(params: GetTrackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FullTrackResponse> {
const response = await this.getTrackRaw(params, initOverrides);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ export interface PlaylistFull {
* @memberof PlaylistFull
*/
user: UserFull;
/**
*
* @type {string}
* @memberof PlaylistFull
*/
ddexApp?: string;
/**
*
* @type {number}
Expand Down Expand Up @@ -278,6 +284,7 @@ export function PlaylistFullFromJSONTyped(json: any, ignoreDiscriminator: boolea
'favoriteCount': json['favorite_count'],
'totalPlayCount': json['total_play_count'],
'user': UserFullFromJSON(json['user']),
'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'],
'blocknumber': json['blocknumber'],
'createdAt': !exists(json, 'created_at') ? undefined : json['created_at'],
'followeeReposts': ((json['followee_reposts'] as Array<any>).map(RepostFromJSON)),
Expand Down Expand Up @@ -318,6 +325,7 @@ export function PlaylistFullToJSON(value?: PlaylistFull | null): any {
'favorite_count': value.favoriteCount,
'total_play_count': value.totalPlayCount,
'user': UserFullToJSON(value.user),
'ddex_app': value.ddexApp,
'blocknumber': value.blocknumber,
'created_at': value.createdAt,
'followee_reposts': ((value.followeeReposts as Array<any>).map(RepostToJSON)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ export interface PlaylistFullWithoutTracks {
* @memberof PlaylistFullWithoutTracks
*/
user: UserFull;
/**
*
* @type {string}
* @memberof PlaylistFullWithoutTracks
*/
ddexApp?: string;
/**
*
* @type {number}
Expand Down Expand Up @@ -277,6 +283,7 @@ export function PlaylistFullWithoutTracksFromJSONTyped(json: any, ignoreDiscrimi
'favoriteCount': json['favorite_count'],
'totalPlayCount': json['total_play_count'],
'user': UserFullFromJSON(json['user']),
'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'],
'blocknumber': json['blocknumber'],
'createdAt': !exists(json, 'created_at') ? undefined : json['created_at'],
'followeeReposts': ((json['followee_reposts'] as Array<any>).map(RepostFromJSON)),
Expand Down Expand Up @@ -317,6 +324,7 @@ export function PlaylistFullWithoutTracksToJSON(value?: PlaylistFullWithoutTrack
'favorite_count': value.favoriteCount,
'total_play_count': value.totalPlayCount,
'user': UserFullToJSON(value.user),
'ddex_app': value.ddexApp,
'blocknumber': value.blocknumber,
'created_at': value.createdAt,
'followee_reposts': ((value.followeeReposts as Array<any>).map(RepostToJSON)),
Expand Down
24 changes: 24 additions & 0 deletions packages/libs/src/sdk/api/generated/full/models/TrackFull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,18 @@ export interface TrackFull {
* @memberof TrackFull
*/
isStreamable?: boolean;
/**
*
* @type {string}
* @memberof TrackFull
*/
ddexApp?: string;
/**
*
* @type {Array<number>}
* @memberof TrackFull
*/
playlistsContainingTrack?: Array<number>;
/**
*
* @type {number}
Expand Down Expand Up @@ -291,6 +303,12 @@ export interface TrackFull {
* @memberof TrackFull
*/
iswc?: string;
/**
*
* @type {object}
* @memberof TrackFull
*/
ddexReleaseIds?: object;
/**
*
* @type {FieldVisibility}
Expand Down Expand Up @@ -506,6 +524,8 @@ export function TrackFullFromJSONTyped(json: any, ignoreDiscriminator: boolean):
'playCount': json['play_count'],
'permalink': !exists(json, 'permalink') ? undefined : json['permalink'],
'isStreamable': !exists(json, 'is_streamable') ? undefined : json['is_streamable'],
'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'],
'playlistsContainingTrack': !exists(json, 'playlists_containing_track') ? undefined : json['playlists_containing_track'],
'blocknumber': json['blocknumber'],
'createDate': !exists(json, 'create_date') ? undefined : json['create_date'],
'coverArtSizes': !exists(json, 'cover_art_sizes') ? undefined : json['cover_art_sizes'],
Expand All @@ -516,6 +536,7 @@ export function TrackFullFromJSONTyped(json: any, ignoreDiscriminator: boolean):
'isrc': !exists(json, 'isrc') ? undefined : json['isrc'],
'license': !exists(json, 'license') ? undefined : json['license'],
'iswc': !exists(json, 'iswc') ? undefined : json['iswc'],
'ddexReleaseIds': !exists(json, 'ddex_release_ids') ? undefined : json['ddex_release_ids'],
'fieldVisibility': !exists(json, 'field_visibility') ? undefined : FieldVisibilityFromJSON(json['field_visibility']),
'followeeReposts': ((json['followee_reposts'] as Array<any>).map(RepostFromJSON)),
'hasCurrentUserReposted': json['has_current_user_reposted'],
Expand Down Expand Up @@ -577,6 +598,8 @@ export function TrackFullToJSON(value?: TrackFull | null): any {
'play_count': value.playCount,
'permalink': value.permalink,
'is_streamable': value.isStreamable,
'ddex_app': value.ddexApp,
'playlists_containing_track': value.playlistsContainingTrack,
'blocknumber': value.blocknumber,
'create_date': value.createDate,
'cover_art_sizes': value.coverArtSizes,
Expand All @@ -587,6 +610,7 @@ export function TrackFullToJSON(value?: TrackFull | null): any {
'isrc': value.isrc,
'license': value.license,
'iswc': value.iswc,
'ddex_release_ids': value.ddexReleaseIds,
'field_visibility': FieldVisibilityToJSON(value.fieldVisibility),
'followee_reposts': ((value.followeeReposts as Array<any>).map(RepostToJSON)),
'has_current_user_reposted': value.hasCurrentUserReposted,
Expand Down

0 comments on commit 181429a

Please sign in to comment.