Skip to content

Commit

Permalink
[wrong] correct one intentional issue
Browse files Browse the repository at this point in the history
- use default script path
wrong: this commit contains intentional issues or reserved a bug from previous commits intentionally in order to test the ci
  • Loading branch information
grqz authored Sep 15, 2024
1 parent 5b4dfa5 commit fc67dd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ jobs:
- name: Download yt-dlp
run: curl -L https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp -o yt-dlp && chmod +x ./yt-dlp
- name: Install and build server dependencies
run: cd server/ && yarn install --frozen-lockfile && npx tsc
run: |
cd server/ && yarn install --frozen-lockfile && npx tsc
cp -aT . $HOME/bgutil-ytdlp-pot-provider/server
- name: Install plugin
run: |
mkdir ~/yt-dlp-plugins && curl -L "https://github.com/coletdjnz/yt-dlp-get-pot/releases/download/v0.1.1/yt-dlp-get-pot.zip" -o ~/yt-dlp-plugins/yt-dlp-get-pot.zip
cp -aT plugin/ ~/yt-dlp-plugins/bgutil-ytdlp-pot-provider/
- name: Test script method
run: |
script_response=$(./yt-dlp -vF --print-traffic BaW_jenozKc --extractor-args "youtube:getpot_bgutil_script=server/build/generate_once.js" 2>&1) || echo "::error title=Failed to run yt-dlp when testing script::yt-dlp returned $? exit status"
script_response=$(./yt-dlp -vF --print-traffic BaW_jenozKc 2>&1) || echo "::error title=Failed to run yt-dlp when testing script::yt-dlp returned $? exit status"
echo $script_response
if [[ "$script_response" != *"BgUtilScriptPot: Generating POT via script"* ]]; then
echo "::error title=BgUtilScriptPot was not invoked,file=plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py::BgUtilScriptPot was not invoked"
Expand Down
1 change: 0 additions & 1 deletion plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def _validate_get_pot(self, client: str, ydl: YoutubeDL, visitor_data=None, data
'Incorrect script passed to extractor args. Path to generate_once.js required')
if shutil.which('node') is None:
raise UnsupportedRequest('node is not in PATH')
raise UnsupportedRequest
self.script_path = script_path

def _get_pot(self, client: str, ydl: YoutubeDL, visitor_data=None, data_sync_id=None, player_url=None, **kwargs) -> str:
Expand Down

0 comments on commit fc67dd9

Please sign in to comment.