diff --git a/css/styles.css b/css/styles.css index 99b2cb01..eabd9efe 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1011,7 +1011,7 @@ div.recording_item { } .recording_item div.recording_day { - width: 13em; + width: 12em; } .recording_item div.recording_date { @@ -1029,6 +1029,7 @@ div.recording_item { .recording_item div.recording_name { font-weight: bold; cursor: pointer; + max-width: 30em; } .recording_item div.recording_name span { @@ -1040,6 +1041,7 @@ div.recording_item { font-weight: bold; color: orangered; cursor: pointer; + max-width: 30em; } .recording_item div.recording_name_new a { @@ -1058,10 +1060,6 @@ div.recording_item { width: 35px; } -.recording_item div.recording_aspect_ratio { - width: 35px; -} - .recording_item div.recording_arch { float: right; padding-top: 0.5ex; @@ -1357,3 +1355,27 @@ div.epg_content div.about_head div div { border-top: 1px solid #C0C1DA; border-bottom: 1px solid #C0C1DA; } + +div.thumb { + width: 80px; + max-height: 40px; + margin-right: 0.5em; + margin-top: 5px; + margin-bottom: 5px; + text-align: center; + overflow: hidden; + float: left; +} +a.thumb { + float: left; +} + +img.thumbpt { + width: 80px; + margin-top: -20px; + +} +img.thumb { + width: 80px; + margin: 0 -100%; +} diff --git a/epg_events.cpp b/epg_events.cpp index d2faf08b..a4aefdfe 100644 --- a/epg_events.cpp +++ b/epg_events.cpp @@ -396,45 +396,21 @@ namespace vdrlive return found; } - std::string TvscraperValidataPath(const std::string &path) { - if(path.compare(0, LiveSetup().GetTvscraperImageDir().length(), LiveSetup().GetTvscraperImageDir()) == 0) - return path.substr(LiveSetup().GetTvscraperImageDir().length()); - return ""; - } - std::string PosterTvscraper(const cEvent *event, const cRecording *recording) - { - if (LiveSetup().GetTvscraperImageDir().empty() ) return ""; - static cPlugin *pScraper = cPluginManager::GetPlugin("scraper2vdr"); - if (!pScraper ) // if it doesn't exit, try tvscraper - pScraper = cPluginManager::GetPlugin("tvscraper"); - - if (pScraper) { - ScraperGetPoster call; - call.event = event; - call.recording = recording; - if (pScraper->Service("GetPoster", &call)) { - if(call.poster.path.compare(0, LiveSetup().GetTvscraperImageDir().length(), LiveSetup().GetTvscraperImageDir()) == 0) - return call.poster.path.substr(LiveSetup().GetTvscraperImageDir().length()); - } - } - return ""; - } - - bool tvscraper_avialabe() { - static cPlugin *pScraper = cPluginManager::GetPlugin("tvscraper"); - if (!pScraper) return false; - return pScraper->Service("GetScraperMovieOrTv", NULL); - } - bool tvscraper(cScraperMovieOrTv &scraperMovieOrTv, const cEvent *event, const cRecording *recording) + bool PosterTvscraper(cTvMedia &media, const cEvent *event, const cRecording *recording) { - scraperMovieOrTv.found = false; - static cPlugin *pScraper = cPluginManager::GetPlugin("tvscraper"); - if (!pScraper) return false; - scraperMovieOrTv.event = event; - scraperMovieOrTv.recording = recording; - scraperMovieOrTv.httpImagePaths = false; - scraperMovieOrTv.media = true; - return pScraper->Service("GetScraperMovieOrTv", &scraperMovieOrTv); + media.path = ""; + media.width = media.height = 0; + if (LiveSetup().GetTvscraperImageDir().empty() ) return false; + ScraperGetPoster call; + call.event = event; + call.recording = recording; + if (ScraperCallService("GetPoster", &call)) { + media.path = ScraperImagePath2Live(call.poster.path); + media.width = call.poster.width; + media.height = call.poster.height; + return true; + } + return false; } std::list EpgImages(std::string const &epgid) diff --git a/epg_events.h b/epg_events.h index d8d6d2f2..056b2220 100644 --- a/epg_events.h +++ b/epg_events.h @@ -58,10 +58,7 @@ namespace vdrlive * Return a list of EpgImage paths for a given epgid. */ - std::string TvscraperValidataPath(const std::string &path); - std::string PosterTvscraper(const cEvent *event, const cRecording *recording); - bool tvscraper_avialabe(); - bool tvscraper(cScraperMovieOrTv &scraperMovieOrTv, const cEvent *event, const cRecording *recording); + bool PosterTvscraper(cTvMedia &media, const cEvent *event, const cRecording *recording); std::list EpgImages(std::string const &epgid); /** diff --git a/live.cpp b/live.cpp index 00ee8d99..bf63cc27 100644 --- a/live.cpp +++ b/live.cpp @@ -41,6 +41,11 @@ bool Plugin::ProcessArgs(int argc, char *argv[]) return LiveSetup().ParseCommandLine( argc, argv ); } +bool Plugin::Initialize(void) +{ + return LiveSetup().Initialize(); +} + bool Plugin::Start(void) { m_configDirectory = canonicalize_file_name(cPlugin::ConfigDirectory( PLUGIN_NAME_I18N )); diff --git a/live.h b/live.h index 59173373..88e3445c 100644 --- a/live.h +++ b/live.h @@ -26,6 +26,7 @@ class Plugin : public cPlugin { virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); virtual bool Start(void); + virtual bool Initialize(void); virtual void Stop(void); virtual void MainThreadHook(void); virtual cString Active(void); diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp index a382d431..eebf61f6 100644 --- a/pages/epginfo.ecpp +++ b/pages/epginfo.ecpp @@ -81,7 +81,9 @@ using namespace vdrlive; throw HtmlError(tr("Couldn't find recording or no recordings available")); } epgEvent = EpgEvents::CreateEpgInfo(epgid, recording); - epgImage = EpgEvents::PosterTvscraper(NULL, recording); + cTvMedia image; + EpgEvents::PosterTvscraper(image, NULL, recording); + epgImage = image.path; irecording = (uintptr_t)recording; } // check for event: @@ -105,7 +107,9 @@ using namespace vdrlive; epgEvent = EpgEvents::CreateEpgInfo(epgid, schedules); #endif const cEvent* event = epgEvent->Event(); - epgImage = EpgEvents::PosterTvscraper(event, NULL); + cTvMedia image; + EpgEvents::PosterTvscraper(image, event, NULL); + epgImage = image.path; i_event = (uintptr_t)event; } // check for aboutbox: @@ -178,6 +182,7 @@ using namespace vdrlive; std::string id; std::string title; int detail; +std::string s_IMDB_ID; -<& pageelems.epg_tool_box detail=(detail) epgid=(id) title=(title) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &> +<& pageelems.epg_tool_box detail=(detail) epgid=(id) title=(title) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) s_IMDB_ID=(s_IMDB_ID) &> diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 6c09f1fe..f88ae873 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -189,8 +189,15 @@ function displayArtwork(boxId) { <%def imdb_info_href> <%args> std::string title; + std::string s_IMDB_ID; -<%cpp> if (LiveSetup().GetShowIMDb()) { " alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>> <%cpp> } +<%cpp> if (LiveSetup().GetShowIMDb()) { +if (s_IMDB_ID.empty() ) { + } else { + } + target="_blank">" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>> <%cpp> } <# ---------------------------------------------------------------------- #> @@ -379,6 +386,7 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). time_t startTime; time_t endTime; int lastCurrentChanel = int(); + std::string s_IMDB_ID; <%cpp> int duration = EpgEvents::Duration(startTime, endTime); @@ -405,7 +413,7 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). } if (eventId != 0) { - <& pageelems.imdb_info_href title=(title) &> + <& pageelems.imdb_info_href title=(title) s_IMDB_ID=(s_IMDB_ID) &> <%cpp> } } @@ -454,12 +462,15 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures().
<%cpp> -const cRecording *recording = static_cast((void *)irecording); -const cEvent *event = static_cast((void *)ievent); cScraperMovieOrTv scraperMovieOrTv; -EpgEvents::tvscraper(scraperMovieOrTv, event, recording); -const bool episodeFound = scraperMovieOrTv.found &&(!scraperMovieOrTv.movie) && scraperMovieOrTv.episodeFound; -if (EpgEvents::tvscraper_avialabe() ) { +scraperMovieOrTv.found = false; +scraperMovieOrTv.event = static_cast((void *)ievent); +scraperMovieOrTv.recording = static_cast((void *)irecording); +scraperMovieOrTv.httpImagePaths = false; +scraperMovieOrTv.media = true; +ScraperCallService("GetScraperMovieOrTv", &scraperMovieOrTv); +const bool episodeFound = scraperMovieOrTv.found && (!scraperMovieOrTv.movie) && scraperMovieOrTv.episodeFound; +if (scraperMovieOrTv.found) {
- <& (tools_comp) id=(boxId) archived=(archived) detail=(1) title=(title) &> + <& (tools_comp) id=(boxId) archived=(archived) detail=(1) title=(title) s_IMDB_ID=(scraperMovieOrTv.IMDB_ID) &>
<%cpp> if (!archived.empty()) { <$ (archived + " ") $><%cpp> } <$ (time) $>
@@ -511,12 +522,11 @@ if (EpgEvents::tvscraper_avialabe() ) { <%cpp> if (episodeFound && !scraperMovieOrTv.episode.episodeImage.path.empty() ) { - - + + <%cpp> } -// const bool episodeFound = scraperMovieOrTv.found &&(!scraperMovieOrTv.movie) && scraperMovieOrTv.episodeFound; } else { std::list images1 = EpgEvents::RecImages(boxId, filename); @@ -536,7 +546,6 @@ if (EpgEvents::tvscraper_avialabe() ) {