Fix bug, which causes the deletion of the ignored models list

This commit is contained in:
0xb00bface 2021-04-17 11:30:19 +02:00
parent 5eafd07d97
commit c948507bcc
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
4.1.3
========================
* Fixed Stripchat pagination bug
* Fix bug, which causes the deletion of the ignored models list
4.1.2
========================
* Fixed bug, which caused some recordings to get stuck

View File

@ -177,16 +177,18 @@ public class Config {
}
// 3.11.0 make Cam4 model names lower case
settings.models.stream()
.filter(m -> m instanceof Cam4Model)
.filter(Cam4Model.class::isInstance)
.forEach(m -> m.setName(m.getName().toLowerCase()));
settings.modelsIgnored.stream()
.filter(m -> m instanceof Cam4Model)
.filter(Cam4Model.class::isInstance)
.forEach(m -> m.setName(m.getName().toLowerCase()));
// 4.1.2 reduce models ignore to store only the URL
settings.ignoredModels = settings.modelsIgnored.stream()
.map(Model::getUrl)
.collect(Collectors.toList());
settings.modelsIgnored = null;
if (settings.modelsIgnored != null && !settings.modelsIgnored.isEmpty()) {
settings.ignoredModels = settings.modelsIgnored.stream()
.map(Model::getUrl)
.collect(Collectors.toList());
settings.modelsIgnored = null;
}
}
private void makeBackup(File source) {