Skip to content

Commit

Permalink
Update JS deps
Browse files Browse the repository at this point in the history
JQuery Chosen is deprecated and forces us to stay on JQuery 1
ogv.js has not been updated
  • Loading branch information
benoit74 committed Oct 16, 2023
1 parent 93e0563 commit 2ff0254
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions get_js_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected].0-dev.26/dist-cjs/polyfills.js
curl -L -O https://unpkg.com/[email protected].2/dist-cjs/polyfills.js
rm -f $ASSETS_PATH/polyfills.js
mv polyfills.js $ASSETS_PATH/polyfills.js
curl -L -O https://unpkg.com/[email protected].0-dev.26/dist-cjs/webp-hero.bundle.js
curl -L -O https://unpkg.com/[email protected].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

Expand Down
4 changes: 2 additions & 2 deletions src/youtube2zim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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):
Expand Down

0 comments on commit 2ff0254

Please sign in to comment.