Added spotify metadata to UI
This commit is contained in:
@@ -15,6 +15,7 @@ interface FormattingSettings {
|
||||
playlist: string;
|
||||
compilation: string;
|
||||
artistSeparator: string;
|
||||
spotifyMetadata: boolean;
|
||||
}
|
||||
|
||||
interface FormattingTabProps {
|
||||
@@ -177,6 +178,10 @@ export function FormattingTab({ config, isLoading }: FormattingTabProps) {
|
||||
<label htmlFor="saveCoverToggle" className="text-content-primary dark:text-content-primary-dark">Save Album Cover</label>
|
||||
<input id="saveCoverToggle" type="checkbox" {...register("saveCover")} className="h-6 w-6 rounded" />
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<label htmlFor="spotifyMetadataToggle" className="text-content-primary dark:text-content-primary-dark">Use Spotify metadata in Deezer fallback</label>
|
||||
<input id="spotifyMetadataToggle" type="checkbox" {...register("spotifyMetadata")} className="h-6 w-6 rounded" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
|
||||
@@ -60,6 +60,7 @@ export type FlatAppSettings = {
|
||||
playlist: string;
|
||||
compilation: string;
|
||||
artistSeparator: string;
|
||||
spotifyMetadata: boolean;
|
||||
};
|
||||
|
||||
const defaultSettings: FlatAppSettings = {
|
||||
@@ -95,6 +96,7 @@ const defaultSettings: FlatAppSettings = {
|
||||
playlist: "Playlists/{playlist_name}",
|
||||
compilation: "Compilations/{album_name}",
|
||||
artistSeparator: "; ",
|
||||
spotifyMetadata: true,
|
||||
watch: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface AppSettings {
|
||||
playlist: string;
|
||||
compilation: string;
|
||||
artistSeparator: string;
|
||||
spotifyMetadata: boolean;
|
||||
watch: {
|
||||
enabled: boolean;
|
||||
// Add other watch properties from the old type if they still exist in the API response
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
// This new type reflects the flat structure of the /api/config response
|
||||
export interface AppSettings {
|
||||
service: "spotify" | "deezer";
|
||||
spotify: string;
|
||||
spotifyQuality: "NORMAL" | "HIGH" | "VERY_HIGH";
|
||||
deezer: string;
|
||||
deezerQuality: "MP3_128" | "MP3_320" | "FLAC";
|
||||
maxConcurrentDownloads: number;
|
||||
realTime: boolean;
|
||||
fallback: boolean;
|
||||
convertTo: "MP3" | "AAC" | "OGG" | "OPUS" | "FLAC" | "WAV" | "ALAC" | "";
|
||||
bitrate: string;
|
||||
maxRetries: number;
|
||||
retryDelaySeconds: number;
|
||||
retryDelayIncrease: number;
|
||||
customDirFormat: string;
|
||||
customTrackFormat: string;
|
||||
tracknumPadding: boolean;
|
||||
saveCover: boolean;
|
||||
explicitFilter: boolean;
|
||||
// Properties from the old 'downloads' object
|
||||
threads: number;
|
||||
path: string;
|
||||
skipExisting: boolean;
|
||||
m3u: boolean;
|
||||
hlsThreads: number;
|
||||
// Properties from the old 'formatting' object
|
||||
track: string;
|
||||
album: string;
|
||||
playlist: string;
|
||||
compilation: string;
|
||||
artistSeparator: string;
|
||||
watch: {
|
||||
enabled: boolean;
|
||||
// Add other watch properties from the old type if they still exist in the API response
|
||||
};
|
||||
// Add other root-level properties from the API if they exist
|
||||
}
|
||||
Reference in New Issue
Block a user