]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WebUI: Add thetvdb search, icon buttons, DVR database search
authorProfYaffle <ian@sproink.co.uk>
Sun, 1 Nov 2015 09:45:27 +0000 (09:45 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 2 Nov 2015 19:19:56 +0000 (20:19 +0100)
src/webui/static/app/dvr.js
src/webui/static/app/epg.js
src/webui/static/app/ext.css
src/webui/static/icons/imdb.png [new file with mode: 0644]
src/webui/static/icons/thetvdb.png [new file with mode: 0644]

index 3de06541bf2d317c36f3d30ab81a828ba4dfb3ca..ae1b12d5704d9651c5de0d1ab116748f2272b961 100644 (file)
@@ -58,6 +58,30 @@ tvheadend.dvrDetails = function(uuid) {
         if (timerec_caption)
           content += '<div class="x-epg-meta"><div class="x-epg-prefix">' + _('Time Scheduler') + ':</div> ' + timerec_caption + '</div>';
 
+        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
         });
 
index 18f33fb4101ab05d9fd7a74c7a5eb7457d2e1097..8b175006402a5ae558fac3fc06fb5edd209e09f9 100644 (file)
@@ -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)
index eb9d083e07b95b53f01c0579a2fbbd6f531d55a2..7b21936520d6b002c6162bb440347439cbc229dd 100644 (file)
     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 (file)
index 0000000..6c4424f
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 (file)
index 0000000..8b78550
Binary files /dev/null and b/src/webui/static/icons/thetvdb.png differ