diff --git a/css/styles.css b/css/styles.css index d32e935..95eca4a 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1032,6 +1032,20 @@ div.recording_item { cursor: pointer; } +.recording_item div.recording_name_new { + font-weight: bold; + color: orangered; + cursor: pointer; +} + +.recording_item div.recording_name_new a { + color: orangered; +} + +.recording_item div.recording_name_new span { + font-weight: normal; +} + .recording_item div.recording_arch { float: right; padding-top: 0.5ex; diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp index f575f15..e69f3bb 100644 --- a/pages/channels_widget.ecpp +++ b/pages/channels_widget.ecpp @@ -42,6 +42,6 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); % % std::string listChannelId = *listChannel->GetChannelID().ToString(); + <{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Number() $>: <$ listChannel->Name() $> % } diff --git a/pages/menu.ecpp b/pages/menu.ecpp index 6251ec7..4de9b40 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -88,6 +88,7 @@ if (!component.empty()) { if (LiveFeatures< features::epgsearch >().Recent()) { <& menu.component current=("search") &> + <& menu.component current=("searchepg") &> <& menu.component current=("searchtimers") &> <%cpp> } diff --git a/pages/multischedule.ecpp b/pages/multischedule.ecpp index d06ac44..2fc85cf 100644 --- a/pages/multischedule.ecpp +++ b/pages/multischedule.ecpp @@ -115,10 +115,12 @@ std::vector times_start; { std::string thisChannel; try { - if ( cur_group_count != 0 ) - channel_groups_names.back() += std::string( " - " ); size_t channelSep = thisGroup.find(','); thisChannel = thisGroup.substr(0, channelSep ); + if ( cur_group_count++ != 0 ) + channel_groups_names.back() += std::string( " - " ); + else + channel_groups_names.back() += thisChannel += std::string( ": " ); if ( channelSep != thisGroup.npos ) thisGroup.erase( 0, channelSep+1 ); else @@ -136,7 +138,6 @@ std::vector times_start; } channel_groups_names.back() += std::string( Channel->Name() ); channel_groups_numbers.back().push_back( Channel->Number() ); - cur_group_count++; if ( cur_group_count>=MAX_CHANNELS ) { // start new group if group gets too large @@ -583,4 +584,8 @@ std::vector times_start; % // <& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) &> +| +« Prev +| +Next » diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 9ef8a0a..fc80823 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -18,6 +18,23 @@ using namespace vdrlive; using namespace std; +bool checkNew(RecordingsTreePtr recordingsTree, vector p) { + bool newR = false; + RecordingsMap::iterator iter; + for (iter = recordingsTree->begin(p); iter != recordingsTree->end(p); iter++) { + RecordingsItemPtr recItem = iter->second; + if(!recItem->IsDir()) + newR |= recItem->Recording()->GetResume() <= 0; + else { + vector pp(p); + pp.push_back(recItem->Name()); + newR |= checkNew(recordingsTree, pp); + } + } + return newR; +} + + <%args> string sort; @@ -213,9 +230,15 @@ else for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { RecordingsItemPtr recItem = *recIter; counter++; + + /* search trough directory for new recordings */ + vector p(path); + p.push_back(recItem->Name()); + bool newR = checkNew(recordingsTree, p);; +
  • - <& rec_item_dir name=(recItem->Name()) level=(recItem->Level()) &> + <& rec_item_dir name=(recItem->Name()) level=(recItem->Level()) newR=(newR ? "_new" : "") &> <%cpp> #if TNT_QUERYPARAMS_NO_BOOL tnt::QueryParams recItemParams(qparam); @@ -262,19 +285,20 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { string dayLen(lexical_cast(day.length() - 1) + ".25em;"); // TRANSLATORS: recording duration format HH:MM string duration(recItem->Duration() < 0 ? "" : FormatDuration(tr("(%d:%02d)"), recItem->Duration() / 60, recItem->Duration() % 60)); + string newR(recItem->Recording()->GetResume() <= 0 ? "_new" : ""); string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); string description(recItem->RecInfo()->Description() ? recItem->RecInfo()->Description() : ""); string hint(tr("Click to view details.")); if (!shortDescr.empty()) hint = shortDescr + "
    " + hint; else if (!description.empty()) hint = description + "
    " + hint; #ifdef HAVE_LIBPCRECPP - pcrecpp::RE re(filter.c_str(), pcrecpp::UTF8()); + pcrecpp::RE re(filter.c_str(), pcrecpp::UTF8().set_caseless(true)); if (filter.empty() || re.PartialMatch(recItem->Name()) || re.PartialMatch(shortDescr) || re.PartialMatch(description)) #endif {
  • - <& rec_item_file name=(recItem->Name()) level=(recItem->Level()) id=(recItem->Id()) day=(day) dayLen=(dayLen) startTime=(recItem->StartTime()) duration=(duration) hint=(hint) shortDescr=(shortDescr) archived=(RecordingsManager::GetArchiveDescr(recItem->Recording())) &> + <& rec_item_file name=(recItem->Name()) level=(recItem->Level()) id=(recItem->Id()) day=(day) dayLen=(dayLen) startTime=(recItem->StartTime()) duration=(duration) newR=(newR) hint=(hint) shortDescr=(shortDescr) archived=(RecordingsManager::GetArchiveDescr(recItem->Recording())) &>
  • <%cpp> } @@ -354,13 +378,14 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%args> string name; int level; + string newR; string collapseimg = "plus.png"; string folderimg = "folder_closed.png";
    <%cpp> reply.out() << StringRepeat(level - 1, "\"\""); " alt="" />" alt="" />
    -
    <$ name $>
    +
    <$ name $>
     
    @@ -379,6 +404,7 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { string duration; string hint; string shortDescr; + string newR; string archived;
    @@ -386,7 +412,7 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) {
    <%cpp> diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp index 6e554ac..4928f7b 100644 --- a/pages/searchresults.ecpp +++ b/pages/searchresults.ecpp @@ -18,6 +18,9 @@ using namespace std; <%session scope="global"> bool logged_in(false); +<%request scope="page"> + string searchterm=""; + <%include>page_init.eh <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); @@ -38,6 +41,8 @@ bool logged_in(false); s.SetUseSubtitle(false); s.SetUseDescription(false); results.GetByQuery(s.ToText()); + + searchterm = searchplain; } <& pageelems.doc_type &> @@ -49,7 +54,7 @@ bool logged_in(false); <& pageelems.logo &> - <& menu active=("searchepg") &> + <& menu active=("searchepg") component=("searchresults.searchresults_actions") &>
    % if (results.size() == 0) { <$ tr("No search results") $> @@ -114,3 +119,6 @@ bool logged_in(false); <%include>page_exit.eh +<%def searchresults_actions> +<$ tr("New search timer") $> + diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp index 514a9c7..77381de 100644 --- a/pages/timerconflicts.ecpp +++ b/pages/timerconflicts.ecpp @@ -108,7 +108,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); longDescription = StringEscapeAndBreak(SortedTimers::GetTimerInfo(*timer)) + "
    " + StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength)) + "

    " + tr("Click to view details."); - searchTimName = SortedTimers::SearchTimerName(*timer); + searchTimName = SortedTimers::SearchTimerInfo(*timer, "searchtimer"); title = epgEvent->Title(); } diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 7b7be70..e627ca9 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -79,6 +79,7 @@ static const size_t maximumDescriptionLength = 300; EpgInfoPtr epgEvent; string longDescription; string searchTimName; + string searchTimId; #if VDRVERSNUM >= 20301 if (!timer->Event()) { LOCK_SCHEDULES_READ; @@ -93,7 +94,8 @@ static const size_t maximumDescriptionLength = 300; longDescription = StringEscapeAndBreak(SortedTimers::GetTimerInfo(*timer)) + "
    " + StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength)) + "

    " + tr("Click to view details."); - searchTimName = SortedTimers::SearchTimerName(*timer); + searchTimName = SortedTimers::SearchTimerInfo(*timer, "searchtimer"); + searchTimId = SortedTimers::SearchTimerInfo(*timer, "s-id"); } string currentDay = SortedTimers::GetTimerDays(*timer); SortedTimers::iterator nextTimer = timer; ++nextTimer; @@ -157,7 +159,7 @@ static const size_t maximumDescriptionLength = 300; % } ><$ timer->File() $>
    - ">
    <$ searchTimName $>
    + "> ">Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>> "><& pageelems.edit_timer timerId=(timers.GetTimerId(*timer)) &> ">" alt="" <& tooltip.hint text=(tr("Delete timer")) &>> diff --git a/timers.cpp b/timers.cpp index 98e4ad8..356ebed 100644 --- a/timers.cpp +++ b/timers.cpp @@ -146,7 +146,7 @@ namespace vdrlive { return info.str(); } - string SortedTimers::SearchTimerName(cTimer const& timer) + string SortedTimers::SearchTimerInfo(cTimer const& timer, std::string const& value) { ostringstream info; if (timer.Aux()) @@ -154,9 +154,9 @@ namespace vdrlive { string epgsearchinfo = GetXMLValue(timer.Aux(), "epgsearch"); if (!epgsearchinfo.empty()) { - string searchtimer = GetXMLValue(epgsearchinfo, "searchtimer"); - if (!searchtimer.empty()) - info << searchtimer; + string data = GetXMLValue(epgsearchinfo, value); + if (!data.empty()) + info << data; } } return info.str(); diff --git a/timers.h b/timers.h index 30583f3..0202d7c 100644 --- a/timers.h +++ b/timers.h @@ -29,7 +29,7 @@ namespace vdrlive { static std::string GetTimerDays(cTimer const& timer); static std::string GetTimerInfo(cTimer const& timer); - static std::string SearchTimerName(cTimer const& timer); + static std::string SearchTimerInfo(cTimer const& timer, std::string const& value); private: SortedTimers();