mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 16:03:23 -05:00
[scan] Make sure new, nested playlists are scanned
During scanning we might find a new, nested playlist (so inside another m3u), which we will then save. When the scanner then reaches the actual playlist file, we must make sure to scan the contents of it. This means the timestamp when saving the first time has to be set to a dummy value.
This commit is contained in:
parent
4b60da5fb4
commit
da29fa5f93
@ -177,7 +177,7 @@ process_nested_playlist(int parent_id, const char *path)
|
||||
goto error;
|
||||
|
||||
pli->type = PL_FOLDER;
|
||||
ret = db_pl_update(pli);
|
||||
ret = library_playlist_save(pli);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
@ -191,6 +191,13 @@ process_nested_playlist(int parent_id, const char *path)
|
||||
ret = playlist_fill(pli, path);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
// This is a "trick" to make sure the nested playlist will be scanned.
|
||||
// Otherwise what could happen is that we save the playlist with current
|
||||
// db_timestamp, and when the scanner finds the actual playlist it will
|
||||
// conclude from the timestamp that the playlist is unchanged, and thus
|
||||
// it would never be scanned.
|
||||
pli->db_timestamp = 1;
|
||||
}
|
||||
|
||||
pli->parent_id = parent_id;
|
||||
|
Loading…
Reference in New Issue
Block a user