mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 15:15:57 -05:00
[library] RSS - reuse db file id when performing meta scan
Fixes issue when performing an 'api/rescan' (results in RSS_SCAN_META scan type in this module) that would result in a library_media_save() -> a readd even for entries that already exist in db. This would result in dropping db record, incl play_count etc instead of an update
This commit is contained in:
parent
8bba3ee913
commit
3d869b0857
@ -453,6 +453,13 @@ rss_save(struct playlist_info *pli, int *count, enum rss_scan_type scan_type)
|
||||
if (ret > 0)
|
||||
continue;
|
||||
}
|
||||
else if (scan_type == RSS_SCAN_META)
|
||||
{
|
||||
// Using existing file id if already in library, resulting in update but preserving play_count etc
|
||||
mfi.id = db_file_id_bypath(ri.url);
|
||||
if (mfi.id > 0)
|
||||
time_added = 0;
|
||||
}
|
||||
|
||||
scan_metadata_stream(&mfi, ri.url);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user