···3434serde = { version = "1.0", features = ["derive"] }
3535lofty = "0.22"
3636serde_json = "1.0"
3737+serde_cbor = "0.11"
3738nanoid = "0.4"
3839alphanumeric-sort = "1.5"
3940linked-hash-map = { version = "0.5", features = ["serde_impl"] }
+26
ferrum-addon/addon.d.ts
···88888989export declare function load_data(isDev: boolean, localDataPath?: string | undefined | null, libraryPath?: string | undefined | null): void
90909191+export declare function load_queue_state(filePath: string): QueueState | null
9292+9193export declare function load_tags(trackId: string): void
92949395export declare function load_view_options(): ViewOptions
···107109 cacheDb: string
108110 localDataDir: string
109111 viewOptionsFile: string
112112+ queueFile: string
110113 logsDir: string
111114}
112115···125128126129export declare function playlist_filter_duplicates(playlistId: TrackID, ids: Array<string>): Array<TrackID>
127130131131+export interface QueueCurrentState {
132132+ item: QueueItemState
133133+ from_auto_queue: boolean
134134+}
135135+136136+export interface QueueItemState {
137137+ qId: number
138138+ id: string
139139+ non_shuffle_pos?: number
140140+}
141141+142142+export interface QueueState {
143143+ past: Array<QueueItemState>
144144+ current?: QueueCurrentState
145145+ user_queue: Array<QueueItemState>
146146+ auto_queue: Array<QueueItemState>
147147+ last_qid: number
148148+ shuffle: boolean
149149+ repeat: boolean
150150+}
151151+128152export declare function read_cover_async(filePath: string, index: number): Promise<Buffer | null>
129153130154/** Returns `None` if the file does not have an image */
···135159export declare function remove_image(index: number): void
136160137161export declare function save(): void
162162+163163+export declare function save_queue_state(queueState: QueueState, filePath: string): Promise<void>
138164139165export declare function save_view_options(viewOptions: ViewOptions, filePath: string): Promise<void>
140166
+1
src-native/data.rs
···102102 cache_db: path_to_string(cache_dir.join("Cache.redb")),
103103 local_data_dir: path_to_string(&local_data_dir),
104104 view_options_file: path_to_string(local_data_dir.join("view.json")),
105105+ queue_file: path_to_string(local_data_dir.join("queue.cbor")),
105106 // This makes sure we can get the logs dir, which is important for crash logs
106107 logs_dir: path_to_string(app_log_dir()?),
107108 };