added removing of deleted ROMs from virtual lists

This commit is contained in:
Thomas Jentzsch 2021-11-29 18:23:58 +01:00
parent 639fb2a8b4
commit ddffa287eb
1 changed files with 9 additions and 3 deletions

View File

@ -43,7 +43,9 @@ void FavoritesManager::load()
for(const auto& u : jUser) for(const auto& u : jUser)
{ {
const string& path = u.get<string>(); const string& path = u.get<string>();
addUser(path); FilesystemNode node(path);
if(node.exists())
addUser(path);
} }
} }
@ -58,7 +60,9 @@ void FavoritesManager::load()
for(const auto& r : jRecent) for(const auto& r : jRecent)
{ {
const string& path = r.get<string>(); const string& path = r.get<string>();
addRecent(path); FilesystemNode node(path);
if(node.exists())
addRecent(path);
} }
} }
} }
@ -73,7 +77,9 @@ void FavoritesManager::load()
{ {
const string& path = p[0].get<string>(); const string& path = p[0].get<string>();
const uInt32 count = p[1].get<uInt32>(); const uInt32 count = p[1].get<uInt32>();
myPopularMap.emplace(path, count); FilesystemNode node(path);
if(node.exists())
myPopularMap.emplace(path, count);
} }
} }
} }