From e20ca27d92d65fb37661a2478a02c91916c300ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20Thom=C3=A9?= Date: Mon, 23 Oct 2023 00:41:55 +0200 Subject: [PATCH] Remove audio format postprocessing (#12) * Remove audio format postprocessing * Add test, pre-release, release jobs * PACKAGE -> PACKAGE_NAME --- .github/workflows/ci.yaml | 13 +++++++++++-- audioscrape/youtube.py | 7 ------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 61566aa..242fe12 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,6 +12,9 @@ on: branches: - main +env: + PACKAGE_NAME: audioscrape + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -21,10 +24,16 @@ permissions: jobs: test: + if: ${{ github.event_name == 'pull_request' }} + uses: carlthome/workflows/.github/workflows/python.yaml@main + with: + package-name: $PACKAGE_NAME + + pre-release: if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main') }} uses: carlthome/workflows/.github/workflows/python.yaml@main with: - package-name: audioscrape + package-name: $PACKAGE_NAME package-index-name: TestPyPI package-index-url: https://test.pypi.org/legacy @@ -32,6 +41,6 @@ jobs: if: ${{ github.event_name == 'release' && github.event.action == 'published' }} uses: carlthome/workflows/.github/workflows/python.yaml@main with: - package-name: audioscrape + package-name: $PACKAGE_NAME package-index-name: PyPI package-index-url: https://pypi.org diff --git a/audioscrape/youtube.py b/audioscrape/youtube.py index cc4d95b..91f0929 100644 --- a/audioscrape/youtube.py +++ b/audioscrape/youtube.py @@ -63,13 +63,6 @@ def scrape(query, include, exclude, quiet, verbose, overwrite, limit): "writeinfojson": True, "writethumbnail": True, "writedescription": True, - "postprocessors": [ - { - "key": "FFmpegExtractAudio", - "preferredcodec": "vorbis", - "preferredquality": "192", - } - ], } ydl = yt.YoutubeDL(download_options)