1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 15:24:51 +02:00

Ignore upsell video quality

This commit is contained in:
rephormat
2019-07-15 23:18:06 -05:00
parent 241ff091b6
commit d5f14160bb

View File

@@ -69,10 +69,12 @@ public class PornhubRipper extends VideoRipper {
int bestQual = 0; int bestQual = 0;
for (int i = 0; i < mediaDef.length(); i++) { for (int i = 0; i < mediaDef.length(); i++) {
JSONObject e = (JSONObject) mediaDef.get(i); JSONObject e = (JSONObject) mediaDef.get(i);
int quality = Integer.parseInt((String)e.get("quality")); if (!"upsell".equals(e.getString("format"))) {
if (quality > bestQual) { int quality = Integer.parseInt((String)e.get("quality"));
bestQual = quality; if (quality > bestQual) {
vidUrl = (String)e.get("videoUrl"); bestQual = quality;
vidUrl = (String)e.get("videoUrl");
}
} }
} }
if (vidUrl == null) { if (vidUrl == null) {