Use Flirt4Free stream preview instead of static images

This commit is contained in:
0xb00bface 2020-10-03 16:26:09 +02:00
parent 0664037ff8
commit 9e68876022
1 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,11 @@ public class Flirt4FreeUpdateService extends PaginatedScheduledService {
model.setDisplayName(modelDiv.attr("data-model-name"));
Element img = HtmlParser.getTag(modelHtml, "a[class*=modelLink] img");
img.setBaseUri(url);
if (img.hasAttr("data-image-url")) {
if (img.hasAttr("data-live-image-src")) {
model.setPreview(img.absUrl("data-live-image-src"));
} else if (img.hasAttr("data-static-image-src")) {
model.setPreview(img.absUrl("data-static-image-src"));
} else if (img.hasAttr("data-image-url")) {
model.setPreview(img.absUrl("data-image-url"));
} else {
// background-image: url('https://cdn1.vscdns.com/images/models/samples-640x480/3241715.jpg')