qweboobcfg: display website of backend in description in any
This commit is contained in:
parent
693123a702
commit
31445de767
3 changed files with 9 additions and 2 deletions
|
|
@ -26,8 +26,6 @@ __all__ = ['GazelleBrowser']
|
|||
|
||||
|
||||
class GazelleBrowser(BaseBrowser):
|
||||
DOMAIN = 'ssl.what.cd'
|
||||
PROTOCOL = 'https'
|
||||
PAGES = {'https?://%s/?(index.php)?': IndexPage,
|
||||
'https?://%s/login.php': LoginPage,
|
||||
'https?://%s/torrents.php.*': TorrentsPage,
|
||||
|
|
|
|||
|
|
@ -67,6 +67,13 @@ class Backend(object):
|
|||
def config(self):
|
||||
return self.klass.CONFIG
|
||||
|
||||
@property
|
||||
def website(self):
|
||||
if self.klass.BROWSER and self.klass.BROWSER.DOMAIN:
|
||||
return '%s://%s' % (self.klass.BROWSER.PROTOCOL, self.klass.BROWSER.DOMAIN)
|
||||
else:
|
||||
return None
|
||||
|
||||
@property
|
||||
def icon_path(self):
|
||||
if self.klass.ICON is None:
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ class BackendCfg(QDialog):
|
|||
'<b>Version</b>: %s<br />'
|
||||
'<b>Maintainer</b>: %s<br />'
|
||||
'<b>License</b>: %s<br />'
|
||||
'%s'
|
||||
'<b>Description</b>: %s<br />'
|
||||
'<b>Capabilities</b>: %s<br />'))
|
||||
% ('<img src="mydata://logo.png" />' if backend.icon_path else '',
|
||||
|
|
@ -279,6 +280,7 @@ class BackendCfg(QDialog):
|
|||
backend.version,
|
||||
backend.maintainer.replace('&', '&').replace('<', '<').replace('>', '>'),
|
||||
backend.license,
|
||||
('<b>Website</b>: %s<br />' % backend.website) if backend.website else '',
|
||||
backend.description,
|
||||
', '.join([cap.__name__ for cap in backend.iter_caps()])))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue