mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-08-30 13:57:46 +00:00
Stream segments: Remove replaceAll from setPreviewUrl
This commit is contained in:
@@ -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);
|
||||
|
@@ -64,6 +64,6 @@ public class StreamSegment implements Serializable {
|
||||
}
|
||||
|
||||
public void setPreviewUrl(@Nullable final String previewUrl) {
|
||||
this.previewUrl = previewUrl.replaceAll("\\u0026", "&");
|
||||
this.previewUrl = previewUrl;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user