Skip to content

Commit

Permalink
Stream segments: Remove replaceAll from setPreviewUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
vkay94 committed Dec 12, 2020
1 parent 9a7a224 commit 2ba27b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,8 @@ public List<StreamSegment> getStreamSegments() throws ParsingException {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ public String getPreviewUrl() {
}

public void setPreviewUrl(@Nullable final String previewUrl) {
this.previewUrl = previewUrl.replaceAll("\\u0026", "&");
this.previewUrl = previewUrl;
}
}

0 comments on commit 2ba27b3

Please sign in to comment.