diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index cb989c5..e62118a 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -19,14 +19,13 @@ env: jobs: # Push image to GitHub Packages. # See also https://docs.docker.com/docker-hub/builds/ - push: + build: runs-on: ubuntu-latest strategy: matrix: python-version: [ "3.10" ] permissions: - packages: write contents: read steps: @@ -43,8 +42,129 @@ jobs: python setup.py bdist_wheel cp dist/*.whl docker/root + - name: Save Python build cache + uses: actions/cache@v3 + with: + path: docker/root + key: ${{github.sha}} + + + # Build ARM64 container + package-arm64: + runs-on: ubuntu-latest + needs: [ + build + ] + + permissions: + contents: read + + steps: + - uses: actions/checkout@v3 + + - name: Restore Python build cache + uses: actions/cache@v3 + with: + path: docker/root + key: ${{github.sha}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/arm64 + + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v2.0.0 + - name: Build Docker Image - run: docker build --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" docker/ + run: | + docker buildx build \ + --platform=linux/arm64 \ + --cache-to=type=local,dest=/tmp/build-cache/arm64 \ + --tag $IMAGE_NAME \ + --label "runnumber=${GITHUB_RUN_ID}" \ + docker/ + + - name: Save ARM64 build cache + uses: actions/cache@v3 + with: + path: /tmp/build-cache/arm64 + key: ${{github.sha}} + + + # Build AMD64 container + package-amd64: + runs-on: ubuntu-latest + needs: [ + build + ] + + permissions: + contents: read + + steps: + - uses: actions/checkout@v3 + + - name: Restore Python build cache + uses: actions/cache@v3 + with: + path: docker/root + key: ${{github.sha}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64 + + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v2.0.0 + + - name: Build Docker Image + run: | + docker buildx build \ + --platform=linux/amd64 \ + --cache-to=type=local,dest=/tmp/build-cache/amd64 \ + --tag $IMAGE_NAME \ + --label "runnumber=${GITHUB_RUN_ID}" \ + docker/ + + - name: Save AMD64 build cache + uses: actions/cache@v3 + with: + path: /tmp/build-cache/amd64 + key: ${{github.sha}} + + + # On master branch, build the docker manifest file from the cached docker builds and push to the registry + deploy: + runs-on: ubuntu-latest + needs: [ + build, + package-arm64, + package-amd64 + ] + + permissions: + packages: write + contents: read + + if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }} + steps: + - uses: actions/checkout@v3 + + - name: Restore Python build cache + uses: actions/cache@v3 + with: + path: docker/root + key: ${{github.sha}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 + + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v2.0.0 - name: login to GitHub Container Registry uses: docker/login-action@v1 @@ -53,24 +173,48 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Push image on master or release - run: | - if [[ ${{ github.ref }} =~ ^refs\/heads\/master|^refs\/tags\/v.* ]]; then - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME + - name: Restore ARM64 build cache + uses: actions/cache@v3 + with: + path: /tmp/build-cache/arm64 + key: ${{github.sha}} + + - name: Restore AMD64 build cache + uses: actions/cache@v3 + with: + path: /tmp/build-cache/amd64 + key: ${{github.sha}} + + - name: Format image_id + id: formatted-image_id + run: | + IMAGE_ID=ghcr.io/${{ github.repository_owner }}/${IMAGE_NAME} # Change all uppercase to lowercase IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + echo IMAGE_ID=${IMAGE_ID} + + echo ::set-output name=IMAGE_ID::${IMAGE_ID} + + - name: Get the version + id: formatted_version + run: | # Strip git ref prefix from version VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') # Strip "v" prefix from tag name [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') # Use Docker `latest` tag convention [ "$VERSION" == "master" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - else - echo "Skipped on PRs" - fi + echo VERSION=${VERSION} + + echo ::set-output name=VERSION::${VERSION} + - name: Build Docker Image and push to registry + run: | + docker buildx build --push \ + --platform=linux/amd64,linux/arm64 \ + --cache-from=type=local,src=/tmp/build-cache/amd64 \ + --cache-from=type=local,src=/tmp/build-cache/arm64 \ + --tag ${{ steps.formatted-image_id.outputs.IMAGE_ID }}:${{ steps.formatted_version.outputs.VERSION }} \ + --label "runnumber=${GITHUB_RUN_ID}" \ + docker/ \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 8b5d7d9..7474ca3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -23,7 +23,8 @@ RUN apk update --no-cache && \ rm ytdl_sub-*.whl && \ apk del \ g++ \ - make + make \ + py3-setuptools ############################################################################### # CONTAINER CONFIGS diff --git a/docker/root/defaults/config.yaml b/docker/root/defaults/config.yaml index b95b4fc..43d2fea 100644 --- a/docker/root/defaults/config.yaml +++ b/docker/root/defaults/config.yaml @@ -16,7 +16,7 @@ presets: output_options: output_directory: "{music_video_directory}" file_name: "{music_video_name}.{ext}" - thumbnail_name: "{music_video_name}.jpg" + thumbnail_name: "{music_video_name}-thumb.jpg" nfo_tags: nfo_name: "{music_video_name}.nfo" diff --git a/examples/kodi_music_videos_config.yaml b/examples/kodi_music_videos_config.yaml index b5a8b70..36c1306 100644 --- a/examples/kodi_music_videos_config.yaml +++ b/examples/kodi_music_videos_config.yaml @@ -37,7 +37,7 @@ presets: output_options: output_directory: "{music_video_directory}" file_name: "{music_video_name}.{ext}" - thumbnail_name: "{music_video_name}.jpg" + thumbnail_name: "{music_video_name}-thumb.jpg" # For each video downloaded, add a music video NFO file for it. Populate it # with tags that Kodi will read and use to display it in the music or music diff --git a/examples/kodi_tv_shows_config.yaml b/examples/kodi_tv_shows_config.yaml index 1fa4de7..86b3f53 100644 --- a/examples/kodi_tv_shows_config.yaml +++ b/examples/kodi_tv_shows_config.yaml @@ -52,7 +52,7 @@ presets: output_options: output_directory: "{youtube_tv_shows_directory}/{tv_show_name_sanitized}" file_name: "{episode_name}.{ext}" - thumbnail_name: "{episode_name}.jpg" + thumbnail_name: "{episode_name}-thumb.jpg" maintain_download_archive: True # For each video downloaded, add an episode NFO file for it. We give it diff --git a/setup.cfg b/setup.cfg index 51df09d..744893a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,6 @@ install_requires = dicttoxml==1.7.4 mergedeep==1.3.4 mediafile==0.9.0 - Pillow==9.1.0 PyYAML==6.0 [options.packages.find] diff --git a/src/ytdl_sub/utils/thumbnail.py b/src/ytdl_sub/utils/thumbnail.py index c137a1f..0a3d4b9 100644 --- a/src/ytdl_sub/utils/thumbnail.py +++ b/src/ytdl_sub/utils/thumbnail.py @@ -1,12 +1,11 @@ import os +import tempfile from pathlib import Path from typing import Optional from urllib.request import urlopen -from PIL.Image import Image -from PIL.Image import open as pil_open - from ytdl_sub.entries.entry import Entry +from ytdl_sub.utils.ffmpeg import FFMPEG def _get_downloaded_thumbnail_path(entry: Entry) -> Optional[str]: @@ -45,8 +44,8 @@ def convert_download_thumbnail(entry: Entry): if not download_thumbnail_path: raise ValueError("Thumbnail not found") - image: Image = pil_open(download_thumbnail_path).convert("RGB") - image.save(fp=download_thumbnail_path_as_jpg, format="jpeg") + if not download_thumbnail_path == download_thumbnail_path_as_jpg: + FFMPEG.run(["-bitexact", "-i", download_thumbnail_path, download_thumbnail_path_as_jpg]) def convert_url_thumbnail(thumbnail_url: str, output_thumbnail_path: str): @@ -61,6 +60,7 @@ def convert_url_thumbnail(thumbnail_url: str, output_thumbnail_path: str): Thumbnail file destination after its converted to jpg """ with urlopen(thumbnail_url) as file: - image: Image = pil_open(file).convert("RGB") + with tempfile.NamedTemporaryFile() as thumbnail: + thumbnail.write(file.read()) - image.save(fp=output_thumbnail_path, format="jpeg") + FFMPEG.run(["-bitexact", "-i", thumbnail.name, output_thumbnail_path, "-bitexact"]) diff --git a/tests/e2e/soundcloud/test_soundcloud_discography.py b/tests/e2e/soundcloud/test_soundcloud_discography.py index 488c550..033e5e4 100644 --- a/tests/e2e/soundcloud/test_soundcloud_discography.py +++ b/tests/e2e/soundcloud/test_soundcloud_discography.py @@ -63,10 +63,10 @@ def expected_discography_download(): # Entry files (singles) Path("j_b/[2021] Baby Santana's Dorian Groove/01 - Baby Santana's Dorian Groove.mp3"): "bffbd558e12c6a9e029dc136a88342c4", - Path("j_b/[2021] Baby Santana's Dorian Groove/folder.jpg"): "511c43d7e939c70953cf2cd3cd437072", + Path("j_b/[2021] Baby Santana's Dorian Groove/folder.jpg"): "967892be44b8c47e1be73f055a7c6f08", Path("j_b/[2021] Purple Clouds/01 - Purple Clouds.mp3"): "038db58aebe2ba875b733932b42a94d6", - Path("j_b/[2021] Purple Clouds/folder.jpg"): "511c43d7e939c70953cf2cd3cd437072", + Path("j_b/[2021] Purple Clouds/folder.jpg"): "967892be44b8c47e1be73f055a7c6f08", # Entry files (albums) Path("j_b/[2022] Acoustic Treats/01 - 20160426 184214.mp3"): "e145f0a2f6012768280c38655ca58065", @@ -80,7 +80,7 @@ def expected_discography_download(): Path("j_b/[2022] Acoustic Treats/09 - Finding Home.mp3"): "adbf02eddb2090c008eb497d13ff84b9", Path("j_b/[2022] Acoustic Treats/10 - Shallow Water WIP.mp3"): "65bb10c84366c71498161734f953e93d", Path("j_b/[2022] Acoustic Treats/11 - Untold History.mp3"): "6904b2918e5dc38d9a9f72d967eb74bf", - Path("j_b/[2022] Acoustic Treats/folder.jpg"): "511c43d7e939c70953cf2cd3cd437072", + Path("j_b/[2022] Acoustic Treats/folder.jpg"): "967892be44b8c47e1be73f055a7c6f08", } diff --git a/tests/e2e/youtube/test_channel_as_kodi_tv_show.py b/tests/e2e/youtube/test_channel_as_kodi_tv_show.py index fcaeb4e..bf3184f 100644 --- a/tests/e2e/youtube/test_channel_as_kodi_tv_show.py +++ b/tests/e2e/youtube/test_channel_as_kodi_tv_show.py @@ -68,59 +68,59 @@ def expected_full_channel_download(): return ExpectedDownload( expected_md5_file_hashes={ # Download mapping - Path(".ytdl-sub-pz-download-archive.json"): "b7e7c19d2cf0277e4e42453a64fbaa90", + Path(".ytdl-sub-pz-download-archive.json"): "dd3c6236a107a665b884f701b8d14d4d", # Output directory files - Path("fanart.jpg"): "e6e323373c8902568e96e374817179cf", - Path("poster.jpg"): "a14c593bcc75bb8d2c7145de4767ad01", + Path("fanart.jpg"): "c16b8b88a82cbd47d217ee80f6a8b5f3", + Path("poster.jpg"): "e92872ff94c96ad49e9579501c791578", Path("tvshow.nfo"): "83c7db96081ac5bdf289fcf396bec157", # Entry files - Path("Season 2010/s2010.e0813 - Oblivion Mod 'Falcor' p.1.jpg"): "b58377dfe7c39527e1990a24b36bbd77", + Path("Season 2010/s2010.e0813 - Oblivion Mod 'Falcor' p.1-thumb.jpg"): "fb95b510681676e81c321171fc23143e", Path("Season 2010/s2010.e0813 - Oblivion Mod 'Falcor' p.1.mp4"): "931a705864c57d21d6fedebed4af6bbc", Path("Season 2010/s2010.e0813 - Oblivion Mod 'Falcor' p.1.nfo"): "67d8d71d048039080acbba3bce4febaa", - Path("Season 2010/s2010.e1202 - Oblivion Mod 'Falcor' p.2.jpg"): "a5ee6247c8dce255aec79c9a51d49da4", + Path("Season 2010/s2010.e1202 - Oblivion Mod 'Falcor' p.2-thumb.jpg"): "8b32ee9c037fa669e444a0ac181525a1", Path("Season 2010/s2010.e1202 - Oblivion Mod 'Falcor' p.2.mp4"): "d3469b4dca7139cb3dbc38712b6796bf", Path("Season 2010/s2010.e1202 - Oblivion Mod 'Falcor' p.2.nfo"): "d81f49cedbd7edaee987521e89b37904", - Path("Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].jpg"): "048a19cf0f674437351872c3f312ebf1", + Path("Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg"): "b232d253df621aa770b780c1301d364d", Path("Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].mp4"): "e66287b9832277b6a4d1554e29d9fdcc", Path("Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].nfo"): "f7c0de89038f8c491bded8a3968720a2", - Path("Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].jpg"): None, + Path("Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg"): "d17c379ea8b362f5b97c6b213b0342cb", Path("Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].mp4"): "04ab5cb3cc12325d0c96a7cd04a8b91d", Path("Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].nfo"): "ee1eda78fa0980bc703e602b5012dd1f", - Path("Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].jpg"): "9baaddc6b62f5b9ae3781eb4eef0e3b3", + Path("Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg"): "e7830aa8a64b0cde65ba3f7e5fc56530", Path("Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].mp4"): "025de6099a5c98e6397153c7a62d517d", Path("Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].nfo"): "61eb6369430da0ab6134d78829a7621b", - Path("Season 2011/s2011.e0529 - Project Zombie _Official Trailer_ (IP - mc.projectzombie.beastnode.net).jpg"): "ce1df7f623fffaefe04606ecbafcfec6", + Path("Season 2011/s2011.e0529 - Project Zombie _Official Trailer_ (IP - mc.projectzombie.beastnode.net)-thumb.jpg"): "c956192a379b3661595c9920972d4819", Path("Season 2011/s2011.e0529 - Project Zombie _Official Trailer_ (IP - mc.projectzombie.beastnode.net).mp4"): "3d9c19835b03355d6fd5d00cd59dbe5b", Path("Season 2011/s2011.e0529 - Project Zombie _Official Trailer_ (IP - mc.projectzombie.beastnode.net).nfo"): "60f72b99f5c69f9e03a071a12160928f", - Path("Season 2011/s2011.e0630 - Project Zombie _Fin.jpg"): "bc3f511915869720c37617a7de706b2b", + Path("Season 2011/s2011.e0630 - Project Zombie _Fin-thumb.jpg"): "00ed383591779ffe98291de60f198fe9", Path("Season 2011/s2011.e0630 - Project Zombie _Fin.mp4"): "4971cb2d4fa29460361031f3fa8e1ea9", Path("Season 2011/s2011.e0630 - Project Zombie _Fin.nfo"): "a7b5d9e57d20852f5daf360a1373bb7a", - Path("Season 2011/s2011.e1121 - Skyrim 'Ultra HD w_Mods' [PC].jpg"): "12babdb3b86cd868b90b60d013295f66", + Path("Season 2011/s2011.e1121 - Skyrim 'Ultra HD w_Mods' [PC]-thumb.jpg"): "1718599d5189c65f7d8cf6acfa5ea851", Path("Season 2011/s2011.e1121 - Skyrim 'Ultra HD w_Mods' [PC].mp4"): "55e9b0add08c48c9c66105da0def2426", Path("Season 2011/s2011.e1121 - Skyrim 'Ultra HD w_Mods' [PC].nfo"): "fe60e2b6b564f9316b6c7c183e1cf300", - Path("Season 2012/s2012.e0123 - Project Zombie _Map Trailer.jpg"): "82d303e16aba75acdde30b15c4154231", + Path("Season 2012/s2012.e0123 - Project Zombie _Map Trailer-thumb.jpg"): "54ebe9df801b278fdd17b21afa8373a6", Path("Season 2012/s2012.e0123 - Project Zombie _Map Trailer.mp4"): "65e4ce53ed5ec4139995469f99477a50", Path("Season 2012/s2012.e0123 - Project Zombie _Map Trailer.nfo"): "c8900adcca83c473c79a4afbc7ad2de1", - Path("Season 2013/s2013.e0719 - Project Zombie Rewind _Trailer.jpg"): "83b1af4c3614d262b2ad419586fff730", + Path("Season 2013/s2013.e0719 - Project Zombie Rewind _Trailer-thumb.jpg"): "e29d49433175de8a761af35c5307791f", Path("Season 2013/s2013.e0719 - Project Zombie Rewind _Trailer.mp4"): "18620a8257a686beda65e54add4d4cd1", Path("Season 2013/s2013.e0719 - Project Zombie Rewind _Trailer.nfo"): "1c993c41d4308a6049333154d0adee16", - Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer.jpg"): "2a24de903059f48c7d0df0476046c975", + Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer-thumb.jpg"): "6f8f5e1e031ec2a04b0a4906c04a19ee", Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer.mp4"): "82f6ee7253e1dbb83ae7215af08ffacc", Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer.nfo"): "cc7886aae3af6b7b0facd82f95390242", - Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.jpg"): "c8baea83b9edeb081657f1130a1031f7", + Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id-thumb.jpg"): "49cc64b25314155c1b8ab0361ac0c34f", Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.mp4"): "e733b4cc385b953b08c8eb0f47e03c1e", Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.nfo"): "2b3ccb3f1ef81ee49fe1afb88f275a09", } @@ -164,19 +164,19 @@ def expected_recent_channel_download(): return ExpectedDownload( expected_md5_file_hashes={ # Download mapping - Path(".ytdl-sub-pz-download-archive.json"): "b1675ca4d9f0d4b9c2102b6749e4cdfd", + Path(".ytdl-sub-pz-download-archive.json"): "91534d1c5921d121aa35d7a197ba1940", # Output directory files - Path("fanart.jpg"): "e6e323373c8902568e96e374817179cf", - Path("poster.jpg"): "a14c593bcc75bb8d2c7145de4767ad01", + Path("fanart.jpg"): "c16b8b88a82cbd47d217ee80f6a8b5f3", + Path("poster.jpg"): "e92872ff94c96ad49e9579501c791578", Path("tvshow.nfo"): "83c7db96081ac5bdf289fcf396bec157", # Recent Entry files - Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer.jpg"): "2a24de903059f48c7d0df0476046c975", + Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer-thumb.jpg"): "6f8f5e1e031ec2a04b0a4906c04a19ee", Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer.mp4"): "82f6ee7253e1dbb83ae7215af08ffacc", Path("Season 2018/s2018.e1029 - Jesse's Minecraft Server _ Teaser Trailer.nfo"): "cc7886aae3af6b7b0facd82f95390242", - Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.jpg"): "c8baea83b9edeb081657f1130a1031f7", + Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id-thumb.jpg"): "49cc64b25314155c1b8ab0361ac0c34f", Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.mp4"): "e733b4cc385b953b08c8eb0f47e03c1e", Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.nfo"): "2b3ccb3f1ef81ee49fe1afb88f275a09", } @@ -225,8 +225,8 @@ def expected_recent_channel_no_vids_in_range_download(): Path(".ytdl-sub-pz-download-archive.json"): "99914b932bd37a50b983c5e7c90ae93b", # Output directory files - Path("fanart.jpg"): "e6e323373c8902568e96e374817179cf", - Path("poster.jpg"): "a14c593bcc75bb8d2c7145de4767ad01", + Path("fanart.jpg"): "c16b8b88a82cbd47d217ee80f6a8b5f3", + Path("poster.jpg"): "e92872ff94c96ad49e9579501c791578", Path("tvshow.nfo"): "83c7db96081ac5bdf289fcf396bec157", } ) @@ -269,15 +269,15 @@ def expected_rolling_recent_channel_download(): return ExpectedDownload( expected_md5_file_hashes={ # Download mapping - Path(".ytdl-sub-pz-download-archive.json"): "9ae3463bd2dc39830003aba68a276df4", + Path(".ytdl-sub-pz-download-archive.json"): "97ff47a7c5d89a426a653493ad1a3f06", # Output directory files - Path("fanart.jpg"): "e6e323373c8902568e96e374817179cf", - Path("poster.jpg"): "a14c593bcc75bb8d2c7145de4767ad01", + Path("fanart.jpg"): "c16b8b88a82cbd47d217ee80f6a8b5f3", + Path("poster.jpg"): "e92872ff94c96ad49e9579501c791578", Path("tvshow.nfo"): "83c7db96081ac5bdf289fcf396bec157", # Rolling Recent Entry files - Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.jpg"): "c8baea83b9edeb081657f1130a1031f7", + Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id-thumb.jpg"): "49cc64b25314155c1b8ab0361ac0c34f", Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.mp4"): "e733b4cc385b953b08c8eb0f47e03c1e", Path("Season 2018/s2018.e1102 - Jesse's Minecraft Server _ IP mc.jesse.id.nfo"): "2b3ccb3f1ef81ee49fe1afb88f275a09", } diff --git a/tests/e2e/youtube/test_merge_playlist.py b/tests/e2e/youtube/test_merge_playlist.py index e9bade9..007f79b 100644 --- a/tests/e2e/youtube/test_merge_playlist.py +++ b/tests/e2e/youtube/test_merge_playlist.py @@ -65,7 +65,7 @@ def playlist_subscription(config, subscription_name, subscription_dict): def expected_playlist_download(): return ExpectedDownload( expected_md5_file_hashes={ - Path("JMC - Jesse's Minecraft Server.jpg"): "348e3007fc590d0b1e2f6682501b0b5f", + Path("JMC - Jesse's Minecraft Server-thumb.jpg"): "a3f1910f9c51f6442f845a528e190829", Path("JMC - Jesse's Minecraft Server.mkv"): [ "6053c47a8690519b0a33c13fa4b01ac0", "3ab42b3e6be0a44deb3a9a28e6ebaf16", diff --git a/tests/e2e/youtube/test_playlist_as_kodi_music_videos.py b/tests/e2e/youtube/test_playlist_as_kodi_music_videos.py index f8f0969..ddfd219 100644 --- a/tests/e2e/youtube/test_playlist_as_kodi_music_videos.py +++ b/tests/e2e/youtube/test_playlist_as_kodi_music_videos.py @@ -66,18 +66,18 @@ def expected_playlist_download(): return ExpectedDownload( expected_md5_file_hashes={ # Download mapping - Path(".ytdl-sub-jmc-download-archive.json"): "d8e784353c7c3006cb755a034c965160", + Path(".ytdl-sub-jmc-download-archive.json"): "9f785c29194a6ecfba6a6b4018763ddc", # Entry files - Path("JMC - Jesse's Minecraft Server [Trailer - Feb.1].jpg"): None, + Path("JMC - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg"): "b232d253df621aa770b780c1301d364d", Path("JMC - Jesse's Minecraft Server [Trailer - Feb.1].mp4"): "e66287b9832277b6a4d1554e29d9fdcc", Path("JMC - Jesse's Minecraft Server [Trailer - Feb.1].nfo"): "3d272fe58487b6011ad049b6000b046f", - Path("JMC - Jesse's Minecraft Server [Trailer - Feb.27].jpg"): None, + Path("JMC - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg"): "d17c379ea8b362f5b97c6b213b0342cb", Path("JMC - Jesse's Minecraft Server [Trailer - Feb.27].mp4"): "04ab5cb3cc12325d0c96a7cd04a8b91d", Path("JMC - Jesse's Minecraft Server [Trailer - Feb.27].nfo"): "6f99af10bef67276a507d1d9770c5e92", - Path("JMC - Jesse's Minecraft Server [Trailer - Mar.21].jpg"): None, + Path("JMC - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg"): "e7830aa8a64b0cde65ba3f7e5fc56530", Path("JMC - Jesse's Minecraft Server [Trailer - Mar.21].mp4"): "025de6099a5c98e6397153c7a62d517d", Path("JMC - Jesse's Minecraft Server [Trailer - Mar.21].nfo"): "beec3c1326654bd8c858cecf4e40977a", } @@ -120,7 +120,7 @@ def expected_single_video_download(): # fmt: off return ExpectedDownload( expected_md5_file_hashes={ - Path("JMC - Oblivion Mod 'Falcor' p.1.jpg"): None, + Path("JMC - Oblivion Mod 'Falcor' p.1-thumb.jpg"): "fb95b510681676e81c321171fc23143e", Path("JMC - Oblivion Mod 'Falcor' p.1.mp4"): "931a705864c57d21d6fedebed4af6bbc", Path("JMC - Oblivion Mod 'Falcor' p.1.nfo"): "89f509a8a3d9003e22a9091abeeae5dc", } diff --git a/tests/e2e/youtube/test_split_video.py b/tests/e2e/youtube/test_split_video.py index d0602fa..af4fc33 100644 --- a/tests/e2e/youtube/test_split_video.py +++ b/tests/e2e/youtube/test_split_video.py @@ -96,17 +96,17 @@ def expected_single_video_download(): Path('Project Zombie - 4-6.Part 3.mp4'): "2b6e7532d515c9e64ed2a33d850cf199", Path('Project Zombie - 5-6.Part 4.mp4'): "842bf3c4d1fcc4c5ab110635935dac66", Path('Project Zombie - 6-6.Part 5.mp4'): "238de99f00f829ab72f042b79da9a33a", - Path('Project Zombie - Intro.jpg'): "e87282e4115baa8b5c727fb4de15316d", + Path('Project Zombie - Intro-thumb.jpg'): "fb95b510681676e81c321171fc23143e", Path('Project Zombie - Intro.nfo'): "ded59ac906f579312cc3cf98a57e7ea3", - Path('Project Zombie - Part 1.jpg'): "e87282e4115baa8b5c727fb4de15316d", + Path('Project Zombie - Part 1-thumb.jpg'): "fb95b510681676e81c321171fc23143e", Path('Project Zombie - Part 1.nfo'): "70ff5cd0092b8bc22dc4db93a824789b", - Path('Project Zombie - Part 2.jpg'): "e87282e4115baa8b5c727fb4de15316d", + Path('Project Zombie - Part 2-thumb.jpg'): "fb95b510681676e81c321171fc23143e", Path('Project Zombie - Part 2.nfo'): "54450c18a2cbb9d6d2ee5d0a1fb3f279", - Path('Project Zombie - Part 3.jpg'): "e87282e4115baa8b5c727fb4de15316d", + Path('Project Zombie - Part 3-thumb.jpg'): "fb95b510681676e81c321171fc23143e", Path('Project Zombie - Part 3.nfo'): "0effb13fc4039363a95969d1048dde57", - Path('Project Zombie - Part 4.jpg'): "e87282e4115baa8b5c727fb4de15316d", + Path('Project Zombie - Part 4-thumb.jpg'): "fb95b510681676e81c321171fc23143e", Path('Project Zombie - Part 4.nfo'): "74bd0d7c12105469838768a0cc323a8c", - Path('Project Zombie - Part 5.jpg'): "e87282e4115baa8b5c727fb4de15316d", + Path('Project Zombie - Part 5-thumb.jpg'): "fb95b510681676e81c321171fc23143e", Path('Project Zombie - Part 5.nfo'): "a8cf2e77721335ea7c18e22734e7996c", } )