Upsert playlists
This commit is contained in:
parent
f0a2afe01d
commit
2c2b12f536
1 changed files with 1 additions and 7 deletions
|
@ -127,13 +127,7 @@ impl Manager {
|
|||
|
||||
let virtual_paths = songs.into_iter().map(|s| s.virtual_path).collect();
|
||||
|
||||
transaction.remove::<PlaylistModel>(PlaylistModel {
|
||||
owner: owner.to_owned(),
|
||||
name: name.to_owned(),
|
||||
..Default::default()
|
||||
})?;
|
||||
|
||||
transaction.insert::<PlaylistModel>(PlaylistModel {
|
||||
transaction.upsert::<PlaylistModel>(PlaylistModel {
|
||||
owner: owner.to_owned(),
|
||||
name: name.to_owned(),
|
||||
duration: Duration::from_secs(duration),
|
||||
|
|
Loading…
Add table
Reference in a new issue