Stream segments: Remove replaceAll from setPreviewUrl
This commit is contained in:
parent
9a7a224a54
commit
2ba27b39af
|
@ -1107,7 +1107,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
final JsonArray previewsArray = segmentJson.getObject("thumbnail").getArray("thumbnails");
|
final JsonArray previewsArray = segmentJson.getObject("thumbnail").getArray("thumbnails");
|
||||||
if (!previewsArray.isEmpty()) {
|
if (!previewsArray.isEmpty()) {
|
||||||
// Assume that the thumbnail with the highest resolution is at the last position
|
// Assume that the thumbnail with the highest resolution is at the last position
|
||||||
segment.setPreviewUrl(previewsArray.getObject(previewsArray.size() - 1).getString("url"));
|
final String url = previewsArray.getObject(previewsArray.size() - 1).getString("url");
|
||||||
|
segment.setPreviewUrl(fixThumbnailUrl(url));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
segments.add(segment);
|
segments.add(segment);
|
||||||
|
|
|
@ -64,6 +64,6 @@ public class StreamSegment implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPreviewUrl(@Nullable final String previewUrl) {
|
public void setPreviewUrl(@Nullable final String previewUrl) {
|
||||||
this.previewUrl = previewUrl.replaceAll("\\u0026", "&");
|
this.previewUrl = previewUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue