From b373ccb3dc69f51108730c15eaeb1821aac380fb Mon Sep 17 00:00:00 2001 From: hummypkg Date: Mon, 2 Nov 2015 23:17:11 +0000 Subject: [PATCH] tvdb improvements git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2533 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/html/browse/file.jim | 4 ++- webif/html/browse/index.jim | 2 +- webif/html/browse/tvdb/banner.jim | 2 +- webif/html/browse/tvdb/script.js | 24 ++++++++++++------ webif/html/browse/tvdb/search.jim | 2 ++ .../html/lib/jquery.plugin/dialogue/utils.js | 21 +++++++++++++++ webif/lib/bin/tvdb | Bin 13100 -> 13692 bytes webif/lib/tvdb.class | 10 ++++++-- 9 files changed, 53 insertions(+), 14 deletions(-) create mode 100755 webif/html/lib/jquery.plugin/dialogue/utils.js diff --git a/CONTROL/control b/CONTROL/control index 2bd0275..ed1bc65 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 b6a5539..3d5a4c3 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 5df566b..61ec17e 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 36d9cb8..5aa57cb 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 d22647f..15a62e1 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 131a8f3..b8d5aae 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 0000000..65e7cd6 --- /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 f6f1ecc73f3dd29676326a54fd72079eaaecccdd..8621358696cb71684bf5a06926cb4ac7c9896bc5 100755 GIT binary patch delta 2700 zcmaJ@ZERE589w*=gV=HCwIN@&<6QgRlv`rav;9fQtuS(xYa?zv(M}*t{(_v0=D?a@Ag=NNasR~!v{naMOA1W4m z5t9I`W9z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)Y#+=lcX`&Muca4FIhJmXLj9E0ZxER?j;~y}Z zP;k$A1S7xT 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" +} +