Skip to content

Commit

Permalink
show which users are on which songs
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Feb 15, 2024
1 parent c5ebd9c commit 5c4586f
Show file tree
Hide file tree
Showing 6 changed files with 760 additions and 317 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ storage2
mdx-daemon
*.pyc
backup*
venv
6 changes: 6 additions & 0 deletions musidex-rn/common/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ export const API = {
});
},

async retryFailedSongs(): Promise<Response> {
return fetch(apiURL + "/api/music/retry_errors", {
method: "post",
});
},

async restartServer(): Promise<Response> {
return fetch(apiURL + "/api/restart_server", {});
},
Expand Down
2 changes: 2 additions & 0 deletions musidex-rn/common/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type MusidexMetadata = {
settings: Map<string, string>;
embeddings: Map<number, Vector>;
user_songs: Map<number, number[]>;
user_names: Map<number, string>;
playable: Set<number>;
fuse_document: IndexedMusic[];
unique_user_tags: Set<string>;
Expand Down Expand Up @@ -72,6 +73,7 @@ export function newMetadata(raw: RawMusidexMetadata, previous?: MusidexMetadata)
music_tags_idx: new Map(),
embeddings: new Map(),
user_songs: new Map(),
user_names: new Map(raw.users.map((u) => [u.id, u.name])),
fuse_document: [],
tags: raw.tags || previous?.tags || [],
playable: new Set(),
Expand Down
2 changes: 2 additions & 0 deletions musidex-ts-common/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type MusidexMetadata = {
settings: Map<string, string>;
embeddings: Map<number, Vector>;
user_songs: Map<number, number[]>;
user_names: Map<number, string>;
playable: Set<number>;
fuse_document: IndexedMusic[];
unique_user_tags: Set<string>;
Expand Down Expand Up @@ -72,6 +73,7 @@ export function newMetadata(raw: RawMusidexMetadata, previous?: MusidexMetadata)
music_tags_idx: new Map(),
embeddings: new Map(),
user_songs: new Map(),
user_names: new Map(raw.users.map((u) => [u.id, u.name])),
fuse_document: [],
tags: raw.tags || previous?.tags || [],
playable: new Set(),
Expand Down
Loading

0 comments on commit 5c4586f

Please sign in to comment.