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

Error when video starts #5

Open
scorpion7-7 opened this issue Aug 14, 2024 · 2 comments
Open

Error when video starts #5

scorpion7-7 opened this issue Aug 14, 2024 · 2 comments

Comments

@scorpion7-7
Copy link

The output for every view starts as:

New search: Looking up YT data for video "<video name obscured>"
Error during lookup: list index out of range

Then there's regular outputs showing Title, Artist, Position and ID but Segments is empty. Python is 3.11.2. tvOS is the latest (17.6)

Something appears to be broken as Ads play and it doesn't appear to obtain all the relevant information. Also, if runme.sh is interrupted and then restarted, both ID and Segments are empty. Is that expected?

Thanks!

@bsharper
Copy link
Owner

bsharper commented Sep 5, 2024

It sounds like the video wasn't found for some reason. We can only see the channel name and video title from the Apple TV API, so the program has to look up the video ID using a search (which is just channel name + video title). Look at line 16 here: https://github.com/bsharper/sbremote/blob/main/sb_cache.py

That's where the error is happening. Unfortunately it looks like the YT search library I was using isn't updated any more, so I'll need to replace this at some point.

Were the videos you were watching new (recently released)? There's a local cache file called vidcache.json that attempts to prevent hammering SponsorBlocks's API by caching video data for 12 hours, so it's possible it was asking SB for details and there were none yet. You can try removing vidcache.json to see if it pulls the correct info now.

@scorpion7-7
Copy link
Author

Tried newer and older videos. Some were uploaded to YT more than 4 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants