Fix playlist track ordering to respect insertion order
- Add PlaylistLocalTrack struct with playlist_position field - Add playlist_get_local_tracks_with_position command - Update PlaylistDetailView to merge tracks by position instead of appending local tracks at the end - Update PlaylistModal to calculate correct position when adding local tracks (total count = qobuz + existing local) - Local tracks now appear in the order they were added, interleaved with Qobuz tracks
This commit is contained in:
1 parent
24c9df3bce
commit
16486e4591
6 files changed
+136
-14
No files matched your search
@@ -104,6 +104,15 @@ impl Default for LocalTrack {
|
||||
}
|
||||
}
|
||||
|
||||
/// A local track within a playlist, including its position
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct PlaylistLocalTrack {
|
||||
#[serde(flatten)]
|
||||
pub track: LocalTrack,
|
||||
/// Position in the combined playlist (Qobuz + local tracks)
|
||||
pub playlist_position: i32,
|
||||
}
|
||||
|
||||
/// An album aggregated from local tracks
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct LocalAlbum {
|
||||
|
||||
Reference in new issue
Block a user