From a5a321dbd5fcd0bfa7b74e85be9bbad7a5005363 Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 8 Oct 2024 22:03:46 +0300 Subject: [PATCH] fix error handling; bump version --- README.md | 4 ++-- pom.xml | 2 +- .../java/com/github/kiulian/downloader/parser/ParserImpl.java | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6c37ac8..d676c6c 100644 --- a/README.md +++ b/README.md @@ -375,7 +375,7 @@ Include com.github.sealedtx java-youtube-downloader - 3.2.5 + 3.2.6 ``` @@ -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 diff --git a/pom.xml b/pom.xml index 86d8a78..084d777 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.ikiulian java-youtube-downloader - 3.2.5 + 3.2.6 Java youtube video downloader Java parser for retrieving youtube video meta info diff --git a/src/main/java/com/github/kiulian/downloader/parser/ParserImpl.java b/src/main/java/com/github/kiulian/downloader/parser/ParserImpl.java index 82a60cd..e252aec 100644 --- a/src/main/java/com/github/kiulian/downloader/parser/ParserImpl.java +++ b/src/main/java/com/github/kiulian/downloader/parser/ParserImpl.java @@ -142,20 +142,18 @@ private VideoInfo parseVideoAndroid(String videoId, YoutubeCallback c List 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);