Skip to content

Commit

Permalink
fix error handling; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
sealedtx committed Oct 8, 2024
1 parent d85813c commit a5a321d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Include
<dependency>
<groupId>com.github.sealedtx</groupId>
<artifactId>java-youtube-downloader</artifactId>
<version>3.2.5</version>
<version>3.2.6</version>
</dependency>
```

Expand All @@ -392,7 +392,7 @@ dependencyResolutionManagement {
```
```gradleA
dependencies {
implementation 'com.github.sealedtx:java-youtube-downloader:3.2.5'
implementation 'com.github.sealedtx:java-youtube-downloader:3.2.6'
}
```
### Android
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.ikiulian</groupId>
<artifactId>java-youtube-downloader</artifactId>
<version>3.2.5</version>
<version>3.2.6</version>

<name>Java youtube video downloader</name>
<description>Java parser for retrieving youtube video meta info</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,18 @@ private VideoInfo parseVideoAndroid(String videoId, YoutubeCallback<VideoInfo> c
List<Format> formats;
try {
formats = parseFormats(playerResponse, null, clientVersion);

} catch (YoutubeException.InvalidJsUrlException e) {
JSONObject playerConfig = downloadPlayerConfig(videoId, callback);
String jsUrl;
try {
jsUrl = extractor.extractJsUrlFromConfig(playerConfig, videoId);
formats = parseFormats(playerResponse, jsUrl, clientVersion);
} catch (YoutubeException ex) {

if (callback != null) {
callback.onError(ex);
}
throw ex;
}
formats = parseFormats(playerResponse, jsUrl, clientVersion);
} catch (YoutubeException e) {
if (callback != null) {
callback.onError(e);
Expand Down

0 comments on commit a5a321d

Please sign in to comment.