Feature #2568 » vdr-plugin-live_2018-11-04.diff
css/styles.css | ||
---|---|---|
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;
|
pages/channels_widget.ecpp | ||
---|---|---|
%
|
||
% std::string listChannelId = *listChannel->GetChannelID().ToString();
|
||
<option value="<? channelid ? *listChannel->GetChannelID().ToString() ?><? !channelid ? listChannel->Number() ?>"
|
||
<{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option>
|
||
<{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Number() $>: <$ listChannel->Name() $></option>
|
||
% }
|
||
</select>
|
pages/menu.ecpp | ||
---|---|---|
if (LiveFeatures< features::epgsearch >().Recent()) {
|
||
</%cpp>
|
||
<& menu.component current=("search") &>
|
||
<& menu.component current=("searchepg") &>
|
||
<& menu.component current=("searchtimers") &>
|
||
<%cpp>
|
||
}
|
pages/multischedule.ecpp | ||
---|---|---|
{
|
||
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
|
||
... | ... | |
}
|
||
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
|
||
... | ... | |
% // <& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) &>
|
||
</span>
|
||
</form>
|
||
<span class="sep">|</span>
|
||
<a href="multischedule.html?time_para=<$ time_selected $>&channel=<$ std::max(0, ((int)channel_group - 1)) $>">« Prev</a>
|
||
<span class="sep">|</span>
|
||
<a href="multischedule.html?time_para=<$ time_selected $>&channel=<$ (channel_group + 1) $>">Next »</a>
|
||
</%def>
|
pages/recordings.ecpp | ||
---|---|---|
using namespace vdrlive;
|
||
using namespace std;
|
||
bool checkNew(RecordingsTreePtr recordingsTree, vector<string> 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<string> pp(p);
|
||
pp.push_back(recItem->Name());
|
||
newR |= checkNew(recordingsTree, pp);
|
||
}
|
||
}
|
||
return newR;
|
||
}
|
||
</%pre>
|
||
<%args>
|
||
string sort;
|
||
... | ... | |
for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) {
|
||
RecordingsItemPtr recItem = *recIter;
|
||
counter++;
|
||
/* search trough directory for new recordings */
|
||
vector<string> p(path);
|
||
p.push_back(recItem->Name());
|
||
bool newR = checkNew(recordingsTree, p);;
|
||
</%cpp>
|
||
<li class="recording">
|
||
<& 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);
|
||
... | ... | |
string dayLen(lexical_cast<string, int>(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 + "<br />" + hint;
|
||
else if (!description.empty()) hint = description + "<br />" + 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
|
||
{
|
||
</%cpp>
|
||
<li class="recording">
|
||
<& 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())) &>
|
||
</li>
|
||
<%cpp>
|
||
}
|
||
... | ... | |
<%args>
|
||
string name;
|
||
int level;
|
||
string newR;
|
||
string collapseimg = "plus.png";
|
||
string folderimg = "folder_closed.png";
|
||
</%args>
|
||
<div class="recording_item" onclick="Toggle(this)">
|
||
<div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level - 1, "<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 class="recording_name<$ newR $>"><$ name $></div>
|
||
</div>
|
||
<div class="recording_actions"> </div>
|
||
</div>
|
||
... | ... | |
string duration;
|
||
string hint;
|
||
string shortDescr;
|
||
string newR;
|
||
string archived;
|
||
</%args>
|
||
<div class="recording_item">
|
||
... | ... | |
<div class="recording_spec">
|
||
<div class="recording_day"><$ FormatDateTime(tr("%a,"), startTime) + string(" ") + FormatDateTime(tr("%b %d %y"), startTime) + string(" ") + FormatDateTime(tr("%I:%M %p"), startTime) $></div>
|
||
<div class="recording_duration"><$ duration $></div>
|
||
<div class="recording_name"><a <& tooltip.hint text=(hint) &><& tooltip.display domId=(id) &>><$ name $><br /><%cpp>if ((name != shortDescr) && (!shortDescr.empty())) {</%cpp><span><$ shortDescr $></span><%cpp> } else { </%cpp><span> </span><%cpp> } </%cpp></a></div>
|
||
<div class="recording_name<$ newR $>"><a <& tooltip.hint text=(hint) &><& tooltip.display domId=(id) &>><$ name $><br /><%cpp>if ((name != shortDescr) && (!shortDescr.empty())) {</%cpp><span><$ shortDescr $></span><%cpp> } else { </%cpp><span> </span><%cpp> } </%cpp></a></div>
|
||
</div>
|
||
<div class="recording_actions">
|
||
<%cpp>
|
pages/searchresults.ecpp | ||
---|---|---|
<%session scope="global">
|
||
bool logged_in(false);
|
||
</%session>
|
||
<%request scope="page">
|
||
string searchterm="";
|
||
</%request>
|
||
<%include>page_init.eh</%include>
|
||
<%cpp>
|
||
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
|
||
... | ... | |
s.SetUseSubtitle(false);
|
||
s.SetUseDescription(false);
|
||
results.GetByQuery(s.ToText());
|
||
searchterm = searchplain;
|
||
}
|
||
</%cpp>
|
||
<& pageelems.doc_type &>
|
||
... | ... | |
</head>
|
||
<body>
|
||
<& pageelems.logo &>
|
||
<& menu active=("searchepg") &>
|
||
<& menu active=("searchepg") component=("searchresults.searchresults_actions") &>
|
||
<div class="inhalt">
|
||
% if (results.size() == 0) {
|
||
<$ tr("No search results") $>
|
||
... | ... | |
<%include>page_exit.eh</%include>
|
||
<%def searchresults_actions>
|
||
<a href="edit_searchtimer.html?search=<$ searchterm $>"><$ tr("New search timer") $></a>
|
||
</%def>
|
pages/timerconflicts.ecpp | ||
---|---|---|
longDescription = StringEscapeAndBreak(SortedTimers::GetTimerInfo(*timer)) + "<hr>"
|
||
+ StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength))
|
||
+ "<br/><br/>" + tr("Click to view details.");
|
||
searchTimName = SortedTimers::SearchTimerName(*timer);
|
||
searchTimName = SortedTimers::SearchTimerInfo(*timer, "searchtimer");
|
||
title = epgEvent->Title();
|
||
}
|
||
</%cpp>
|
pages/timers.ecpp | ||
---|---|---|
EpgInfoPtr epgEvent;
|
||
string longDescription;
|
||
string searchTimName;
|
||
string searchTimId;
|
||
#if VDRVERSNUM >= 20301
|
||
if (!timer->Event()) {
|
||
LOCK_SCHEDULES_READ;
|
||
... | ... | |
longDescription = StringEscapeAndBreak(SortedTimers::GetTimerInfo(*timer)) + "<hr>"
|
||
+ StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength))
|
||
+ "<br/><br/>" + 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;
|
||
... | ... | |
% }
|
||
><$ timer->File() $></a></div>
|
||
</td>
|
||
<td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><$ searchTimName $></div></td>
|
||
<td class="<? bottom ? "bottomrow" ?>"><div class="withmargin"><a href="edit_searchtimer.html?searchtimerid=<$ searchTimId $>"><$ searchTimName $></a></div></td>
|
||
<td class="action <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>&action=toggle"><img src="<$ LiveSetup().GetThemedLink("img", (timer->Flags() & tfActive) ? "active.png" : "inactive.png") $>" alt="" <& tooltip.hint text=(tr("Toggle timer active/inactive")) &>></img></a></td>
|
||
<td class="action <? bottom ? "bottomrow" ?>"><& pageelems.edit_timer timerId=(timers.GetTimerId(*timer)) &></td>
|
||
<td class="action rightcol <? bottom ? "bottomrow" ?>"><a href="timers.html?timerid=<$ SortedTimers::EncodeDomId(timers.GetTimerId(*timer)) $>&action=delete"><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" <& tooltip.hint text=(tr("Delete timer")) &>></img></a></td>
|
recman.cpp | ||
---|---|---|
bool RecordingsItemPtrCompare::ByAscendingName(RecordingsItemPtr & first, RecordingsItemPtr & second)
|
||
{
|
||
unsigned int flen = first->Name().length();
|
||
unsigned int fstart = 0;
|
||
while( flen > 0 && ispunct( (first->Name())[ fstart ] ) ) {
|
||
fstart++;
|
||
flen--;
|
||
}
|
||
// eliminate starting punctuation characters of second string
|
||
unsigned int slen = second->Name().length();
|
||
unsigned int sstart = 0;
|
||
while( slen > 0 && ispunct( (second->Name())[ sstart ] ) ) {
|
||
sstart++;
|
||
slen--;
|
||
}
|
||
// check whether strings are ascending
|
||
unsigned int i = 0;
|
||
while (i < first->Name().length() && i < second->Name().length()) {
|
||
if (tolower((first->Name())[i]) < tolower((second->Name())[i]))
|
||
while( fstart + i < first->Name().length() && sstart + i < second->Name().length() ) {
|
||
if( tolower( (first->Name())[ fstart + i ] ) < tolower( (second->Name())[ sstart + i] ) ) {
|
||
return true;
|
||
else if (tolower((first->Name())[i]) > tolower((second->Name())[i]))
|
||
} else if( tolower( (first->Name())[ fstart + i] ) > tolower( (second->Name())[ sstart + i ] ) ) {
|
||
return false;
|
||
}
|
||
++i;
|
||
}
|
||
if (first->Name().length() < second->Name().length())
|
||
return true;
|
||
return false;
|
||
return( flen < slen );
|
||
}
|
||
bool RecordingsItemPtrCompare::ByDescendingName(RecordingsItemPtr & first, RecordingsItemPtr & second)
|
||
{
|
||
unsigned int flen = first->Name().length();
|
||
unsigned int fstart = 0;
|
||
while( flen > 0 && ispunct( (first->Name())[ fstart ] ) ) {
|
||
fstart++;
|
||
flen--;
|
||
}
|
||
// eliminate starting punctuation characters of second string
|
||
unsigned int slen = second->Name().length();
|
||
unsigned int sstart = 0;
|
||
while( slen > 0 && ispunct( (second->Name())[ sstart ] ) ) {
|
||
sstart++;
|
||
slen--;
|
||
}
|
||
// check whether strings are decending
|
||
unsigned int i = 0;
|
||
while (i < first->Name().length() && i < second->Name().length()) {
|
||
if (tolower((second->Name())[i]) < tolower((first->Name())[i]))
|
||
while( fstart + i < first->Name().length() && sstart + i < second->Name().length() ) {
|
||
if( tolower( (first->Name())[ fstart + i ] ) > tolower( (second->Name())[ sstart + i] ) ) {
|
||
return true;
|
||
else if (tolower((second->Name())[i]) > tolower((first->Name())[i]))
|
||
} else if( tolower( (first->Name())[ fstart + i] ) < tolower( (second->Name())[ sstart + i ] ) ) {
|
||
return false;
|
||
}
|
||
++i;
|
||
}
|
||
if (second->Name().length() < first->Name().length())
|
||
return true;
|
||
return false;
|
||
return( flen > slen );
|
||
}
|
||
timers.cpp | ||
---|---|---|
return info.str();
|
||
}
|
||
string SortedTimers::SearchTimerName(cTimer const& timer)
|
||
string SortedTimers::SearchTimerInfo(cTimer const& timer, std::string const& value)
|
||
{
|
||
ostringstream info;
|
||
if (timer.Aux())
|
||
... | ... | |
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();
|
timers.h | ||
---|---|---|
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();
|
- « Previous
- 1
- 2
- 3
- 4
- Next »