From: ProfYaffle Date: Sun, 1 Nov 2015 09:45:27 +0000 (+0000) Subject: WebUI: Add thetvdb search, icon buttons, DVR database search X-Git-Tag: v4.2.1~1694 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0061c242bea7a4a25f00246b0e3c3323ca39f854;p=thirdparty%2Ftvheadend.git WebUI: Add thetvdb search, icon buttons, DVR database search --- diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index 3de06541b..ae1b12d57 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -58,6 +58,30 @@ tvheadend.dvrDetails = function(uuid) { if (timerec_caption) content += '
' + _('Time Scheduler') + ':
' + timerec_caption + '
'; + var buttons = []; + + buttons.push(new Ext.Button({ + handler: searchIMDB, + iconCls: 'imdb', + tooltip: _('Search IMDB (for title)'), + })); + + buttons.push(new Ext.Button({ + handler:searchTheTVDB, + iconCls:'thetvdb', + tooltip:_('Search TheTVDB (for title)'), + })); + + function searchIMDB() { + window.open('http://akas.imdb.com/find?q=' + + encodeURIComponent(title), '_blank'); + } + + function searchTheTVDB(){ + window.open('http://thetvdb.com/?string='+ + encodeURIComponent(title)+'&searchseriesid=&tab=listseries&function=Search','_blank'); + } + var win = new Ext.Window({ title: title, iconCls: 'info', @@ -66,6 +90,7 @@ tvheadend.dvrDetails = function(uuid) { height: 450, constrainHeader: true, buttonAlign: 'center', + buttons: buttons, html: content }); diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 18f33fb41..8b1750064 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -140,15 +140,19 @@ tvheadend.epgDetails = function(event) { var recording = event.dvrState.indexOf('recording') === 0; var scheduled = event.dvrState.indexOf('scheduled') === 0; - if (!recording && !scheduled) { - buttons.push(new Ext.Button({ - disabled: !event.title, - handler: searchIMDB, - iconCls: 'find', - tooltip: _('Search IMDB (for title)'), - text: _("Search IMDB") - })); - } + buttons.push(new Ext.Button({ + disabled: !event.title, + handler: searchIMDB, + iconCls: 'find', + tooltip: _('Search IMDB (for title)'), + })); + + buttons.push(new Ext.Button({ + disabled:!event.title, + handler:searchTheTVDB, + iconCls:'thetvdb', + tooltip:_('Search TheTVDB (for title)'), + })); buttons.push(new Ext.Button({ disabled: event.start > now || event.stop < now, @@ -234,7 +238,7 @@ tvheadend.epgDetails = function(event) { title: _('Broadcast Details'), iconCls: 'broadcast_details', layout: 'fit', - width: 650, + width: 675, height: 450, constrainHeader: true, buttons: buttons, @@ -249,6 +253,11 @@ tvheadend.epgDetails = function(event) { encodeURIComponent(event.title), '_blank'); } + function searchTheTVDB(){ + window.open('http://thetvdb.com/?string='+ + encodeURIComponent(event.title)+'&searchseriesid=&tab=listseries&function=Search','_blank'); + } + function playProgram() { var title = event.title; if (event.episodeOnscreen) diff --git a/src/webui/static/app/ext.css b/src/webui/static/app/ext.css index eb9d083e0..7b2193652 100644 --- a/src/webui/static/app/ext.css +++ b/src/webui/static/app/ext.css @@ -168,6 +168,14 @@ background-image: url(../icons/find.png) !important; } +.imdb { + background-image: url(../icons/imdb.png) !important; +} + +.thetvdb { + background-image: url(../icons/thetvdb.png) !important; +} + .add { background-image: url(../icons/add.png) !important; } diff --git a/src/webui/static/icons/imdb.png b/src/webui/static/icons/imdb.png new file mode 100644 index 000000000..6c4424fd8 Binary files /dev/null and b/src/webui/static/icons/imdb.png differ diff --git a/src/webui/static/icons/thetvdb.png b/src/webui/static/icons/thetvdb.png new file mode 100644 index 000000000..8b785502d Binary files /dev/null and b/src/webui/static/icons/thetvdb.png differ