Group providers together

This commit is contained in:
Ruud
2013-01-20 20:50:50 +01:00
parent f41fc794c1
commit faaf351662
54 changed files with 253 additions and 22 deletions
+13
View File
@@ -0,0 +1,13 @@
config = {
'name': 'download_providers',
'groups': [
{
'label': 'Downloaders',
'description': 'You can select different downloaders for each type (usenet / torrent)',
'type': 'list',
'name': 'download_providers',
'tab': 'downloaders',
'options': [],
},
],
}
@@ -10,6 +10,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'blackhole',
'label': 'Black hole',
'description': 'Download the NZB/Torrent to a specific folder.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'nzbget',
'label': 'NZBGet',
'description': 'Use <a href="http://nzbget.sourceforge.net/Main_Page" target="_blank">NZBGet</a> to download NZBs.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'nzbvortex',
'label': 'NZBVortex',
'description': 'Use <a href="http://www.nzbvortex.com/landing/" target="_blank">NZBVortex</a> to download NZBs.',
@@ -9,6 +9,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'pneumatic',
'label': 'Pneumatic',
'description': 'Use <a href="http://forum.xbmc.org/showthread.php?tid=97657" target="_blank">Pneumatic</a> to download .strm files.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'sabnzbd',
'label': 'Sabnzbd',
'description': 'Use <a href="http://sabnzbd.org/" target="_blank">SABnzbd</a> to download NZBs.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'synology',
'label': 'Synology',
'description': 'Use <a href="http://www.synology.com/dsm/home_home_applications_download_station.php" target="_blank">Synology Download Station</a> to download.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'transmission',
'label': 'Transmission',
'description': 'Use <a href="http://www.transmissionbt.com/" target="_blank">Transmission</a> to download torrents.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'utorrent',
'label': 'uTorrent',
'description': 'Use <a href="http://www.utorrent.com/" target="_blank">uTorrent</a> to download torrents.',
+12
View File
@@ -67,6 +67,18 @@ class Loader(object):
def addFromDir(self, plugin_type, priority, module, dir_name):
# Load dir module
try:
m = __import__(module)
splitted = module.split('.')
for sub in splitted[1:]:
m = getattr(m, sub)
if hasattr(m, 'config'):
fireEvent('settings.options', splitted[-1] + '_config', getattr(m, 'config'))
except:
raise
for cur_file in glob.glob(os.path.join(dir_name, '*')):
name = os.path.basename(cur_file)
if os.path.isdir(os.path.join(dir_name, name)):
@@ -0,0 +1,13 @@
config = {
'name': 'notification_providers',
'groups': [
{
'label': 'Notifications',
'description': 'Notify when movies are done or snatched',
'type': 'list',
'name': 'notification_providers',
'tab': 'notifications',
'options': [],
},
],
}
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'boxcar',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'email',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'growl',
'description': 'Version 1.4+',
'options': [
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'nmj',
'label': 'NMJ',
'options': [
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'notifo',
'description': 'Keep in mind that Notifo service will end soon.',
'options': [
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'notifymyandroid',
'label': 'Notify My Android',
'options': [
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'notifymywp',
'label': 'Notify My Windows Phone',
'options': [
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'plex',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'prowl',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'pushover',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'synoindex',
'description': 'Automaticly adds index to Synology Media Server.',
'options': [
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'toasty',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'twitter',
'options': [
{
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'xbmc',
'label': 'XBMC',
'description': 'v11 (Eden) and v12 (Frodo)',
@@ -0,0 +1,21 @@
config = {
'name': 'automation_providers',
'groups': [
{
'label': 'Watchlists',
'description': 'Check watchlists for new movies',
'type': 'list',
'name': 'watchlist_providers',
'tab': 'automation',
'options': [],
},
{
'label': 'Automated',
'description': 'Uses minimal requirements',
'type': 'list',
'name': 'automation_providers',
'tab': 'automation',
'options': [],
},
],
}
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'automation_providers',
'name': 'bluray_automation',
'label': 'Blu-ray.com',
'description': 'Imports movies from blu-ray.com. (uses minimal requirements)',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'watchlist_providers',
'name': 'imdb_automation',
'label': 'IMDB',
'description': 'From any <strong>public</strong> IMDB watchlists. Url should be the RSS link.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'automation_providers',
'name': 'itunes_automation',
'label': 'iTunes',
'description': 'From any <a href="http://itunes.apple.com/rss">iTunes</a> Store feed. Url should be the RSS link. (uses minimal requirements)',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'automation_providers',
'name': 'kinepolis_automation',
'label': 'Kinepolis',
'description': 'Imports movies from the current top 10 of kinepolis. (uses minimal requirements)',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'automation_providers',
'name': 'moviemeter_automation',
'label': 'Moviemeter',
'description': 'Imports movies from the current top 10 of moviemeter.nl. (uses minimal requirements)',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'watchlist_providers',
'name': 'moviesio',
'label': 'Movies.IO',
'description': 'Imports movies from <a href="http://movies.io">Movies.io</a> RSS watchlists',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'automation_providers',
'name': 'rottentomatoes_automation',
'label': 'Rottentomatoes',
'description': 'Imports movies from the rottentomatoes "in theaters"-feed.',
@@ -8,6 +8,7 @@ config = [{
'groups': [
{
'tab': 'automation',
'list': 'watchlist_providers',
'name': 'trakt_automation',
'label': 'Trakt',
'description': 'import movies from your own watchlist',
@@ -0,0 +1,14 @@
config = {
'name': 'nzb_providers',
'groups': [
{
'label': 'Usenet',
'description': 'Providers searching usenet for new releases',
'type': 'list',
'name': 'nzb_providers',
'tab': 'searcher',
'subtab': 'providers',
'options': [],
},
],
}
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'binsearch',
'description': 'Free provider, less accurate. See <a href="https://www.binsearch.info/">BinSearch</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'FTDWorld',
'description': 'Free provider, less accurate. See <a href="http://ftdworld.net">FTDWorld</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'newznab',
'order': 10,
'description': 'Enable <a href="http://newznab.com/" target="_blank">NewzNab providers</a> such as <a href="https://nzb.su" target="_blank">NZB.su</a>, \
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'NZBClub',
'description': 'Free provider, less accurate. See <a href="https://www.nzbclub.com/">NZBClub</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'nzbindex',
'description': 'Free provider, less accurate. See <a href="https://www.nzbindex.com/">NZBIndex</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'nzbsrus',
'label': 'Nzbsrus',
'description': 'See <a href="https://www.nzbsrus.com/">NZBsRus</a>',
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'nzbX',
'description': 'Free provider. See <a href="https://www.nzbx.co/">nzbX</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'subtab': 'providers',
'list': 'nzb_providers',
'name': 'OMGWTFNZBs',
'description': 'See <a href="http://omgwtfnzbs.org/">OMGWTFNZBs</a>',
'options': [
@@ -0,0 +1,14 @@
config = {
'name': 'torrent_providers',
'groups': [
{
'label': 'Torrent',
'description': 'Providers searching torrent sites for new releases',
'type': 'list',
'name': 'torrent_providers',
'tab': 'searcher',
'subtab': 'providers',
'options': [],
},
],
}
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'KickAssTorrents',
'description': 'See <a href="https://kat.ph/">KickAssTorrents</a>',
'wizard': True,
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'PassThePopcorn',
'description': 'See <a href="https://passthepopcorn.me">PassThePopcorn.me</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'PublicHD',
'description': 'Public Torrent site with only HD content. See <a href="https://publichd.se/">PublicHD</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'SceneAccess',
'description': 'See <a href="https://sceneaccess.eu/">SceneAccess</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'SceneHD',
'description': 'See <a href="https://scenehd.org">SceneHD</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'ThePirateBay',
'description': 'The world\'s largest bittorrent tracker. See <a href="http://fucktimkuik.org/">ThePirateBay</a>',
'wizard': True,
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'TorrentDay',
'description': 'See <a href="http://www.td.af/">TorrentDay</a>',
'options': [
@@ -8,7 +8,8 @@ config = [{
'groups': [
{
'tab': 'searcher',
'subtab': 'torrent_providers',
'subtab': 'providers',
'list': 'torrent_providers',
'name': 'TorrentLeech',
'description': 'See <a href="http://torrentleech.org">TorrentLeech</a>',
'options': [
+32 -5
View File
@@ -7,6 +7,7 @@ Page.Settings = new Class({
wizard_only: false,
tabs: {},
lists: {},
current: 'about',
has_tab: false,
@@ -178,12 +179,24 @@ Page.Settings = new Class({
var content_container = self.tabs[group.tab].subtabs[group.subtab].content
}
if(group.list && !self.lists[group.list]){
self.lists[group.list] = self.createList(content_container);
}
// Create the group
if(!self.tabs[group.tab].groups[group.name]){
var group_el = self.createGroup(group)
.inject(content_container)
.inject(group.list ? self.lists[group.list] : content_container)
.addClass('section_'+section_name);
self.tabs[group.tab].groups[group.name] = group_el
self.tabs[group.tab].groups[group.name] = group_el;
}
// Create list if needed
if(group.type && group.type == 'list'){
if(!self.lists[group.name])
self.lists[group.name] = self.createList(content_container);
else
self.lists[group.name].inject(self.tabs[group.tab].groups[group.name]);
}
// Add options to group
@@ -283,6 +296,14 @@ Page.Settings = new Class({
)
return group_el
},
createList: function(content_container){
return new Element('div.option_list').grab(
new Element('h3', {
'text': 'Enable more providers'
})
).inject(content_container)
}
});
@@ -550,15 +571,21 @@ Option.Enabler = new Class({
},
checkState: function(){
var self = this;
var self = this,
enabled = self.getValue();
self.parentFieldset[ enabled ? 'removeClass' : 'addClass']('disabled');
if(self.parentList)
self.parentFieldset.inject(self.parentList.getElement('h3'), enabled ? 'before' : 'after');
self.parentFieldset[ self.getValue() ? 'removeClass' : 'addClass']('disabled');
},
afterInject: function(){
var self = this;
self.parentFieldset = self.el.getParent('fieldset')
self.parentFieldset = self.el.getParent('fieldset').addClass('enabler')
self.parentList = self.parentFieldset.getParent('.option_list');
self.el.inject(self.parentFieldset, 'top')
self.checkState()
}
+72 -1
View File
@@ -92,6 +92,10 @@
font-size: 12px;
margin-left: 10px;
}
.page fieldset h2 .hint a {
margin: 0 !important;
padding: 0;
}
.page fieldset.disabled .ctrlHolder {
display: none;
@@ -102,7 +106,7 @@
width: auto;
margin: 0;
position: relative;
margin-bottom: -25px;
margin-bottom: -23px;
border: none;
width: 20px;
}
@@ -148,6 +152,73 @@
}
.page .xsmall { width: 20px !important; text-align: center; }
.page .enabler {
display: block;
}
.page .option_list {
margin-bottom: 20px;
}
.page .option_list .enabler {
padding: 0;
}
.page .option_list .enabler:not(.disabled) {
margin: 0 0 0 30px;
}
.page .option_list .enabler:not(.disabled) .ctrlHolder:first-child {
margin: 10px 0 -33px 0;
}
.page .option_list h3 {
padding: 0;
margin: 10px 0 0 0;
text-align: center;
font-weight: normal;
text-shadow: none;
text-transform: uppercase;
font-size: 12px;
background: rgba(255,255,255,0.03);
}
.page .option_list .enabler.disabled {
display: inline-block;
margin: 3px 3px 3px 20px;
padding: 4px 0;
width: 159px;
vertical-align: top;
}
.page .option_list .enabler.disabled h2 {
border: none;
box-shadow: none;
padding: 0 10px 0 25px;
font-size: 16px;
}
.page .option_list .enabler:not(.disabled) h2 {
font-size: 16px;
font-weight: bold;
border: none;
border-top: 1px solid rgba(255,255,255, 0.15);
box-shadow: 0 -1px 0px #333;
margin: 0;
padding: 10px 0 5px 25px;
}
.page .option_list .enabler:not(.disabled):first-child h2 {
border: none;
box-shadow: none;
}
.page .option_list .enabler.disabled h2 .hint {
display: none;
}
.page .option_list .enabler h2 .hint {
font-weight: normal;
}
.page input[type=text], .page input[type=password] {
padding: 5px 3px;