feat: the library's folders are set in Admin › Library, and changing a folder moves its tracks with it, keeping their plays, likes and playlists (#6129)
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m20s
release / go (push) Failing after 1m37s
release / integration (push) Failing after 4m56s
release / android (push) Successful in 5m1s
release / Build signed APK (releases and dev) (push) Successful in 5m13s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m20s
release / go (push) Failing after 1m37s
release / integration (push) Failing after 4m56s
release / android (push) Successful in 5m1s
release / Build signed APK (releases and dev) (push) Successful in 5m13s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -365,6 +365,35 @@ export async function updateLoudnessSettings(s: LoudnessSettings): Promise<Loudn
|
||||
return api.put<LoudnessSettings>('/api/admin/library/loudness-settings', s);
|
||||
}
|
||||
|
||||
// The library's folders (#6129) -----------------------------------------------
|
||||
|
||||
export type LibraryFolder = {
|
||||
path: string;
|
||||
/** Whether the server can see the folder right now. */
|
||||
present: boolean;
|
||||
tracks: number;
|
||||
};
|
||||
|
||||
export type LibraryFolders = {
|
||||
folders: LibraryFolder[];
|
||||
/** False while the folders still come from MINSTREL_LIBRARY_SCAN_PATHS. */
|
||||
saved: boolean;
|
||||
/** How many tracks a save moved to a new folder. */
|
||||
moved?: number;
|
||||
};
|
||||
|
||||
/** One folder of a save. `was` is the folder it replaces, whose files are now
|
||||
* at `path`; '' is a folder added. */
|
||||
export type LibraryFolderChange = { path: string; was: string };
|
||||
|
||||
export async function getLibraryFolders(): Promise<LibraryFolders> {
|
||||
return api.get<LibraryFolders>('/api/admin/library/folders');
|
||||
}
|
||||
|
||||
export async function updateLibraryFolders(folders: LibraryFolderChange[]): Promise<LibraryFolders> {
|
||||
return api.put<LibraryFolders>('/api/admin/library/folders', { folders });
|
||||
}
|
||||
|
||||
// AcoustID recording-id lookup (M401) ---------------------------------------
|
||||
|
||||
export type AcoustIDSettings = {
|
||||
|
||||
@@ -21,7 +21,9 @@ const DETAIL_CODES: ReadonlySet<string> = new Set([
|
||||
// The server names the field and its range (#3913).
|
||||
'invalid_setting',
|
||||
// The server says what shape of address it wants (#4981).
|
||||
'invalid_public_url'
|
||||
'invalid_public_url',
|
||||
// The server names the folder and what is wrong with it (#6129).
|
||||
'bad_folders'
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user