diff options
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | css/styles.css | 40 | ||||
-rw-r--r-- | doc/ChangeLog | 10 | ||||
-rw-r--r-- | images/Makefile | 58 | ||||
-rw-r--r-- | javascript/treeview.js | 4 | ||||
-rw-r--r-- | live.cpp | 7 | ||||
-rw-r--r-- | live/img/active.png (renamed from images/active.png) | bin | 854 -> 854 bytes | |||
-rw-r--r-- | live/img/arrow.png (renamed from images/arrow.png) | bin | 419 -> 419 bytes | |||
-rw-r--r-- | live/img/arrow_rec.gif (renamed from images/arrow_rec.gif) | bin | 2962 -> 2962 bytes | |||
-rw-r--r-- | live/img/bg_box_h.png (renamed from images/bg_box_h.png) | bin | 126 -> 126 bytes | |||
-rw-r--r-- | live/img/bg_box_l.png (renamed from images/bg_box_l.png) | bin | 163 -> 163 bytes | |||
-rw-r--r-- | live/img/bg_box_r.png (renamed from images/bg_box_r.png) | bin | 160 -> 160 bytes | |||
-rw-r--r-- | live/img/bg_header_h.png (renamed from images/bg_header_h.png) | bin | 131 -> 131 bytes | |||
-rw-r--r-- | live/img/bg_header_l.png (renamed from images/bg_header_l.png) | bin | 182 -> 182 bytes | |||
-rw-r--r-- | live/img/bg_header_r.png (renamed from images/bg_header_r.png) | bin | 190 -> 190 bytes | |||
-rw-r--r-- | live/img/bg_line.png (renamed from images/bg_line.png) | bin | 144 -> 144 bytes | |||
-rw-r--r-- | live/img/bg_line_top.png (renamed from images/bg_line_top.png) | bin | 90 -> 90 bytes | |||
-rw-r--r-- | live/img/bg_tools.png (renamed from images/bg_tools.png) | bin | 151 -> 151 bytes | |||
-rw-r--r-- | live/img/button_blue.png (renamed from images/button_blue.png) | bin | 406 -> 406 bytes | |||
-rw-r--r-- | live/img/button_green.png (renamed from images/button_green.png) | bin | 452 -> 452 bytes | |||
-rw-r--r-- | live/img/button_new.png (renamed from images/button_new.png) | bin | 931 -> 931 bytes | |||
-rw-r--r-- | live/img/button_red.png (renamed from images/button_red.png) | bin | 463 -> 463 bytes | |||
-rw-r--r-- | live/img/button_yellow.png (renamed from images/button_yellow.png) | bin | 411 -> 411 bytes | |||
-rw-r--r-- | live/img/close.png (renamed from images/close.png) | bin | 575 -> 575 bytes | |||
-rw-r--r-- | live/img/del.png (renamed from images/del.png) | bin | 832 -> 832 bytes | |||
-rw-r--r-- | live/img/edit.png (renamed from images/edit.png) | bin | 809 -> 809 bytes | |||
-rw-r--r-- | live/img/favicon.ico (renamed from images/favicon.ico) | bin | 3638 -> 3638 bytes | |||
-rw-r--r-- | live/img/ffw.png (renamed from images/ffw.png) | bin | 852 -> 852 bytes | |||
-rw-r--r-- | live/img/file.png (renamed from images/file.png) | bin | 644 -> 644 bytes | |||
-rw-r--r-- | live/img/folder_closed.png (renamed from images/folder_closed.png) | bin | 625 -> 625 bytes | |||
-rw-r--r-- | live/img/folder_open.png (renamed from images/folder_open.png) | bin | 762 -> 762 bytes | |||
-rw-r--r-- | live/img/help.png (renamed from images/help.png) | bin | 818 -> 818 bytes | |||
-rw-r--r-- | live/img/imdb.png (renamed from images/imdb.png) | bin | 958 -> 958 bytes | |||
-rw-r--r-- | live/img/inactive.png (renamed from images/inactive.png) | bin | 805 -> 805 bytes | |||
-rw-r--r-- | live/img/logo.png (renamed from images/logo.png) | bin | 14040 -> 14040 bytes | |||
-rw-r--r-- | live/img/logo_login.png (renamed from images/logo_login.png) | bin | 33390 -> 33390 bytes | |||
-rw-r--r-- | live/img/menu_line_bg.png (renamed from images/menu_line_bg.png) | bin | 185 -> 185 bytes | |||
-rw-r--r-- | live/img/minus.png (renamed from images/minus.png) | bin | 472 -> 472 bytes | |||
-rw-r--r-- | live/img/movie.png (renamed from images/movie.png) | bin | 778 -> 778 bytes | |||
-rw-r--r-- | live/img/on_dvd.png (renamed from images/on_dvd.png) | bin | 821 -> 821 bytes | |||
-rw-r--r-- | live/img/one_downarrow.png (renamed from images/one_downarrow.png) | bin | 808 -> 808 bytes | |||
-rw-r--r-- | live/img/one_uparrow.png (renamed from images/one_uparrow.png) | bin | 781 -> 781 bytes | |||
-rw-r--r-- | live/img/pause.png (renamed from images/pause.png) | bin | 748 -> 748 bytes | |||
-rw-r--r-- | live/img/play.png (renamed from images/play.png) | bin | 820 -> 820 bytes | |||
-rw-r--r-- | live/img/plus.png (renamed from images/plus.png) | bin | 480 -> 480 bytes | |||
-rw-r--r-- | live/img/record.png (renamed from images/record.png) | bin | 815 -> 815 bytes | |||
-rw-r--r-- | live/img/record_timer.png (renamed from images/record_timer.png) | bin | 833 -> 833 bytes | |||
-rw-r--r-- | live/img/reload.png (renamed from images/reload.png) | bin | 713 -> 713 bytes | |||
-rw-r--r-- | live/img/remotecontrol.jpg (renamed from images/remotecontrol.jpg) | bin | 19596 -> 19596 bytes | |||
-rw-r--r-- | live/img/rwd.png (renamed from images/rwd.png) | bin | 863 -> 863 bytes | |||
-rw-r--r-- | live/img/search.png (renamed from images/search.png) | bin | 940 -> 940 bytes | |||
-rw-r--r-- | live/img/stop.png (renamed from images/stop.png) | bin | 713 -> 713 bytes | |||
-rw-r--r-- | live/img/stop_update.png (renamed from images/stop_update.png) | bin | 748 -> 748 bytes | |||
-rw-r--r-- | live/img/transparent.png (renamed from images/transparent.png) | bin | 70 -> 70 bytes | |||
-rw-r--r-- | live/img/tv.jpg (renamed from images/tv.jpg) | bin | 48098 -> 48098 bytes | |||
-rw-r--r-- | live/img/zap.png (renamed from images/zap.png) | bin | 551 -> 551 bytes | |||
-rw-r--r-- | live/js/live/pageenhance.js | 14 | ||||
-rw-r--r-- | live/js/live/vdr_status.js | 2 | ||||
-rw-r--r-- | pages/pageelems.ecpp | 3 | ||||
-rw-r--r-- | pages/recordings.ecpp | 6 | ||||
-rw-r--r-- | pages/searchtimers.ecpp | 2 | ||||
-rw-r--r-- | pages/timers.ecpp | 8 | ||||
-rw-r--r-- | preload.cpp | 116 | ||||
-rw-r--r-- | preload.h | 11 | ||||
-rw-r--r-- | tntconfig.cpp | 12 |
65 files changed, 195 insertions, 107 deletions
@@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.49 2007/09/02 18:42:07 winni Exp $ +# $Id: Makefile,v 1.50 2007/09/17 22:23:40 tadi Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -57,16 +57,15 @@ export DEFINES LIBS += httpd/libhttpd.a -SUBDIRS = httpd pages css images javascript +SUBDIRS = httpd pages css javascript ### The object files (add further files here): PLUGINOBJS = $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o timers.o \ tools.o recordings.o tasks.o status.o epg_events.o epgsearch.o \ - grab.o md5.o filecache.o livefeatures.o + grab.o md5.o filecache.o livefeatures.o preload.o -WEBLIBS = pages/libpages.a css/libcss.a images/libimages.a \ - javascript/libjavascript.a +WEBLIBS = pages/libpages.a css/libcss.a javascript/libjavascript.a ### Default rules: diff --git a/css/styles.css b/css/styles.css index 9bc25ea..0043e22 100644 --- a/css/styles.css +++ b/css/styles.css @@ -328,7 +328,7 @@ div.info-win { .info-win .info-win-top .info-win-c .info-win-b .close { width: 16px; height: 16px; - background: transparent url(close.png) no-repeat top right; + background: transparent url(img/close.png) no-repeat top right; } .info-win .info-win-top .info-win-c .info-win-b .close:hover { @@ -371,7 +371,7 @@ div.info-win { */ div.menu { - background: #000057 url(menu_line_bg.png) repeat-x; + background: #000057 url(img/menu_line_bg.png) repeat-x; min-height: 27px; margin: 0; padding: 0 0 0 10px; @@ -408,12 +408,12 @@ div.inhalt { div.pagemenu { margin-top: 2px; padding-top: 6px; - background: #FFFFFF url(bg_line.png) top repeat-x; + background: #FFFFFF url(img/bg_line.png) top repeat-x; } div.pagemenu div { /* padding-bottom: 6px; */ - background: #FFFFFF url(bg_line_top.png) bottom repeat-x; + background: #FFFFFF url(img/bg_line_top.png) bottom repeat-x; } div.pagemenu div div { @@ -501,7 +501,7 @@ div#infobox div.st_header div.caption { div#infobox div.st_content { overflow: hidden; padding: 4px; - background: white url('bg_line_top.png') top left repeat-x; + background: white url(img/bg_line_top.png) top left repeat-x; } div#infobox div.st_content div.duration { @@ -549,7 +549,7 @@ button.green { width: 100px; height: 20px; background-color: inherit; - background-image: url(button_green.png); + background-image: url(img/button_green.png); background-repeat: no-repeat; color: #FFFFFF; font-size: 11px; @@ -564,7 +564,7 @@ button.red { width: 100px; height: 20px; background-color: inherit; - background-image: url(button_red.png); + background-image: url(img/button_red.png); background-repeat: no-repeat; color: #FFFFFF; font-size: 11px; @@ -579,7 +579,7 @@ button.blue { width: 100px; height: 20px; background-color: inherit; - background-image: url(button_blue.png); + background-image: url(img/button_blue.png); background-repeat: no-repeat; color: #FFFFFF; font-size: 11px; @@ -647,16 +647,16 @@ div.event div.station { div.station div { margin: 0; padding: 0; - background: url(bg_box_l.png) top left no-repeat; + background: url(img/bg_box_l.png) top left no-repeat; height: 23px; } div.station div div { - background: url(bg_box_r.png) top right no-repeat; + background: url(img/bg_box_r.png) top right no-repeat; } div.station div div div { - background: url(bg_box_h.png) repeat-x; + background: url(img/bg_box_h.png) repeat-x; line-height: 20px; vertical-align: middle; text-align: left; @@ -688,7 +688,7 @@ div.content { margin: 0; overflow: hidden; - background: white url(bg_tools.png) top left repeat-y; + background: white url(img/bg_tools.png) top left repeat-y; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; @@ -773,7 +773,7 @@ table.listing { } table.listing tr td { - background: transparent url(bg_line.png) bottom repeat-x; + background: transparent url(img/bg_line.png) bottom repeat-x; border-bottom: 1px solid #C0C1DA; } @@ -824,16 +824,16 @@ table.listing a { div.boxheader { margin: 0px; padding: 0px; - background: url(bg_box_l.png) top left no-repeat; + background: url(img/bg_box_l.png) top left no-repeat; } div.boxheader div { margin: 0px; - background: url(bg_box_r.png) top right no-repeat; + background: url(img/bg_box_r.png) top right no-repeat; } div.boxheader div div { - background: url(bg_box_h.png) repeat-x; + background: url(img/bg_box_h.png) repeat-x; vertical-align: middle; text-align: left; margin-right: 3px; @@ -864,7 +864,7 @@ div.recordings { div.recording_item { overflow: hidden; - background: url(bg_line.png) bottom repeat-x; + background: url(img/bg_line.png) bottom repeat-x; border-bottom: 1px solid #C0C1DA; } @@ -920,7 +920,7 @@ div.recording_item { */ div.screenshot { - background-image: url(tv.jpg); + background-image: url(img/tv.jpg); background-repeat: no-repeat; height: 240px; width: 320px; @@ -973,7 +973,7 @@ table.formular { table.formular tr td { vertical-align: top; vertical-align: middle; - background: url(bg_line.png) bottom repeat-x; + background: url(img/bg_line.png) bottom repeat-x; border-bottom: 1px solid #C0C1DA; } @@ -1045,7 +1045,7 @@ table.login tr td { .info-win div.epg_content { padding: 0px 0px 7px 0px; margin: 0px 0px 0px 0px; - background: transparent url(bg_tools.png) top left repeat-y; + background: transparent url(img/bg_tools.png) top left repeat-y; border: 0px; overflow: hidden; } diff --git a/doc/ChangeLog b/doc/ChangeLog index dc00cd3..bf2062b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,13 @@ +2007-09-18 Dieter Hametner <dh+vdr at gekrumbel dot de> + + - Eliminated 'images' directory. The images are now not longer + compiled with ecpp into the executable module of live. With the + content.ecpp part and file cache we have a equally performant + solution to compiled in files. + - Added file cache preload functionality. The file cache is filled + with a list of files defined at compile time on plugin startup + time. + 2007-09-09 Dieter Hametner <dh+vdr at gekrumbel dot de> * tntconfig.cpp: allways give absolute paths to content.ecpp diff --git a/images/Makefile b/images/Makefile deleted file mode 100644 index a5db639..0000000 --- a/images/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -CXX ?= g++ -AR ?= ar -ECPPC ?= ecppc - -CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC - -CXXFLAGS += `tntnet-config --cxxflags` -LDFLAGS += `tntnet-config --libs` - -INCLUDES += -I.. - -### The directory environment: -VDRDIR ?= ../../../.. - -### The object files (add further files here): - -OBJS = logo.o record.o active.o inactive.o button_blue.o \ - file.o folder_closed.o folder_open.o plus.o minus.o \ - transparent.o edit.o del.o play.o close.o \ - bg_header_h.o bg_header_l.o bg_header_r.o bg_box_h.o \ - bg_box_l.o bg_box_r.o movie.o menu_line_bg.o \ - bg_line.o bg_tools.o zap.o favicon.o bg_line_top.o \ - reload.o stop_update.o one_uparrow.o one_downarrow.o \ - tv.o remotecontrol.o search.o record_timer.o \ - button_red.o button_green.o button_new.o help.o \ - logo_login.o button_yellow.o arrow.o arrow_rec.o \ - on_dvd.o pause.o ffw.o rwd.o stop.o imdb.o - -### Default rules: - -.PHONY: all clean - -all: libimages.a - -### Implicit rules: - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< - -%.cpp: %.png - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/png" $< - -%.cpp: %.gif - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/gif" $< - -%.cpp: %.jpg - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/jpg" $< - -%.cpp: %.ico - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b -m "image/x-icon" $< - -### Targets: - -libimages.a: $(OBJS) - $(AR) r $@ $^ - -clean: - @rm -f *~ *.o core* libimages.a $(OBJS:%.o=%.cpp) diff --git a/javascript/treeview.js b/javascript/treeview.js index 3f6fea9..e9edbdd 100644 --- a/javascript/treeview.js +++ b/javascript/treeview.js @@ -70,14 +70,14 @@ function Toggle(node) if (sibling.style.display == 'none') { if (imgChild != null) - setImages(imgChild, "minus.png", "folder_open.png"); + setImages(imgChild, "img/minus.png", "img/folder_open.png"); sibling.style.display = 'block'; } // Collapse the branch if it IS visible else { if (imgChild != null) - setImages(imgChild, "plus.png", "folder_closed.png"); + setImages(imgChild, "img/plus.png", "img/folder_closed.png"); sibling.style.display = 'none'; } } @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: live.cpp,v 1.16 2007/08/19 19:48:54 tadi Exp $ + * $Id: live.cpp,v 1.17 2007/09/17 22:23:40 tadi Exp $ */ #include <vdr/plugin.h> @@ -14,6 +14,7 @@ #include "tasks.h" #include "thread.h" #include "timers.h" +#include "preload.h" namespace vdrlive { @@ -47,6 +48,10 @@ bool Plugin::Start(void) #endif // force status monitor startup LiveStatusMonitor(); + + // preload files into file Cache + PreLoadFileCache(m_configDirectory); + // XXX error handling m_thread.reset( new ServerThread ); m_thread->Start(); diff --git a/images/active.png b/live/img/active.png Binary files differindex 156a8e0..156a8e0 100644 --- a/images/active.png +++ b/live/img/active.png diff --git a/images/arrow.png b/live/img/arrow.png Binary files differindex 0c7c14d..0c7c14d 100644 --- a/images/arrow.png +++ b/live/img/arrow.png diff --git a/images/arrow_rec.gif b/live/img/arrow_rec.gif Binary files differindex 115520e..115520e 100644 --- a/images/arrow_rec.gif +++ b/live/img/arrow_rec.gif diff --git a/images/bg_box_h.png b/live/img/bg_box_h.png Binary files differindex 7889b87..7889b87 100644 --- a/images/bg_box_h.png +++ b/live/img/bg_box_h.png diff --git a/images/bg_box_l.png b/live/img/bg_box_l.png Binary files differindex 82ef026..82ef026 100644 --- a/images/bg_box_l.png +++ b/live/img/bg_box_l.png diff --git a/images/bg_box_r.png b/live/img/bg_box_r.png Binary files differindex 6284c4f..6284c4f 100644 --- a/images/bg_box_r.png +++ b/live/img/bg_box_r.png diff --git a/images/bg_header_h.png b/live/img/bg_header_h.png Binary files differindex 5a9f00b..5a9f00b 100644 --- a/images/bg_header_h.png +++ b/live/img/bg_header_h.png diff --git a/images/bg_header_l.png b/live/img/bg_header_l.png Binary files differindex 2034acc..2034acc 100644 --- a/images/bg_header_l.png +++ b/live/img/bg_header_l.png diff --git a/images/bg_header_r.png b/live/img/bg_header_r.png Binary files differindex 63b8708..63b8708 100644 --- a/images/bg_header_r.png +++ b/live/img/bg_header_r.png diff --git a/images/bg_line.png b/live/img/bg_line.png Binary files differindex 4a5c9c9..4a5c9c9 100644 --- a/images/bg_line.png +++ b/live/img/bg_line.png diff --git a/images/bg_line_top.png b/live/img/bg_line_top.png Binary files differindex 49d3975..49d3975 100644 --- a/images/bg_line_top.png +++ b/live/img/bg_line_top.png diff --git a/images/bg_tools.png b/live/img/bg_tools.png Binary files differindex 48c8f64..48c8f64 100644 --- a/images/bg_tools.png +++ b/live/img/bg_tools.png diff --git a/images/button_blue.png b/live/img/button_blue.png Binary files differindex f18eb4e..f18eb4e 100644 --- a/images/button_blue.png +++ b/live/img/button_blue.png diff --git a/images/button_green.png b/live/img/button_green.png Binary files differindex 23b40bd..23b40bd 100644 --- a/images/button_green.png +++ b/live/img/button_green.png diff --git a/images/button_new.png b/live/img/button_new.png Binary files differindex 88c27f5..88c27f5 100644 --- a/images/button_new.png +++ b/live/img/button_new.png diff --git a/images/button_red.png b/live/img/button_red.png Binary files differindex 5492ec7..5492ec7 100644 --- a/images/button_red.png +++ b/live/img/button_red.png diff --git a/images/button_yellow.png b/live/img/button_yellow.png Binary files differindex 02c00cf..02c00cf 100644 --- a/images/button_yellow.png +++ b/live/img/button_yellow.png diff --git a/images/close.png b/live/img/close.png Binary files differindex caeadcb..caeadcb 100644 --- a/images/close.png +++ b/live/img/close.png diff --git a/images/del.png b/live/img/del.png Binary files differindex 88a48fd..88a48fd 100644 --- a/images/del.png +++ b/live/img/del.png diff --git a/images/edit.png b/live/img/edit.png Binary files differindex f5a3308..f5a3308 100644 --- a/images/edit.png +++ b/live/img/edit.png diff --git a/images/favicon.ico b/live/img/favicon.ico Binary files differindex a4fd15d..a4fd15d 100644 --- a/images/favicon.ico +++ b/live/img/favicon.ico diff --git a/images/ffw.png b/live/img/ffw.png Binary files differindex aeec194..aeec194 100644 --- a/images/ffw.png +++ b/live/img/ffw.png diff --git a/images/file.png b/live/img/file.png Binary files differindex 340102c..340102c 100644 --- a/images/file.png +++ b/live/img/file.png diff --git a/images/folder_closed.png b/live/img/folder_closed.png Binary files differindex 18428be..18428be 100644 --- a/images/folder_closed.png +++ b/live/img/folder_closed.png diff --git a/images/folder_open.png b/live/img/folder_open.png Binary files differindex 027d91e..027d91e 100644 --- a/images/folder_open.png +++ b/live/img/folder_open.png diff --git a/images/help.png b/live/img/help.png Binary files differindex 861f009..861f009 100644 --- a/images/help.png +++ b/live/img/help.png diff --git a/images/imdb.png b/live/img/imdb.png Binary files differindex 6983d44..6983d44 100644 --- a/images/imdb.png +++ b/live/img/imdb.png diff --git a/images/inactive.png b/live/img/inactive.png Binary files differindex b14096d..b14096d 100644 --- a/images/inactive.png +++ b/live/img/inactive.png diff --git a/images/logo.png b/live/img/logo.png Binary files differindex 0aa62d5..0aa62d5 100644 --- a/images/logo.png +++ b/live/img/logo.png diff --git a/images/logo_login.png b/live/img/logo_login.png Binary files differindex 59161c3..59161c3 100644 --- a/images/logo_login.png +++ b/live/img/logo_login.png diff --git a/images/menu_line_bg.png b/live/img/menu_line_bg.png Binary files differindex 8b8f603..8b8f603 100644 --- a/images/menu_line_bg.png +++ b/live/img/menu_line_bg.png diff --git a/images/minus.png b/live/img/minus.png Binary files differindex 05fb45e..05fb45e 100644 --- a/images/minus.png +++ b/live/img/minus.png diff --git a/images/movie.png b/live/img/movie.png Binary files differindex 5465ab6..5465ab6 100644 --- a/images/movie.png +++ b/live/img/movie.png diff --git a/images/on_dvd.png b/live/img/on_dvd.png Binary files differindex 13c1168..13c1168 100644 --- a/images/on_dvd.png +++ b/live/img/on_dvd.png diff --git a/images/one_downarrow.png b/live/img/one_downarrow.png Binary files differindex a4f8e50..a4f8e50 100644 --- a/images/one_downarrow.png +++ b/live/img/one_downarrow.png diff --git a/images/one_uparrow.png b/live/img/one_uparrow.png Binary files differindex dfad497..dfad497 100644 --- a/images/one_uparrow.png +++ b/live/img/one_uparrow.png diff --git a/images/pause.png b/live/img/pause.png Binary files differindex 1b44908..1b44908 100644 --- a/images/pause.png +++ b/live/img/pause.png diff --git a/images/play.png b/live/img/play.png Binary files differindex b1c46f9..b1c46f9 100644 --- a/images/play.png +++ b/live/img/play.png diff --git a/images/plus.png b/live/img/plus.png Binary files differindex 7613c9c..7613c9c 100644 --- a/images/plus.png +++ b/live/img/plus.png diff --git a/images/record.png b/live/img/record.png Binary files differindex fc8e383..fc8e383 100644 --- a/images/record.png +++ b/live/img/record.png diff --git a/images/record_timer.png b/live/img/record_timer.png Binary files differindex 0fe4846..0fe4846 100644 --- a/images/record_timer.png +++ b/live/img/record_timer.png diff --git a/images/reload.png b/live/img/reload.png Binary files differindex 694efb6..694efb6 100644 --- a/images/reload.png +++ b/live/img/reload.png diff --git a/images/remotecontrol.jpg b/live/img/remotecontrol.jpg Binary files differindex a9e1c2d..a9e1c2d 100644 --- a/images/remotecontrol.jpg +++ b/live/img/remotecontrol.jpg diff --git a/images/rwd.png b/live/img/rwd.png Binary files differindex 54ec330..54ec330 100644 --- a/images/rwd.png +++ b/live/img/rwd.png diff --git a/images/search.png b/live/img/search.png Binary files differindex 30852da..30852da 100644 --- a/images/search.png +++ b/live/img/search.png diff --git a/images/stop.png b/live/img/stop.png Binary files differindex bb79efb..bb79efb 100644 --- a/images/stop.png +++ b/live/img/stop.png diff --git a/images/stop_update.png b/live/img/stop_update.png Binary files differindex 4ffdef7..4ffdef7 100644 --- a/images/stop_update.png +++ b/live/img/stop_update.png diff --git a/images/transparent.png b/live/img/transparent.png Binary files differindex 37c28e7..37c28e7 100644 --- a/images/transparent.png +++ b/live/img/transparent.png diff --git a/images/tv.jpg b/live/img/tv.jpg Binary files differindex 34aee1c..34aee1c 100644 --- a/images/tv.jpg +++ b/live/img/tv.jpg diff --git a/images/zap.png b/live/img/zap.png Binary files differindex e332d2c..e332d2c 100644 --- a/images/zap.png +++ b/live/img/zap.png diff --git a/live/js/live/pageenhance.js b/live/js/live/pageenhance.js index d469a8b..0cbf2ff 100644 --- a/live/js/live/pageenhance.js +++ b/live/js/live/pageenhance.js @@ -14,11 +14,12 @@ var PageEnhance = new Class({ actionLinkSelector: 'a[href^="vdr_request/"]', hintTipSelector: '*[title]', hintClassName: 'hint', - notifyIdPrefix: 'notify', - infoWinStrings: { + infoWinOptions: { + bodyselect: 'div.epg_content', loadingMsg: 'loading', errorMsg: 'an error occured!' }, + notifyIdPrefix: 'notify', notifyStrings: { successMsg: '<img src="active.png" alt=""> Success!', errorMsg: '<img src="del.png" alt=""> failed!' @@ -68,12 +69,9 @@ var PageEnhance = new Class({ epgid = found[1]; el.addEvent('click', function(event){ var event = new Event(event); - new InfoWin.Ajax(epgid, href, { - bodyselect: 'div.epg_content', - onDomExtend: this.domExtend.bind(this), - loadingMsg: this.options.infoWinStrings.loadingMsg, - errorMsg: this.options.infoWinStrings.errorMsg - }).show(event); + new InfoWin.Ajax(epgid, href, $merge(this.options.infoWinOptions, { + onDomExtend: this.domExtend.bind(this) + })).show(event); event.stop(); return false; }.bind(this)); diff --git a/live/js/live/vdr_status.js b/live/js/live/vdr_status.js index c24ed72..13e4a0d 100644 --- a/live/js/live/vdr_status.js +++ b/live/js/live/vdr_status.js @@ -68,7 +68,7 @@ var LiveVdrInfo = Ajax.extend({ var img = $('statusReloadBtn'); if (img != null) { // change image according to state. - img.src = this.reload ? 'stop_update.png' : 'reload.png'; + img.src = this.reload ? 'img/stop_update.png' : 'img/reload.png'; } } if (this.reload) diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 8371ba3..3d6b866 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -152,7 +152,8 @@ int update_status(1); <script type="text/javascript" src="js/live/pageenhance.js"></script> <script type="text/javascript"><!-- var liveEnhanced = new PageEnhance({ - infoWinStrings: { + infoWinOptions: { + buttonimg: 'img/transparent.png', loadingMsg: '<$ tr("loading data") $>', errorMsg: '<$ tr("an error occured!") $>' }, diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 5ceb7b4..dabb301 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -133,7 +133,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) { string folderimg = "folder_closed.png"; </%args> <div class="recording_item" onclick="Toggle(this)"> - <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level, "<img src=\"transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><img class="recording_expander" src="<$ LiveSetup().GetThemedLink("img", collapseimg) $>" alt="" /><img class="recording_folder" src="<$ LiveSetup().GetThemedLink("img", folderimg) $>" alt="" /></div> + <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><img class="recording_expander" src="<$ LiveSetup().GetThemedLink("img", collapseimg) $>" alt="" /><img class="recording_folder" src="<$ LiveSetup().GetThemedLink("img", folderimg) $>" alt="" /></div> <div class="recording_spec"> <div class="recording_name"><$ name $></div> </div> @@ -156,7 +156,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) { string archived; </%args> <div class="recording_item"> - <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><& archived_disc archived=(archived) &><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div> + <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><& archived_disc archived=(archived) &><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div> <div class="recording_spec"> <div class="recording_day" style="width: <$ dayLen $>"><$ day $></div> <div class="recording_date"><$ FormatDateTime(tr("%b %d %y"), startTime) $></div> @@ -172,7 +172,7 @@ for (iter = recordingsTree.begin(path); iter != end; ++iter) { } else { </%cpp> - <img src="transparent.png" alt="" width="16px" height="16px" /> + <img src="/img/transparent.png" alt="" width="16px" height="16px" /> <%cpp> } </%cpp> diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index d061843..73255e4 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -51,7 +51,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); </td> </tr> <tr class="description"> - <td class="action leftcol"><img src="transparent.png" alt="" width="16px" height="16px"/></td> + <td class="action leftcol"><img src="/img/transparent.png" alt="" width="16px" height="16px"/></td> <td><div class="withmargin"><$ tr("Expression") $></div></td> <td><div class="withmargin"><$ tr("Channel") $></div></td> <td><div class="withmargin"><$ tr("Starts between") $></div></td> diff --git a/pages/timers.ecpp b/pages/timers.ecpp index ff637f2..ab4d285 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -87,14 +87,14 @@ using namespace vdrlive; </td> </tr> <tr class="description"> - <td class="leftcol"><img src="transparent.png" alt="" width="16px" height="16px" /></td> + <td class="leftcol"><img src="/img/transparent.png" alt="" width="16px" height="16px" /></td> <td><div class="withmargin"><$ tr("Channel") $></div></td> <td><div class="withmargin"><$ tr("Start") $></div></td> <td><div class="withmargin"><$ tr("Stop") $></div></td> <td><div class="withmargin"><$ tr("File") $></div></td> - <td class="action"><img src="transparent.png" alt="" width="16px" height="16px" /></td> - <td class="action"><img src="transparent.png" alt="" width="16px" height="16px" /></td> - <td class="action rightcol"><img src="transparent.png" alt="" width="16px" height="16px" /></td> + <td class="action"><img src="/img/transparent.png" alt="" width="16px" height="16px" /></td> + <td class="action"><img src="/img/transparent.png" alt="" width="16px" height="16px" /></td> + <td class="action rightcol"><img src="/img/transparent.png" alt="" width="16px" height="16px" /></td> </tr> <%cpp> } diff --git a/preload.cpp b/preload.cpp new file mode 100644 index 0000000..83b282e --- /dev/null +++ b/preload.cpp @@ -0,0 +1,116 @@ +#include <string> + +#include <vdr/tools.h> + +#include "filecache.h" + +#include "preload.h" + +using namespace std; + +namespace vdrlive { + +// to get an updated list of these files do: +// (cd live; find * -type f ! -wholename '*CVS*' ! -wholename '*themes*' ! -name '*~' ! -name '.*') | awk '{print "\"" $1 "\","}'} +// and clean out unneeded entries. + + void PreLoadFileCache(string const& configDir) + { + static char const * const preloadFiles[] = { + "css/siteprefs.css", + "img/rounded-box-blue-bl.png", + "img/rounded-box-blue-br.png", + "img/rounded-box-blue-ml.png", + "img/rounded-box-blue-mr.png", + "img/rounded-box-blue-tr.png", + "img/rounded-box-green-bl.png", + "img/rounded-box-blue-tl.png", + "img/rounded-box-green-br.png", + "img/rounded-box-green-ml.png", + "img/rounded-box-green-mr.png", + "img/del.png", + "img/info-win-t-r.png", + "img/info-win-m-l.png", + "img/info-win-m-r.png", + "img/info-win-b-l.png", + "img/info-win-b-r.png", + "img/close_red.png", + "img/info-win-t-l.png", + "img/rounded-box-green-tl.png", + "img/rounded-box-green-tr.png", + "img/rounded-box-orange-bl.png", + "img/rounded-box-orange-br.png", + "img/rounded-box-orange-ml.png", + "img/rounded-box-orange-mr.png", + "img/rounded-box-orange-tl.png", + "img/rounded-box-orange-tr.png", + "img/active.png", + "img/arrow.png", + "img/bg_box_h.png", + "img/bg_box_l.png", + "img/bg_box_r.png", + "img/bg_header_h.png", + "img/bg_header_l.png", + "img/bg_header_r.png", + "img/bg_line.png", + "img/bg_line_top.png", + "img/bg_tools.png", + "img/button_blue.png", + "img/button_green.png", + "img/button_new.png", + "img/button_red.png", + "img/button_yellow.png", + "img/close.png", + "img/edit.png", + "img/ffw.png", + "img/file.png", + "img/folder_closed.png", + "img/folder_open.png", + "img/help.png", + "img/imdb.png", + "img/inactive.png", + "img/logo_login.png", + "img/logo.png", + "img/menu_line_bg.png", + "img/minus.png", + "img/movie.png", + "img/on_dvd.png", + "img/one_downarrow.png", + "img/one_uparrow.png", + "img/pause.png", + "img/play.png", + "img/plus.png", + "img/record.png", + "img/record_timer.png", + "img/reload.png", + "img/rwd.png", + "img/search.png", + "img/stop.png", + "img/stop_update.png", + "img/transparent.png", + "img/zap.png", + "img/remotecontrol.jpg", + "img/tv.jpg", + "img/arrow_rec.gif", + "img/favicon.ico", + "js/live/vdr_status.js", + "js/live/infowin.js", + "js/live/liveajax.js", + "js/live/hinttips.js", + "js/live/pageenhance.js", + "js/mootools/mootools.v1.11.js", + 0 + }; + + FileCache& fc = LiveFileCache(); + size_t i = 0; + while (preloadFiles[i]) { + FileCache::ptr_type f = fc.get(configDir + "/" + preloadFiles[i]); + if (0 == f.get()) { + isyslog("LIVE: can't preload %s/%s! Generated pages might be degraded!", configDir.c_str(), preloadFiles[i]); + } + i++; + } + isyslog("LIVE: initial file cache has %d entries and needs %d bytes of data!", fc.count(), fc.weight()); + } +} diff --git a/preload.h b/preload.h new file mode 100644 index 0000000..b408072 --- /dev/null +++ b/preload.h @@ -0,0 +1,11 @@ +#ifndef VDR_LIVE_PRELOAD_H +#define VDR_LIVE_PRELOAD_H + +#include <string> + +namespace vdrlive { + + void PreLoadFileCache(std::string const& configDir); +}; + +#endif // VDR_LIVE_PRELOAD_H diff --git a/tntconfig.cpp b/tntconfig.cpp index 41c55a2..704ae6f 100644 --- a/tntconfig.cpp +++ b/tntconfig.cpp @@ -71,11 +71,11 @@ void TntConfig::WriteConfig() // rule where a image is found, terminates the search. // 1. /themes/<theme>/img/<imgname>.<ext> // 2. /img/<imgname>.<ext> - // 3. <imgname>.<ext> (builtin images) + // deprecated: 3. <imgname>.<ext> (builtin images) // inserted by 'tadi' -- verified with above, but not counterchecked yet! file << "MapUrl ^/themes/([^/]*)/img.*/(.+)\\.(.+) content@ " << configDir << "/themes/$1/img/$2.$3 image/$3" << endl; file << "MapUrl ^/themes/([^/]*)/img.*/(.+)\\.(.+) content@ " << configDir << "/img/$2.$3 image/$3" << endl; - file << "MapUrl ^/themes/([^/]*)/img.*/(.+)\\.(.+) $2@" << endl; + // deprecated: file << "MapUrl ^/themes/([^/]*)/img.*/(.+)\\.(.+) $2@" << endl; // Epg images string const epgImgPath(LiveSetup().GetEpgImageDir()); @@ -93,11 +93,17 @@ void TntConfig::WriteConfig() // inserted by 'tadi' -- verified with above, but not counterchecked yet! file << "MapUrl ^/js(/[^.]*)([^/]*\\.js) content@ " << configDir << "/js$1$2 text/javascript" << endl; - // these map to 'css/basename(uri)' + // map to 'css/basename(uri)' // inserted by 'tadi' -- verified with above, but not counterchecked yet! file << "MapUrl ^/css.*/(.+) content@ " << configDir << "/css/$1 text/css" << endl; + + // map to 'img/basename(uri)' + // inserted by 'tadi' -- verified with above, but not counterchecked yet! file << "MapUrl ^/img.*/(.+)\\.([^.]+) content@ " << configDir << "/img/$1.$2 image/$2" << endl; + // Map favicon.ico into img directory + file << "MapUrl ^/favicon.ico$ content@ " << configDir << "/img/favicon.ico image/x-icon" << endl; + // insecure by default: DO NOT UNKOMMENT!!! // file << "MapUrl /([^/]+/.+) content@ $1" << endl; |