2012-11-09, 16:17
Hey BlueCop, I love this plugin! My wife and I always seem to finish our day by watching a few of the day's top reddit videos. It's been really great.
I've been wondering if it would be possible to add a selection of other "video" sections from reddit. I've modified the plugin to do just that and will post what I did below for anyone else interested in doing the same. Like the original, only the youtube.com domain is filtered, so other sources still will not work.
I guess what I'm asking, would it be possible to add additional reddit sections through the user interface? It would require writing a configuration section.
I implore anyone who does this to first backup: /addons/plugin.video.reddit.bc/default.py
Open the file in your favorite text editor and find the line:
change to:
Further down the page find the "def listCategories". You will need to add "/videos" in front of the original categories. Modify to your heart's content. (play on word intentional So, feel free to add /popping like I know you've always wanted to.
Edit: If anyone has any suggestions for the above list I will add them to this post for easy copy and paste.
Documentaries (added)
Cringe (added)
MusicVideos (added)
Popping (added, Oh gawd)
ObscureMedia (added)
I've been wondering if it would be possible to add a selection of other "video" sections from reddit. I've modified the plugin to do just that and will post what I did below for anyone else interested in doing the same. Like the original, only the youtube.com domain is filtered, so other sources still will not work.
I guess what I'm asking, would it be possible to add additional reddit sections through the user interface? It would require writing a configuration section.
I implore anyone who does this to first backup: /addons/plugin.video.reddit.bc/default.py
Open the file in your favorite text editor and find the line:
Code:
BASE = 'http://www.reddit.com/r/videos'
change to:
Code:
BASE = 'http://www.reddit.com/r'
Further down the page find the "def listCategories". You will need to add "/videos" in front of the original categories. Modify to your heart's content. (play on word intentional So, feel free to add /popping like I know you've always wanted to.
Code:
def listCategories():
addDir("Videos - Whats Hot", BASE+'/videos/.json', 'listVideos', '')
addDir("Videos - New", BASE+'/videos/new.json', 'listVideos', '')
addDir("Videos - Controversial", BASE+'/videos/controversial.json', 'listVideos', '')
addDir("Videos - Top", BASE+'/videos/top.json', 'listVideos', '')
addDir("MitchellAndWebb - New", BASE+'/mitchellandwebb/new.json', 'listVideos', '')
addDir("Music Videos - Hot", BASE+'/MusicVideos/.json', 'listVideos', '')
addDir("K-Pop - Hot", BASE+'/kpop/hot.json', 'listVideos', '')
addDir("Documentary - Hot", BASE+'/documentary/hot.json', 'listVideos', '')
addDir("Documentaries - Hot", BASE+'/documentaries/hot.json', 'listVideos', '')
addDir("Artisan - Hot", BASE+'/artisan/hot.json', 'listVideos', '')
addDir("Artisan Videos - Hot", BASE+'/ArtisanVideos/hot.json', 'listVideos', '')
addDir("Obscure Media - Hot", BASE+'/ObscureMedia/.json', 'listVideos', '')
addDir("Conspiracy Documentary - Hot", BASE+'/conspiracydocumentary/hot.json', 'listVideos', '')
addDir("Rocket Launches - Hot", BASE+'/rocketlaunches/hot.json', 'listVideos', '')
addDir("Science Videos - Hot", BASE+'/sciencevideos/hot.json', 'listVideos', '')
addDir("Car Crash - Hot", BASE+'/carcrash/hot.json', 'listVideos', '')
addDir("Police Chases - Hot", BASE+'/PoliceChases/.json', 'listVideos', '')
addDir("Cringe - Hot", BASE+'/cringe/.json', 'listVideos', '')
addDir("Popping - Hot", BASE+'/popping/.json', 'listVideos', '')
xbmcplugin.endOfDirectory(pluginhandle)
Edit: If anyone has any suggestions for the above list I will add them to this post for easy copy and paste.
Documentaries (added)
Cringe (added)
MusicVideos (added)
Popping (added, Oh gawd)
ObscureMedia (added)