Add ratio and seed time styling
This commit is contained in:
@@ -43,15 +43,13 @@ config = [{
|
||||
{
|
||||
'name': 'seed_ratio',
|
||||
'label': 'Seed ratio',
|
||||
'type': 'float',
|
||||
'default': 1,
|
||||
'default': '1',
|
||||
'description': 'Will not be (re)moved until this seed ratio is met.',
|
||||
},
|
||||
{
|
||||
'name': 'seed_time',
|
||||
'label': 'Seed time',
|
||||
'type': 'int',
|
||||
'default': 40,
|
||||
'default': '40',
|
||||
'description': 'Will not be (re)moved until this seed time (in hours) is met.',
|
||||
},
|
||||
{
|
||||
@@ -60,7 +58,7 @@ config = [{
|
||||
'label': 'Pass Key',
|
||||
'description': 'Can be found on your profile page',
|
||||
'type': 'combined',
|
||||
'combine': ['use', 'host', 'pass_key', 'name', 'extra_score'],
|
||||
'combine': ['use', 'host', 'pass_key', 'name', 'seed_ratio', 'seed_time', 'extra_score'],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from couchpotato.core.helpers.encoding import tryUrlencode, toUnicode
|
||||
from couchpotato.core.helpers.variable import splitString, tryInt
|
||||
from couchpotato.core.helpers.variable import splitString, tryInt, tryFloat
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.providers.base import ResultList
|
||||
from couchpotato.core.providers.torrent.base import TorrentProvider
|
||||
@@ -58,6 +58,8 @@ class TorrentPotato(TorrentProvider):
|
||||
'score': host['extra_score'],
|
||||
'seeders': torrent.get('seeders'),
|
||||
'leechers': torrent.get('leechers'),
|
||||
'seed_ratio': host['seed_ratio'],
|
||||
'seed_time': host['seed_time'],
|
||||
})
|
||||
|
||||
except:
|
||||
@@ -95,8 +97,8 @@ class TorrentPotato(TorrentProvider):
|
||||
'use': uses[nr],
|
||||
'host': host,
|
||||
'name': name,
|
||||
'seed_ratio': ratio,
|
||||
'seed_time': seed_time,
|
||||
'seed_ratio': tryFloat(ratio),
|
||||
'seed_time': tryInt(seed_time),
|
||||
'pass_key': key,
|
||||
'extra_score': tryInt(extra_score[nr]) if len(extra_score) > nr else 0
|
||||
})
|
||||
|
||||
@@ -545,28 +545,30 @@
|
||||
.page .combined_table .head abbr:first-child {
|
||||
display: none;
|
||||
}
|
||||
.page .combined_table .head abbr.host {
|
||||
margin-right: 195px;
|
||||
.page .combined_table .head abbr.host { margin-right: 120px; }
|
||||
.page .combined_table input.host { width: 140px; }
|
||||
.page .section_newznab .combined_table .head abbr.host { margin-right: 200px; }
|
||||
.page .section_newznab .combined_table input.host { width: 220px; }
|
||||
|
||||
.page .combined_table .head abbr.name { margin-right: 57px; }
|
||||
.page .combined_table input.name { width: 120px; }
|
||||
.page .combined_table .head abbr.api_key { margin-right: 75px; }
|
||||
|
||||
.page .combined_table .head abbr.pass_key { margin-right: 71px; }
|
||||
.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 input.api_key { width: 223px; }
|
||||
|
||||
.page .combined_table .seed_ratio,
|
||||
.page .combined_table .seed_time {
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.page .combined_table input.host {
|
||||
width: 215px;
|
||||
}
|
||||
.page .combined_table .head abbr.name {
|
||||
margin-right: 67px;
|
||||
.page .combined_table .seed_time {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.page .combined_table input.name {
|
||||
width: 120px;
|
||||
}
|
||||
.page .combined_table .head abbr.api_key {
|
||||
margin-right: 178px;
|
||||
}
|
||||
.page .combined_table .head abbr.pass_key {
|
||||
margin-right: 171px;
|
||||
}
|
||||
.page .combined_table input.api_key,
|
||||
.page .combined_table input.pass_key {
|
||||
width: 213px;
|
||||
}
|
||||
|
||||
.page .combined_table .head .extra_score,
|
||||
.page .combined_table .extra_score {
|
||||
|
||||
Reference in New Issue
Block a user