From 2ff0254c069ed823ec449431c86ae16e61dd2179 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Fri, 13 Oct 2023 15:06:49 +0200 Subject: [PATCH] Update JS deps JQuery Chosen is deprecated and forces us to stay on JQuery 1 ogv.js has not been updated --- get_js_deps.sh | 10 +++++----- src/youtube2zim/scraper.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/get_js_deps.sh b/get_js_deps.sh index 3382488e..7e3fc13f 100755 --- a/get_js_deps.sh +++ b/get_js_deps.sh @@ -22,12 +22,12 @@ ASSETS_PATH="${SCRIPT_PATH}/src/youtube2zim/templates/assets" echo "About to download JS assets to ${ASSETS_PATH}" echo "getting video.js" -curl -L -O https://github.com/videojs/video.js/releases/download/v7.20.3/video-js-7.20.3.zip +curl -L -O https://github.com/videojs/video.js/releases/download/v8.6.1/video-js-8.6.1.zip rm -rf $ASSETS_PATH/videojs mkdir -p $ASSETS_PATH/videojs -unzip -o -d $ASSETS_PATH/videojs video-js-7.20.3.zip +unzip -o -d $ASSETS_PATH/videojs video-js-8.6.1.zip rm -rf $ASSETS_PATH/videojs/alt $ASSETS_PATH/videojs/examples -rm -f video-js-7.20.3.zip +rm -f video-js-8.6.1.zip echo "getting ogv.js" curl -L -O https://github.com/brion/ogv.js/releases/download/1.8.9/ogvjs-1.8.9.zip @@ -51,10 +51,10 @@ echo "getting jquery.js" curl -L -o $ASSETS_PATH/jquery.min.js https://code.jquery.com/jquery-1.12.4.min.js echo "getting webp-hero" -curl -L -O https://unpkg.com/webp-hero@0.0.0-dev.26/dist-cjs/polyfills.js +curl -L -O https://unpkg.com/webp-hero@0.0.2/dist-cjs/polyfills.js rm -f $ASSETS_PATH/polyfills.js mv polyfills.js $ASSETS_PATH/polyfills.js -curl -L -O https://unpkg.com/webp-hero@0.0.0-dev.26/dist-cjs/webp-hero.bundle.js +curl -L -O https://unpkg.com/webp-hero@0.0.2/dist-cjs/webp-hero.bundle.js rm -f $ASSETS_PATH/webp-hero.bundle.js mv webp-hero.bundle.js $ASSETS_PATH/webp-hero.bundle.js diff --git a/src/youtube2zim/scraper.py b/src/youtube2zim/scraper.py index ca9f8928..f53cada9 100644 --- a/src/youtube2zim/scraper.py +++ b/src/youtube2zim/scraper.py @@ -448,7 +448,7 @@ def check_branding_values(self): raise OSError( f"--profile image could not be found: {self.profile_image}" ) - shutil.move(self.profile_image, self.profile_path) + shutil.copy(self.profile_image, self.profile_path) resize_image(self.profile_path, width=100, height=100, method="thumbnail") if self.banner_image: if isinstance(self.banner_image, str) and self.banner_image.startswith( @@ -461,7 +461,7 @@ def check_branding_values(self): raise OSError( f"--banner image could not be found: {self.banner_image}" ) - shutil.move(self.banner_image, self.banner_path) + shutil.copy(self.banner_image, self.banner_path) resize_image(self.banner_path, width=1060, height=175, method="thumbnail") if self.main_color and not is_hex_color(self.main_color):