Stream segments: Remove replaceAll from setPreviewUrl

This commit is contained in:
vkay94 2020-12-12 15:00:45 +01:00
parent 9a7a224a54
commit 2ba27b39af
2 changed files with 3 additions and 2 deletions

View file

@ -1107,7 +1107,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
final JsonArray previewsArray = segmentJson.getObject("thumbnail").getArray("thumbnails");
if (!previewsArray.isEmpty()) {
// 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);

View file

@ -64,6 +64,6 @@ public class StreamSegment implements Serializable {
}
public void setPreviewUrl(@Nullable final String previewUrl) {
this.previewUrl = previewUrl.replaceAll("\\u0026", "&");
this.previewUrl = previewUrl;
}
}