Support for proxy

For #46, untested....

Docker ENVs:
```
useProxy=True
proxyUrl=http://xxx.xxx.xxx.xxx/
proxyPort=8080
proxyUsername=username
proxyPassword=password
```
pull/49/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 523840ce3f
commit 3850686c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,6 +102,11 @@ fi
IFS=',' read -r -a filters <<< "$extrasLanguages"
for filter in "${filters[@]}"
do
if [ "$useProxy" != "true" ] ; then
tmdbVideosListData=$(curl -s "https://api.themoviedb.org/3/movie/$tmdbId/videos?api_key=$tmdbApiKey&language=$filter" | jq -r '.results[] | select(.site=="YouTube")')
else
tmdbVideosListData=$(curl -x $proxyUrl:$proxyPort --proxy-user $proxyUsername:$proxyPassword -s "https://api.themoviedb.org/3/movie/$tmdbId/videos?api_key=$tmdbApiKey&language=$filter" | jq -r '.results[] | select(.site=="YouTube")')
fi
tmdbVideosListData=$(curl -s "https://api.themoviedb.org/3/movie/$tmdbId/videos?api_key=$tmdbApiKey&language=$filter" | jq -r '.results[] | select(.site=="YouTube")')
log "$itemTitle :: Searching for \"$filter\" extras..."
if [ "$extrasType" == "all" ]; then

Loading…
Cancel
Save