invidious
invidious copied to clipboard
Add fallback to TvSimply client
Depends on: https://github.com/iv-org/invidious/pull/5344
Uses the same order Invidious companion uses: https://github.com/iv-org/invidious-companion/blob/d0c4bb79ae4688d019fb281257859e334adb7d8b/src/lib/helpers/youtubePlayerReq.ts#L75
IMO it's better to create just one PR instead of two.
You're right. I'll fix it and test it later.
I wasn't able to test it since Innertube didn't return signatureCipher to me. I added https://github.com/iv-org/invidious-companion/blob/d0c4bb79ae4688d019fb281257859e334adb7d8b/src/lib/helpers/youtubePlayerReq.ts#L92 to companion because when I was working on it, I got signatureCipher but not url.
Maybe we should really add some mocks, test data and crystal tests :/
Technically there already are mocks and tests, there's just not enough of it and imo the current system is confusing to understand.
I don't fully understand it myself if I'm being honest but I believe you'll need to update iv-org/mocks with the mock json for this, pull the latest version of the submodule in the invidious repo, and then finally add a test for it here.
I have taken the opportunity to remove the TV fallback here because of https://github.com/iv-org/invidious-companion/pull/157 TvSimply works fine enough on my instance (https://inv.nadeko.net)
Merged with https://github.com/iv-org/invidious/commit/0308acb624657a30aff46417f848a2456c19025b
I'm not sure why Github's UI isn't marking this as merged.