[GH-ISSUE #31] [Bug]: A 404 response from TA should not stop video scanning #10

Closed
opened 2026-03-23 20:33:10 +00:00 by mirror · 4 comments
Owner

Originally created by @zac-schutt on GitHub (Dec 10, 2023).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/31

I've read the documentation.

  • I'm running the latest version of the TubeArchivist Plex Integration Scanner and Agent. I have read the latest release notes and installation instructions.

Operating System

Linux

Your Bug Report

Describe the bug

Somewhere along the line, metadata for some videos have been removed from my instance of TA, but the files still remain on disk. When scanning in plex, the process stops when it recieves a 404 from tubearchivist. This presents itself as some videos missing from the Plex library, even though they exist in TA. Rescanning the filesystem in TA resolves this by re-importing the metadata, but requires manual removal of video files that have been removed from YouTube.

I believe the exception handling that needs cleaning up is here, but I'm not a python expert.
github.com/tubearchivist/tubearchivist-plex@c14fb74475/Contents/Code/init.py#L172C1-L172C25

Steps To Reproduce

Add a file in the expected format to the TubeArchivist filesystem, rescan library. The rescan stops processing a channel when it reaches a video without metadata.

Expected behavior

Skip processing the file, and continue with others in the same folder.

Relevant log output

2023-12-10 22:53:49,212 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist at http://192.168.1.92:8001 with provided token from `ta_config.json` file.
2023-12-10 22:53:49,218 [TubeArchivist Scanner] INFO - TubeArchivist is running version v0.4.4
2023-12-10 22:53:49,227 [TubeArchivist Scanner] INFO - Processing file with scanner: -LhDWkfUZFs.mp4
2023-12-10 22:53:49,227 [TubeArchivist Scanner] INFO - File matches expected filename layout.
2023-12-10 22:53:49,227 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist to lookup YouTube video: -LhDWkfUZFs
2023-12-10 22:53:49,308 [TubeArchivist Scanner] ERROR - Error reading or accessing url '<urllib2.Request instance at 0x7f85140ab370>', Exception: 'HTTP Error 404: Not Found'
2023-12-10 22:53:49,308 [TubeArchivist Scanner] ERROR - Error connecting to TubeArchivist with URL 'http://192.168.1.92:8001/api/video/-LhDWkfUZFs/', Exception: 'HTTP Error 404: Not Found'
2023-12-10 22:53:49,308 [TubeArchivist Scanner] ERROR - Error processing video response from TubeArchivist at URL 'http://192.168.1.92:8001', Exception: 'HTTP Error 404: Not Found'
2023-12-10 22:53:49,309 [TubeArchivist Scanner] ERROR - Issue with setting metadata from video using response metadata: '{}', Exception: 'HTTP Error 404: Not Found'

Anything else?

No response

Originally created by @zac-schutt on GitHub (Dec 10, 2023). Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/31 ### I've read the documentation. - [X] I'm running the latest version of the TubeArchivist Plex Integration Scanner and Agent. I have read the latest release notes and installation instructions. ### Operating System Linux ### Your Bug Report ## Describe the bug Somewhere along the line, metadata for some videos have been removed from my instance of TA, but the files still remain on disk. When scanning in plex, the process stops when it recieves a 404 from tubearchivist. This presents itself as some videos missing from the Plex library, even though they exist in TA. Rescanning the filesystem in TA resolves this by re-importing the metadata, but requires manual removal of video files that have been removed from YouTube. I believe the exception handling that needs cleaning up is here, but I'm not a python expert. https://github.com/tubearchivist/tubearchivist-plex/blob/c14fb74475f7950abd869320fd1464e587d373cd/Contents/Code/__init__.py#L172C1-L172C25 ## Steps To Reproduce Add a file in the expected format to the TubeArchivist filesystem, rescan library. The rescan stops processing a channel when it reaches a video without metadata. ## Expected behavior Skip processing the file, and continue with others in the same folder. ### Relevant log output ```Shell 2023-12-10 22:53:49,212 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist at http://192.168.1.92:8001 with provided token from `ta_config.json` file. 2023-12-10 22:53:49,218 [TubeArchivist Scanner] INFO - TubeArchivist is running version v0.4.4 2023-12-10 22:53:49,227 [TubeArchivist Scanner] INFO - Processing file with scanner: -LhDWkfUZFs.mp4 2023-12-10 22:53:49,227 [TubeArchivist Scanner] INFO - File matches expected filename layout. 2023-12-10 22:53:49,227 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist to lookup YouTube video: -LhDWkfUZFs 2023-12-10 22:53:49,308 [TubeArchivist Scanner] ERROR - Error reading or accessing url '<urllib2.Request instance at 0x7f85140ab370>', Exception: 'HTTP Error 404: Not Found' 2023-12-10 22:53:49,308 [TubeArchivist Scanner] ERROR - Error connecting to TubeArchivist with URL 'http://192.168.1.92:8001/api/video/-LhDWkfUZFs/', Exception: 'HTTP Error 404: Not Found' 2023-12-10 22:53:49,308 [TubeArchivist Scanner] ERROR - Error processing video response from TubeArchivist at URL 'http://192.168.1.92:8001', Exception: 'HTTP Error 404: Not Found' 2023-12-10 22:53:49,309 [TubeArchivist Scanner] ERROR - Issue with setting metadata from video using response metadata: '{}', Exception: 'HTTP Error 404: Not Found' ``` ### Anything else? _No response_
mirror 2026-03-23 20:33:10 +00:00
Author
Owner

@lamusmaser commented on GitHub (Dec 13, 2023):

This can be reviewed closer when I have available resources to look into it. I see what you are saying and I'll determine what actions are required at that review.

<!-- gh-comment-id:1854612076 --> @lamusmaser commented on GitHub (Dec 13, 2023): This can be reviewed closer when I have available resources to look into it. I see what you are saying and I'll determine what actions are required at that review.
Author
Owner

@lamusmaser commented on GitHub (Feb 7, 2024):

I believe this has now been fixed with v0.1.4's release.

<!-- gh-comment-id:1932204096 --> @lamusmaser commented on GitHub (Feb 7, 2024): I believe this has now been fixed with v0.1.4's release.
Author
Owner

@lamusmaser commented on GitHub (May 9, 2024):

No additional responses since v0.1.4's release. Planning on development for v0.1.5, so closing this issue as expected to be remediated.

<!-- gh-comment-id:2103026196 --> @lamusmaser commented on GitHub (May 9, 2024): No additional responses since v0.1.4's release. Planning on development for v0.1.5, so closing this issue as expected to be remediated.
Author
Owner

@akoebbe commented on GitHub (Oct 18, 2024):

FWIW I was having the same issue with the latest version. I put in a PR with a fix. #83

<!-- gh-comment-id:2421035525 --> @akoebbe commented on GitHub (Oct 18, 2024): FWIW I was having the same issue with the latest version. I put in a PR with a fix. #83
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tubearchivist/archived-tubearchivist-plex#10
No description provided.