[RELEASE ]Reddit /r/video plugin
#30
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:
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 intentionalSmile 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)
Reply


Messages In This Thread
[RELEASE] Reddit /r/video plugin - by BlueCop - 2011-11-12, 00:13
[No subject] - by maruchan - 2011-11-12, 01:08
[No subject] - by BlueCop - 2011-11-12, 13:11
[No subject] - by Fofer - 2011-11-13, 19:48
[No subject] - by BlueCop - 2011-11-13, 22:12
[No subject] - by PatrickBateman - 2011-11-15, 11:08
[No subject] - by BlueCop - 2011-11-15, 12:17
[No subject] - by PatrickBateman - 2011-11-15, 17:32
[No subject] - by maruchan - 2011-11-15, 17:33
[No subject] - by sloppymcnubble - 2011-11-16, 07:59
[No subject] - by Sranshaft - 2011-11-19, 00:11
[No subject] - by BlueCop - 2011-11-19, 00:51
[No subject] - by PatrickBateman - 2011-11-19, 04:06
[No subject] - by Sranshaft - 2011-11-19, 09:24
RE: [RELEASE ]Reddit /r/video plugin - by PyroTech76 - 2012-11-09, 16:17
Logout Mark Read Team Forum Stats Members Help
[RELEASE ]Reddit /r/video plugin1