diff --git a/CONTROL/control b/CONTROL/control index 2bd02755..ed1bc65e 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.2.5-4 +Version: 1.2.5-5 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.18),lighttpd(>=1.4.35-2),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.7),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7) diff --git a/webif/html/browse/file.jim b/webif/html/browse/file.jim index b6a55392..3d5a4c3f 100755 --- a/webif/html/browse/file.jim +++ b/webif/html/browse/file.jim @@ -42,7 +42,9 @@ if {$type eq "ts"} { if {[llength $sdata]} { set sid [$sdata get seriesid] if {$sid} { - append series "/$sid" + append series " / " + append series " / DB:$sid" } } puts "[$ts epstr] - $epname ($series) diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index 5df566bb..61ec17ef 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -8,7 +8,7 @@ require ts.class pretty_size system.class settings.class escape browse.class \ set mroot [system mediaroot] set dir [cgi_get dir $mroot] -jqplugin contextMenu bar enadis blockui +jqplugin contextMenu bar enadis blockui dialogue jscss script.js style.css if {[system has tvdb]} { jscss tvdb/script.js tvdb/style.css } diff --git a/webif/html/browse/tvdb/banner.jim b/webif/html/browse/tvdb/banner.jim index 36d9cb81..5aa57cb2 100644 --- a/webif/html/browse/tvdb/banner.jim +++ b/webif/html/browse/tvdb/banner.jim @@ -5,7 +5,7 @@ require classdump if {[file exists "$dir/.tvdbseriesid"]} { set seriesid [string trim [file read "$dir/.tvdbseriesid"]] set tvdb_series [set v [tvdb series [file tail $dir] $seriesid]] - puts "
" + puts "
" if {[set banner [$v get banner]] ne ""} { puts " diff --git a/webif/html/browse/tvdb/script.js b/webif/html/browse/tvdb/script.js index d22647fe..15a62e1f 100644 --- a/webif/html/browse/tvdb/script.js +++ b/webif/html/browse/tvdb/script.js @@ -7,8 +7,7 @@ function select_episode() $('.tvdbresults').hide(); $('#tvdbresults_saving').show(); - $('#tvdbresults').dialog('option', 'position', { - my: "center", at: "center", of: window }); + $('#tvdbresults').diagrefresh(); $.get('tvdb/store.jim', { dir: dir, sid: sid }, function(data) { if (data <= 0) @@ -24,8 +23,7 @@ function select_episode() .on('click', function() { $('.tvdbresults').hide(); $('#tvdbresults_saving').show(); - $('#tvdbresults').dialog('option', 'position', { - my: "center", at: "center", of: window }); + $('#tvdbresults').diagrefresh(); $.get('tvdb/store.jim', { dir: dir, sid: sid, @@ -37,7 +35,8 @@ function select_episode() }); } -$('#tvdbsetseries').button().on('click', function() { +$('#tvdbsetseries').button().on('click', function(e) { + e.stopPropagation(); val = $('#tvdbseriesname').text(); if (!val) val = dir.split(/[\\/]/).pop(); @@ -78,9 +77,10 @@ $('#tvdbsetseries').button().on('click', function() { .on('click', select_episode); $('#tvdbresults_loading').slideUp('slow'); $('#tvdbresults_inner').show(); - $('#tvdbresults').dialog('option', - 'position', { - my: "center", at: "center", of: window }); + $('#tvdbresults').diagrefresh({ + width: $(window).width() - 100, + height: $(window).height() - 100 + }); }); } }, @@ -108,5 +108,13 @@ $('#tvdbsetseries').button().on('click', function() { }); }); +$('img.tvdbbannertop').hover( + function() { $(this).css('cursor', 'pointer'); }, + function() { $(this).css('cursor', 'auto'); } +).on('click', function() { + var sid = $(this).closest('div').attr('sid'); + window.open('http://thetvdb.com/?tab=series&id=' + sid, '_blank'); +}); + }); diff --git a/webif/html/browse/tvdb/search.jim b/webif/html/browse/tvdb/search.jim index 131a8f3e..b8d5aaed 100755 --- a/webif/html/browse/tvdb/search.jim +++ b/webif/html/browse/tvdb/search.jim @@ -13,7 +13,9 @@ foreach series [[tvdb] searchseries $term] { puts "
+ + $series(seriesname) diff --git a/webif/html/lib/jquery.plugin/dialogue/utils.js b/webif/html/lib/jquery.plugin/dialogue/utils.js new file mode 100755 index 00000000..65e7cd60 --- /dev/null +++ b/webif/html/lib/jquery.plugin/dialogue/utils.js @@ -0,0 +1,21 @@ +(function($) +{ + $.fn.diagrefresh = function(options) + { + var defaults = { + height: 'auto', + width: 'auto' + }; + + var settings = $.extend(defaults, options); + + return this.each(function() { + $(this) + .dialog('option', 'position', { + my: "center", at: "center", of: window + }) + .dialog('option', 'height', settings.height) + .dialog('option', 'width', settings.width); + }); + }; +})(jQuery); diff --git a/webif/lib/bin/tvdb b/webif/lib/bin/tvdb index f6f1ecc7..86213586 100755 Binary files a/webif/lib/bin/tvdb and b/webif/lib/bin/tvdb differ diff --git a/webif/lib/tvdb.class b/webif/lib/tvdb.class index 760bf083..2eded1d7 100644 --- a/webif/lib/tvdb.class +++ b/webif/lib/tvdb.class @@ -252,8 +252,10 @@ tvdb method wordcount {db words extra} { set ret [$db query { select episode_id from episode - where overview like '%%%s%%' %s - } $w $extra] + where overview like '%%%s%%' + or name like '%%%s%%' + %s + } $w $w $extra] foreach row $ret { #puts "  > FOUND: ($w)
" ladd _phrases $w @@ -340,3 +342,7 @@ proc {tvdb bannerurl} {banner} { return "http://$::tvdb::mirror/banners/$banner" } +proc {tvdb seriesurl} {seriesid} { + return "http://$::tvdb::mirror/?tab=series&id=$seriesid" +} +