Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YT Playlists That Include "Unavailable" Videos Won't Synchronize successfully. #6212

Closed
Umplo opened this issue Feb 8, 2024 · 3 comments
Closed
Labels
Component: Import Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor

Comments

@Umplo
Copy link

Umplo commented Feb 8, 2024

Describe the current behavior

I noticed that synchronizing any YouTube playlist to a PeerTube channel will only work correctly if there are no "Unavailable" videos in that YouTube playlist.

If a given user adds a PeerTube channel synchronization task based on YouTube playlists that include "unavailable" videos (deleted, unlisted, or blocked for regional Copyright reasons), the synchronization task will usually (but not always) successfully download the metadata for all videos, with them being added to the "My Imports" section with a "PENDING" state. The videos will then correctly begin to download and import each video one by one in the expected manner, changing the status to "PROCESSING" and eventually "SUCCESS" (expected behavior), up until it reaches a video that is marked as unavailable on YouTube, at which point that "unavailable" video will remain stuck in the "PROCESSING" state in the PeerTube "My Imports" section.

image

If what I describe is confirmed to be the cause of the problem, then I would suggest that to implement a fix that includes the following behavior: any video deemed unavailable (via a JSON property or a response code) according to the YouTube API be skipped entirely for metadata extraction and/or video downloading.

Steps to reproduce

  1. Select a publicly accessible YouTube playlist that contains videos that are "hidden" due to being "unavailable".
  2. Create a PeerTube synchronization task that includes that playlist to any PeerTube channel.
  3. Regardless of the number of ongoing or subsequently added synchronization tasks added, the importing of videos (via synchronization) will freeze server-wide once it reaches an unavailable video.

Describe the expected behavior

This causes all channel synchronization tasks (whether a YouTube channel or even a playlist without any unavailable videos contained within) to come to a halt as PeerTube won't skip over the video that isn't being successfully processed. However, new YouTube channel video publications will still download.

Until the unavailable video(s) is/are spotted and removed, no synchronization tasks will resume on the PeerTube server. Finding the culprit video can be troublesome if a playlist has 1.000s of videos, many of which unavailable.

Additional information

PeerTube version: 6.0.3 (deployed via docker-compose)
NodeJS version: 18.19.0
yt-dlp version: 2023.12.30

The bug presents itself server-side, and transcoding is done natively on that same server, not using an external endpoint.

No relevant errors are in the PeerTube logs. Therefore, none are supplied.

@Chocobozzz
Copy link
Owner

Hello,

Can you paste the URL of a playlist that contains unavailable videos?

@Chocobozzz Chocobozzz added the Status: Waiting for answer Waiting issue author answer label Feb 15, 2024
@Umplo
Copy link
Author

Umplo commented Feb 16, 2024

Hi @Chocobozzz,

Absolutely! Here's an example playlist: https://www.youtube.com/playlist?list=PLN5fmudwjejFKHN_5TP8QT1baTr5XM_MO

Thanks for looking into this.

@Chocobozzz Chocobozzz added Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor Component: Import and removed Status: Waiting for answer Waiting issue author answer labels Feb 16, 2024
@Chocobozzz
Copy link
Owner

Thanks! It should be fixed by 48f1d4b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Import Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor
Projects
None yet
Development

No branches or pull requests

2 participants