Skip to content

Commit

Permalink
fix playlist info not getting overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Aug 23, 2024
1 parent 69101ba commit 5feb806
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions music_assistant/server/controllers/media/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,17 @@ async def _update_library_item(
{"item_id": db_id},
{
# always prefer name/owner from updated item here
"name": update.name if overwrite else cur_item.name,
"name": update.name,
"sort_name": update.sort_name
if overwrite
else cur_item.sort_name or update.sort_name,
if (overwrite or update.name != cur_item.name)
else cur_item.sort_name,
"owner": update.owner or cur_item.owner,
"is_editable": update.is_editable,
"metadata": serialize_to_json(metadata),
"external_ids": serialize_to_json(
update.external_ids if overwrite else cur_item.external_ids
),
"cache_checksum": update.cache_checksum
if overwrite
else update.cache_checksum or cur_item.cache_checksum,
"cache_checksum": update.cache_checksum or cur_item.cache_checksum,
},
)
# update/set provider_mappings table
Expand Down

0 comments on commit 5feb806

Please sign in to comment.