Make sure to use lower case model names for Cam4
This commit is contained in:
parent
ebaf4c4c9f
commit
8251f41c50
|
@ -33,7 +33,7 @@ import okhttp3.Response;
|
|||
|
||||
public class Cam4UpdateService extends PaginatedScheduledService {
|
||||
|
||||
private static final transient Logger LOG = LoggerFactory.getLogger(Cam4UpdateService.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Cam4UpdateService.class);
|
||||
private String url;
|
||||
private Cam4 site;
|
||||
private boolean loginRequired;
|
||||
|
@ -86,6 +86,7 @@ public class Cam4UpdateService extends PaginatedScheduledService {
|
|||
String slug = path.substring(1);
|
||||
Cam4Model model = site.createModel(slug);
|
||||
String playlistUrl = profileLink.attr("data-hls-preview-url");
|
||||
model.setDisplayName(HtmlParser.getText(boxHtml, "div.profileBoxTitle a").trim());
|
||||
model.setPlaylistUrl(playlistUrl);
|
||||
model.setPreview("https://snapshots.xcdnpro.com/thumbnails/" + model.getName() + "?s=" + System.currentTimeMillis());
|
||||
model.setDescription(parseDesription(boxHtml));
|
||||
|
|
|
@ -174,6 +174,13 @@ public class Config {
|
|||
iterator.remove();
|
||||
}
|
||||
}
|
||||
// 3.11.0 make Cam4 model names lower case
|
||||
settings.models.stream()
|
||||
.filter(m -> m instanceof Cam4Model)
|
||||
.forEach(m -> m.setName(m.getName().toLowerCase()));
|
||||
settings.modelsIgnored.stream()
|
||||
.filter(m -> m instanceof Cam4Model)
|
||||
.forEach(m -> m.setName(m.getName().toLowerCase()));
|
||||
}
|
||||
|
||||
private void makeBackup(File source) {
|
||||
|
|
|
@ -47,8 +47,9 @@ public class Cam4 extends AbstractSite {
|
|||
public Cam4Model createModel(String name) {
|
||||
Cam4Model m = new Cam4Model();
|
||||
m.setSite(this);
|
||||
m.setName(name);
|
||||
m.setUrl(getBaseUrl() + '/' + name + '/');
|
||||
m.setDisplayName(name);
|
||||
m.setName(name.toLowerCase());
|
||||
m.setUrl(getBaseUrl() + '/' + m.getName() + '/');
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue