Release YoutubeToKodi
#1
This python script will create strm files, metadata, and images for Youtube channels so you can add them into Kodi as TV Shows.

https://github.com/nuentes/YoutubeToKodi

Why? Because I like to have all of my videos in a single place, and get them added there automatically. I couldn't find any existing scripts that did this, so I decided to make it myself.

How to use it:
1. Place the python script anywhere on your server or PC (it is NOT a Kodi add-on... yet)
2. add Youtube UserID's OR channelID's OR playlistID's into the text file (new line for each channel). If it is a playlist, you must start the line with a plus sign
3. Edit the user config section of the script to input: Google API Key (required), refresh interval (required), Destination for the files (required), your personal youtube ChannelID (optional)
4. run the script
5. While that's running, add the Destination Directory as a source to Kodi, and set it to scan as a TV show using local data

Known Issues:
1. The developer doesn't know python
2. Initial config isn't exactly a breeze
3. requires your own Google API Key
4. I can only get the 50 most recent uploads from a user (and I don't think there is any way around that)
5. Episodes are not automatically marked as watched after completion. I thought this would be resolved by adding the runtime field to the episode nfo file, but I was wrong.
6. There is no duration for short videos - at least on my skin, if the duration is under 1 minute, the duration appears as blank

I likely won't heavily support this unless there is some serious interest, and I can't get any other devs to help. Basically: known issue #1 makes it hard to resolve issues 2-7. I can see this becoming an actual Kodi add-on in the future, however I've never done anything like that, and that sounds like a job for someone else. I just thought I'd share my work with the community.

v0.2 releasenotes (10/24/2015)
-Windows compatibility was added (yay!)
-you can import all your youtube subscriptions automatically (and they will be updated whenever you add a new one)
-you can add playlists (append a "+" at the beginning of the line of the list.txt entry)
-changed episode naming pattern within nfo file
-a few bugfixes/optimizations
Reply
#2
This is a really good idea, I hope someone can help you further develop it. If I knew anything about scripting I would.
Reply
#3
I was looking for such addons for a long time. If I have time I'll test it, but probably I will wait to be implemented as a proper Kodi Addons. Keep up the good work.
Reply
#4
Besides some minor other fixes I need to address, I believe the next things on my list are (in order of importance):
1) remove the need for your own API key
2) make this into an kodi addon
Reply
#5
Your API key is still in the script you've pushed to github

One of the features I'd like to see is: the ability to scrape all videos from a channel - this may be possible using PageToken call - https://developers.google.com/youtube/v3...#pageToken
Reply
#6
Haha yeah, I kept forgetting to remove it, so I just left it there. It's a server API key that's limited to just my IP address, so I'm not particularly worried. I just removed it to avoid confusion, as well as the accidental importing of some random users subscriptions... Whoops! I'm totally no good at this.

Thanks for the heads up about the page token. I'll look into that later!
Reply
#7
I've been running it over the weekend and it's working just fine.

Modified it slightly to add a <tag> in the tvshow.nfo so that I can separate them for my normal TV shows.
Reply
#8
wait... you mean you've been running API key?
Reply
#9
No, running the script - I removed your API key.
Reply

Logout Mark Read Team Forum Stats Members Help
YoutubeToKodi0