The regex currently used to match each entry is VIDEO="([^\"]+)"\n([^\n]+)\n. The problem is that the last quality entry will not get matched, because the response ends without a newline character. I therefore propose removing the last newline character requirement, that is, changing the regex to VIDEO="([^\"]+)"\n([^\n]+). This will ensure that the last quality entry will also be matched. Also it should not break other matches, since the last part of the regex ([^\n]+) will stop matching once it encounters a newline anyway.
This is likely the cause of issue #53 where VODs with only one quality setting cannot be downloaded at all.
A new release with this fixed would be highly appreciated to be able to download and archive vods again to cut up locally, instead of having to wait for Twitch's atrociously long download process for your own vods.
There is an issue where the last VOD quality in the Usher API response is not detected and cannot be downloaded.
In
func accessUsherAPI
, the response from the Usher APIrespString
contains a bunch of quality entries in the format ofThe regex currently used to match each entry is
VIDEO="([^\"]+)"\n([^\n]+)\n
. The problem is that the last quality entry will not get matched, because the response ends without a newline character. I therefore propose removing the last newline character requirement, that is, changing the regex toVIDEO="([^\"]+)"\n([^\n]+)
. This will ensure that the last quality entry will also be matched. Also it should not break other matches, since the last part of the regex([^\n]+)
will stop matching once it encounters a newline anyway.This is likely the cause of issue #53 where VODs with only one quality setting cannot be downloaded at all.