mirror of
https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git
synced 2025-12-29 11:33:00 +03:00
Compare commits
3 Commits
nwjs-ffmpe
...
nwjs-ffmpe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b77acfb324 | ||
|
|
59dc39dfbc | ||
|
|
96dcbff82e |
@@ -105,7 +105,7 @@ while read CREATE_HOOK; do
|
|||||||
"n" | "N")
|
"n" | "N")
|
||||||
break;;
|
break;;
|
||||||
* )
|
* )
|
||||||
printf "Would you like to create an alias for user $USER_NAME? [y/n]"
|
printf "Would you like to run it automatically after each Opera update?? [y/n]"
|
||||||
continue;;
|
continue;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ readonly OPERA_WIDEVINE_CONFIG="$OPERA_DIR/resources/widevine_config.json"
|
|||||||
printf 'Getting download links...\n'
|
printf 'Getting download links...\n'
|
||||||
##ffmpeg
|
##ffmpeg
|
||||||
#readonly FFMPEG_URL_MAIN=$(wget -qO - $FFMPEG_SRC_MAIN | grep browser_download_url | cut -d '"' -f 4 | grep linux-x64 | head -n 1)
|
#readonly FFMPEG_URL_MAIN=$(wget -qO - $FFMPEG_SRC_MAIN | grep browser_download_url | cut -d '"' -f 4 | grep linux-x64 | head -n 1)
|
||||||
readonly FFMPEG_URL_ALT=$(wget -qO - $FFMPEG_SRC_ALT | grep browser_download_url | cut -d '"' -f 4 | grep linux-x64 | head -n 1)
|
readonly FFMPEG_URL_ALT=$(wget -qO --inet4-only - $FFMPEG_SRC_ALT | grep browser_download_url | cut -d '"' -f 4 | grep linux-x64 | head -n 1)
|
||||||
[[ $(basename $FFMPEG_URL_ALT) < $(basename $FFMPEG_URL_MAIN) ]] && readonly FFMPEG_URL=$FFMPEG_URL_MAIN || readonly FFMPEG_URL=$FFMPEG_URL_ALT
|
[[ $(basename $FFMPEG_URL_ALT) < $(basename $FFMPEG_URL_MAIN) ]] && readonly FFMPEG_URL=$FFMPEG_URL_MAIN || readonly FFMPEG_URL=$FFMPEG_URL_ALT
|
||||||
if [[ -z $FFMPEG_URL ]]; then
|
if [[ -z $FFMPEG_URL ]]; then
|
||||||
printf 'Failed to get ffmpeg download URL. Exiting...\n'
|
printf 'Failed to get ffmpeg download URL. Exiting...\n'
|
||||||
@@ -49,7 +49,7 @@ fi
|
|||||||
|
|
||||||
##Widevine
|
##Widevine
|
||||||
if $FIX_WIDEVINE; then
|
if $FIX_WIDEVINE; then
|
||||||
readonly WIDEVINE_LATEST=`wget -qO - $WIDEVINE_VERSIONS | tail -n1`
|
readonly WIDEVINE_LATEST=`wget -qO --inet4-only - $WIDEVINE_VERSIONS | tail -n1`
|
||||||
readonly WIDEVINE_URL="https://dl.google.com/widevine-cdm/$WIDEVINE_LATEST-linux-x64.zip"
|
readonly WIDEVINE_URL="https://dl.google.com/widevine-cdm/$WIDEVINE_LATEST-linux-x64.zip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -57,14 +57,14 @@ fi
|
|||||||
printf 'Downloading files...\n'
|
printf 'Downloading files...\n'
|
||||||
mkdir -p "$TEMP_DIR/opera-fix"
|
mkdir -p "$TEMP_DIR/opera-fix"
|
||||||
##ffmpeg
|
##ffmpeg
|
||||||
wget -q --show-progress $FFMPEG_URL -O "$TEMP_DIR/opera-fix/ffmpeg.zip"
|
wget -q --inet4-only --show-progress $FFMPEG_URL -O "$TEMP_DIR/opera-fix/ffmpeg.zip"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printf 'Failed to download ffmpeg. Check your internet connection or try later\n'
|
printf 'Failed to download ffmpeg. Check your internet connection or try later\n'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
##Widevine
|
##Widevine
|
||||||
if $FIX_WIDEVINE; then
|
if $FIX_WIDEVINE; then
|
||||||
wget -q --show-progress "$WIDEVINE_URL" -O "$TEMP_DIR/opera-fix/widevine.zip"
|
wget -q --inet4-only --show-progress "$WIDEVINE_URL" -O "$TEMP_DIR/opera-fix/widevine.zip"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printf 'Failed to download Widevine CDM. Check your internet connection or try later\n'
|
printf 'Failed to download Widevine CDM. Check your internet connection or try later\n'
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user