Skip to content

Commit

Permalink
Fix equal sign on URI & subtitle better handled
Browse files Browse the repository at this point in the history
  • Loading branch information
Baraujo25 committed May 12, 2020
1 parent 05915cb commit cc17d8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.blazemeter.jmeter</groupId>
<artifactId>jmeter-bzm-hls</artifactId>
<version>3.0.1</version>
<version>3.0.1-SNAPSHOT</version>
<name>Video Streaming Sampler as JMeter plugin</name>

<properties>
Expand Down Expand Up @@ -38,9 +38,10 @@
<version>${jmeter.version}</version>
</dependency>
<dependency>
<groupId>com.comcast</groupId>
<groupId>com.github.comcast</groupId>
<artifactId>hlsparserj</artifactId>
<version>1.0.0</version>
<!--Pointing to commit with subtitles fixes and equals support on URI-->
<version>c287e78</version>
</dependency>
<dependency>
<groupId>com.github.blazemeter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
public class Playlist {

private static final Logger LOG = LoggerFactory.getLogger(Playlist.class);
private IPlaylist playlist;

private final URI uri;
private final String body; //This field is only used for comparing objects
private final Instant downloadTimestamp;
private IPlaylist playlist;

private Playlist(URI uri, String body, Instant downloadTimestamp, IPlaylist playlist) {
this.uri = uri;
Expand Down Expand Up @@ -72,12 +71,7 @@ public MediaStream solveMediaStream(BandwidthSelector bandwidthSelector,
}
String audioPlayListUri = getRenditionUri("AUDIO", mediaStream.getAudio(),
audioLanguageSelector);
/*
Because of a bug in the library, the mediaStream.getSubtitle() method wont return
the subtitlesGroupId but null. Because of it, we are use getTag instead.
*/
String subtitlesGroupId = mediaStream.getTag().getAttributes().get("SUBTITLES");
String subtitlePlayListUri = getRenditionUri("SUBTITLES", subtitlesGroupId,
String subtitlePlayListUri = getRenditionUri("SUBTITLES", mediaStream.getSubtitle(),
subtitleLanguageSelector);
return new MediaStream(buildAbsoluteUri(mediaStream.getURI()),
(audioPlayListUri != null ? buildAbsoluteUri(audioPlayListUri) : null),
Expand Down

0 comments on commit cc17d8b

Please sign in to comment.