*Plugins: Fixes/Changes/Maintenance*

- Ardmediathek: added 1440p support and settings
- ImgSrcRu: implemented image format setting RE forum 96470

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49845 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: e0ff9c1224436b31901ba38cc2b80a7e21138c59
This commit is contained in:
psp 2024-09-23 15:30:26 +00:00
parent 964a3ac2cc
commit eca4d1b14f
2 changed files with 21 additions and 2 deletions

View File

@ -147,10 +147,13 @@ public class Ardmediathek extends PluginForDecrypt {
if (cfg.isGrabHLS1080pVideoEnabled()) {
selectedQualities.add("hls_1080");
}
if (cfg.isGrabHLS1440pVideoEnabled()) {
selectedQualities.add("hls_1440");
}
if (cfg.isGrabHLS2160pVideoEnabled()) {
selectedQualities.add("hls_2160");
}
/* If user has deselected all HLS qualities, we can later skip HLS crawling entirely which speeds up the crawl process. */
/* If user has de-selected all HLS qualities, we can later skip HLS crawling entirely which speeds up the crawl process. */
if (selectedQualities.size() > 0) {
this.grabHLS = true;
} else {
@ -183,6 +186,9 @@ public class Ardmediathek extends PluginForDecrypt {
if (cfg.isGrabHTTP1080pVideoEnabled()) {
selectedQualities.add("http_1080");
}
if (cfg.isGrabHTTP1440pVideoEnabled()) {
selectedQualities.add("http_1440");
}
if (cfg.isGrabHTTP2160pVideoEnabled()) {
selectedQualities.add("http_2160");
}

View File

@ -20,6 +20,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import org.appwork.utils.StringUtils;
import org.jdownloader.plugins.components.config.ImgsrcConfig;
import org.jdownloader.plugins.components.config.ImgsrcConfig.ImageFormat;
import org.jdownloader.plugins.config.PluginJsonConfig;
import jd.PluginWrapper;
import jd.http.Browser;
@ -140,7 +143,12 @@ public class ImgSrcRu extends PluginForHost {
}
public static final String getPreferredImageFormat() {
return "jpeg";
final ImgsrcConfig cfg = PluginJsonConfig.get(ImgsrcConfig.class);
if (cfg.getPreferredImageFormat() == ImageFormat.JPEG) {
return "jpeg";
} else {
return "webp";
}
}
private String getDllink() {
@ -278,6 +286,11 @@ public class ImgSrcRu extends PluginForHost {
return 3;
}
@Override
public Class<? extends ImgsrcConfig> getConfigInterface() {
return ImgsrcConfig.class;
}
@Override
public void reset() {
}