Merge branch 'develop_newznab' of git://github.com/mano3m/CouchPotatoServer into mano3m-develop_newznab
This commit is contained in:
commit
a95320e162
3 files changed
+75
-44
No files matched your search
@@ -38,13 +38,20 @@ config = [{
|
|||||||
'default': '0,0,0,0,0,0',
|
'default': '0,0,0,0,0,0',
|
||||||
'description': 'Starting score for each release found via this provider.',
|
'description': 'Starting score for each release found via this provider.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'name': 'custom_tag',
|
||||||
|
'advanced': True,
|
||||||
|
'label': 'Custom tag',
|
||||||
|
'default': ',,,,,',
|
||||||
|
'description': 'Add custom tags, for example add rls=1 to get only scene releases from nzbs.org',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'name': 'api_key',
|
'name': 'api_key',
|
||||||
'default': ',,,,,',
|
'default': ',,,,,',
|
||||||
'label': 'Api Key',
|
'label': 'Api Key',
|
||||||
'description': 'Can be found on your profile page',
|
'description': 'Can be found on your profile page',
|
||||||
'type': 'combined',
|
'type': 'combined',
|
||||||
'combine': ['use', 'host', 'api_key', 'extra_score'],
|
'combine': ['use', 'host', 'api_key', 'extra_score', 'custom_tag'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class Newznab(NZBProvider, RSS):
|
|||||||
'imdbid': movie['library']['identifier'].replace('tt', ''),
|
'imdbid': movie['library']['identifier'].replace('tt', ''),
|
||||||
'apikey': host['api_key'],
|
'apikey': host['api_key'],
|
||||||
'extended': 1
|
'extended': 1
|
||||||
})
|
}) + ('&%s' % host['tag'] if host['tag'] else '')
|
||||||
url = '%s&%s' % (self.getUrl(host['host'], self.urls['search']), arguments)
|
url = '%s&%s' % (self.getUrl(host['host'], self.urls['search']), arguments)
|
||||||
|
|
||||||
nzbs = self.getRSSData(url, cache_timeout = 1800, headers = {'User-Agent': Env.getIdentifier()})
|
nzbs = self.getRSSData(url, cache_timeout = 1800, headers = {'User-Agent': Env.getIdentifier()})
|
||||||
@@ -100,6 +100,7 @@ class Newznab(NZBProvider, RSS):
|
|||||||
hosts = splitString(self.conf('host'), clean = False)
|
hosts = splitString(self.conf('host'), clean = False)
|
||||||
api_keys = splitString(self.conf('api_key'), clean = False)
|
api_keys = splitString(self.conf('api_key'), clean = False)
|
||||||
extra_score = splitString(self.conf('extra_score'), clean = False)
|
extra_score = splitString(self.conf('extra_score'), clean = False)
|
||||||
|
custom_tags = splitString(self.conf('custom_tag'), clean = False)
|
||||||
|
|
||||||
list = []
|
list = []
|
||||||
for nr in range(len(hosts)):
|
for nr in range(len(hosts)):
|
||||||
@@ -110,11 +111,18 @@ class Newznab(NZBProvider, RSS):
|
|||||||
try: host = hosts[nr]
|
try: host = hosts[nr]
|
||||||
except: host = ''
|
except: host = ''
|
||||||
|
|
||||||
|
try: score = tryInt(extra_score[nr])
|
||||||
|
except: score = 0
|
||||||
|
|
||||||
|
try: tag = custom_tags[nr]
|
||||||
|
except: tag = ''
|
||||||
|
|
||||||
list.append({
|
list.append({
|
||||||
'use': uses[nr],
|
'use': uses[nr],
|
||||||
'host': host,
|
'host': host,
|
||||||
'api_key': key,
|
'api_key': key,
|
||||||
'extra_score': tryInt(extra_score[nr]) if len(extra_score) > nr else 0
|
'extra_score': score,
|
||||||
|
'custom_tag': tag
|
||||||
})
|
})
|
||||||
|
|
||||||
return list
|
return list
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.page.settings {
|
.page.settings {
|
||||||
min-width: 960px;
|
min-width: 960px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page.settings:after {
|
.page.settings:after {
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
color: rgba(255, 255, 255, 0.8);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
.page.settings .tabs a:hover,
|
.page.settings .tabs a:hover,
|
||||||
.page.settings .tabs .active a {
|
.page.settings .tabs .active a {
|
||||||
background: rgb(78, 89, 105);
|
background: rgb(78, 89, 105);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Scan_folder { padding: 0 !important; }
|
.Scan_folder { padding: 0 !important; }
|
||||||
|
|
||||||
.page .ctrlHolder {
|
.page .ctrlHolder {
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
@@ -132,13 +132,13 @@
|
|||||||
.page .ctrlHolder .formHint {
|
.page .ctrlHolder .formHint {
|
||||||
width: 46%;
|
width: 46%;
|
||||||
margin: -18px 0;
|
margin: -18px 0;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 0 0 0 2%;
|
padding: 0 0 0 2%;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .check {
|
.page .check {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
@@ -165,28 +165,28 @@
|
|||||||
.page .enabler {
|
.page .enabler {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list {
|
.page .option_list {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .check {
|
.page .option_list .check {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler {
|
.page .option_list .enabler {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-left: 5px !important;
|
margin-left: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler:not(.disabled) {
|
.page .option_list .enabler:not(.disabled) {
|
||||||
margin: 0 0 0 30px;
|
margin: 0 0 0 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler:not(.disabled) .ctrlHolder:first-child {
|
.page .option_list .enabler:not(.disabled) .ctrlHolder:first-child {
|
||||||
margin: 10px 0 -33px 0;
|
margin: 10px 0 -33px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list h3 {
|
.page .option_list h3 {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 10px 5px 0;
|
margin: 10px 5px 0;
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
background: rgba(255,255,255,0.03);
|
background: rgba(255,255,255,0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler.disabled {
|
.page .option_list .enabler.disabled {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 3px 3px 3px 20px;
|
margin: 3px 3px 3px 20px;
|
||||||
@@ -205,14 +205,14 @@
|
|||||||
width: 173px;
|
width: 173px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler.disabled h2 {
|
.page .option_list .enabler.disabled h2 {
|
||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding: 0 10px 0 25px;
|
padding: 0 10px 0 25px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler:not(.disabled) h2 {
|
.page .option_list .enabler:not(.disabled) h2 {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .option_list .enabler.disabled h2 .hint {
|
.page .option_list .enabler.disabled h2 .hint {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
.page .directory_list li:hover {
|
.page .directory_list li:hover {
|
||||||
background-color: #515c68;
|
background-color: #515c68;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page .directory_list li.empty {
|
.page .directory_list li.empty {
|
||||||
background: none;
|
background: none;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@@ -526,7 +526,7 @@
|
|||||||
);
|
);
|
||||||
background-size: 65%;
|
background-size: 65%;
|
||||||
}
|
}
|
||||||
.page .tag_input .choice:hover .delete,
|
.page .tag_input .choice:hover .delete,
|
||||||
.page .tag_input .choice.selected .delete { display: inline-block; }
|
.page .tag_input .choice.selected .delete { display: inline-block; }
|
||||||
.page .tag_input .choice .delete:hover {
|
.page .tag_input .choice .delete:hover {
|
||||||
height: 14px;
|
height: 14px;
|
||||||
@@ -551,31 +551,23 @@
|
|||||||
.page .combined_table input.host { width: 140px; }
|
.page .combined_table input.host { width: 140px; }
|
||||||
.page .section_newznab .combined_table .head abbr.host { margin-right: 200px; }
|
.page .section_newznab .combined_table .head abbr.host { margin-right: 200px; }
|
||||||
.page .section_newznab .combined_table input.host { width: 220px; }
|
.page .section_newznab .combined_table input.host { width: 220px; }
|
||||||
|
|
||||||
.page .combined_table .head abbr.name { margin-right: 57px; }
|
.page .combined_table .head abbr.name { margin-right: 57px; }
|
||||||
.page .combined_table input.name { width: 120px; }
|
.page .combined_table input.name { width: 120px; }
|
||||||
.page .combined_table .head abbr.api_key { margin-right: 75px; }
|
.page .combined_table .head abbr.api_key { margin-right: 75px; }
|
||||||
|
|
||||||
.page .combined_table .head abbr.pass_key { margin-right: 71px; }
|
.page .combined_table .head abbr.pass_key { margin-right: 71px; }
|
||||||
.page .combined_table input.pass_key { width: 113px; }
|
.page .combined_table input.pass_key { width: 113px; }
|
||||||
|
|
||||||
.page .section_newznab .combined_table .head abbr.api_key { margin-right: 185px; }
|
.page .section_newznab .combined_table .head abbr.api_key { margin-right: 190px; }
|
||||||
.page .section_newznab .combined_table input.api_key { width: 223px; }
|
.page .section_newznab .combined_table input.api_key { width: 223px; }
|
||||||
|
|
||||||
.page .combined_table .seed_ratio,
|
.page .combined_table .head abbr.extra_score {
|
||||||
.page .combined_table .seed_time {
|
margin-right: 25px;
|
||||||
width: 70px;
|
display: none;
|
||||||
text-align: center;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
.page .combined_table .seed_time {
|
.page .combined_table input.extra_score {
|
||||||
margin-right: 10px;
|
width: 80px;
|
||||||
}
|
|
||||||
|
|
||||||
.page .combined_table .head .extra_score,
|
|
||||||
.page .combined_table .extra_score {
|
|
||||||
width: 70px;
|
|
||||||
text-align: center;
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.page.show_advanced .combined_table .head .extra_score,
|
.page.show_advanced .combined_table .head .extra_score,
|
||||||
@@ -583,6 +575,30 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page .combined_table .head abbr.custom_tag {
|
||||||
|
margin-right: 15px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.page .combined_table input.custom_tag {
|
||||||
|
width: 84px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.page.show_advanced .combined_table .head .custom_tag,
|
||||||
|
.page.show_advanced .combined_table .custom_tag {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.page .combined_table .seed_ratio,
|
||||||
|
.page .combined_table .seed_time {
|
||||||
|
width: 70px;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.page .combined_table .seed_time {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.page .combined_table .ctrlHolder {
|
.page .combined_table .ctrlHolder {
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
@@ -716,7 +732,7 @@
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active .group_imdb_automation:not(.disabled) {
|
.active .group_imdb_automation:not(.disabled) {
|
||||||
background: url('../images/imdb_watchlist.png') no-repeat right 50px;
|
background: url('../images/imdb_watchlist.png') no-repeat right 50px;
|
||||||
min-height: 210px;
|
min-height: 210px;
|
||||||
@@ -735,7 +751,7 @@
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip:hover > a {
|
.tooltip:hover > a {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
@@ -753,13 +769,13 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip.shown div {
|
.tooltip.shown div {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip div a {
|
.tooltip div a {
|
||||||
color: #5b9bd1;
|
color: #5b9bd1;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user