Skip to content

Commit

Permalink
Change streamlink version check regexp.
Browse files Browse the repository at this point in the history
Resolves #371
  • Loading branch information
bastimeyer committed Dec 16, 2016
1 parent 1f3bede commit 39b5096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/services/StreamingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const { "stream-reload-interval": streamReloadInterval } = varsConfig;

const modelName = "stream";

const reVersion = /^(livestreamer|streamlink)(?:\.exe|-script\.py)? (\d+\.\d+.\d+)(?:.*)$/;
const reVersion = /^(streamlink|livestreamer)(?:\.exe|-script\.py)? (\d+\.\d+.\d+)(?:$|\s.*)/i;
const reReplace = /^\[(?:cli|plugin\.\w+)]\[\S+]\s+/;
const reUnable = /^error: Unable to open URL: /;
const reNoStreams = /^error: No streams found on this URL: /;
Expand Down Expand Up @@ -360,6 +360,7 @@ export default Service.extend( ChannelSettingsMixin, {
let match = reVersion.exec( line );
if ( match ) {
let [ , name, version ] = match;
name.toLowerCase();
resolve({ name, version });
} else {
reject( new Error( "Invalid version check output" ) );
Expand Down

0 comments on commit 39b5096

Please sign in to comment.