nichobi / sponsorblockcast

A shell script that skips sponsored YouTube content on all local Chromecasts
GNU General Public License v3.0
348 stars 15 forks source link

Fix for 4th gen Chromecast #17

Closed iMacThere4iAm closed 2 years ago

iMacThere4iAm commented 2 years ago

On newer Chromecast devices which don't return the videoID to go-chromecast, attempt to identify it using an API search query. Not guaranteed to get it right. Requires an API key. Fixes nichobi/sponsorblockcast#16

TODO: Needs error handling, in case an API query is attempted but fails. TODO: Needs some validation to confirm back that it's identified the right videoID. Perhaps by comparing the duration returned by go-chromecast to the videoDuration in the sponsorblock database. TODO: Could scrape a non-API Youtube search as a secondary fallback option if the API query fails. This would be less robust but doesn't require an API key.

iMacThere4iAm commented 2 years ago

This fix needs more testing, at the moment it works well when run from a terminal but not via systemd.

iMacThere4iAm commented 2 years ago

This fix needs more testing, at the moment it works well when run from a terminal but not via systemd.

Fixed by a04b1a5. Everything else is just tinkering.

iMacThere4iAm commented 2 years ago

Pull request closed by accident!

nichobi commented 2 years ago

Looks great! I've made a few formatting changes (just being picky, nothing wrong with it) and a few minor changes. If it all looks good to you, I'm happy to merge it now!

iMacThere4iAm commented 2 years ago

All good, be as picky as you like with my noob code! I've got nothing to add to the branch, so merge away.