Sleuteltje / plugin.video.youtubelibrary

GNU General Public License v3.0
7 stars 8 forks source link

Unable to add Techmoan channel as TV show #11

Open aubade opened 4 years ago

aubade commented 4 years ago

I haven't been able to get the error to actually show up in my kodi log, but whenever I try to add the channel Techmoan (first search result for that string) as a TV show in Youtube library, it says there was an error, before even showing the uploads/playlist selector.

Running version 9.9.1 on Odroid N2 CoreElec edition (Kodi Nightly)

tofof commented 4 years ago

Youtube added some more custom playlist types that get listed when you list all playlists and uploads of a channel. For the majority of channels, they return empty sets, and YTL chokes on them.

The fix is easy enough for you to make on your own machine, see this commit 508280bc471c4dab3e2bc4c9947c7282c5463192 on my fork.

I don't bother making PRs here anymore, since I already have one outstanding from two years ago.

aubade commented 4 years ago

I really appreciate the help, but unfortunately it seems like some other changes in youtube have rendered the plugin completely nonfunctional. Fortunately, someone on the Kodi forums seems to be working on a ground-up replacement.

tofof commented 4 years ago

Oh, it's not nonfunctional, you just need to use a custom API key. You can change it at the top of vars.py and you can find instructions on making a 'custom youtube api key' by googling that phrase.

aubade commented 4 years ago

Sure enough, that fixed playlist updating!

Unfortunately, your fix didn't seem to work for adding Techmoan as a channel.

It did fix another channel (Big Joel) that gave me similar problems, though.

tofof commented 4 years ago

Interesting. It was the addition of favorites and likes playlists that broke things before at line 199. Every channel I checked those always returned empty playlists, which is what I figured broke things and patched around. It turns out that even when one of them (favorites in Techmoan's case) is populated, the list it returns (LL5I2hjZYiW9gZPVkvzM8_Cw) doesn't contain the expected playlist information, and so YTL still chokes.

Avoiding those new list types entirely (by further modifying that line, see 540c8cea6297bfa6fe6a4c3e92d3f653ca720d0b) fixes it and lets me add Techmoan's uploads or created playlists as YTL shows. Enjoy.

aubade commented 4 years ago

That did the trick. Thank you so much for all your help!