Added spotify metadata to UI
This commit is contained in:
@@ -15,6 +15,7 @@ interface FormattingSettings {
|
|||||||
playlist: string;
|
playlist: string;
|
||||||
compilation: string;
|
compilation: string;
|
||||||
artistSeparator: string;
|
artistSeparator: string;
|
||||||
|
spotifyMetadata: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormattingTabProps {
|
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>
|
<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" />
|
<input id="saveCoverToggle" type="checkbox" {...register("saveCover")} className="h-6 w-6 rounded" />
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ export type FlatAppSettings = {
|
|||||||
playlist: string;
|
playlist: string;
|
||||||
compilation: string;
|
compilation: string;
|
||||||
artistSeparator: string;
|
artistSeparator: string;
|
||||||
|
spotifyMetadata: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultSettings: FlatAppSettings = {
|
const defaultSettings: FlatAppSettings = {
|
||||||
@@ -95,6 +96,7 @@ const defaultSettings: FlatAppSettings = {
|
|||||||
playlist: "Playlists/{playlist_name}",
|
playlist: "Playlists/{playlist_name}",
|
||||||
compilation: "Compilations/{album_name}",
|
compilation: "Compilations/{album_name}",
|
||||||
artistSeparator: "; ",
|
artistSeparator: "; ",
|
||||||
|
spotifyMetadata: true,
|
||||||
watch: {
|
watch: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export interface AppSettings {
|
|||||||
playlist: string;
|
playlist: string;
|
||||||
compilation: string;
|
compilation: string;
|
||||||
artistSeparator: string;
|
artistSeparator: string;
|
||||||
|
spotifyMetadata: boolean;
|
||||||
watch: {
|
watch: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
// Add other watch properties from the old type if they still exist in the API response
|
// 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