%pre>
#include "recordings.h"
#include "tools.h"
using namespace vdrlive;
%pre>
<%args>
path[];
%args>
<{
esyslog("DH: in component 'recordings_item' path elements are:");
for (path_type::const_iterator i = path.begin(); i != path.end(); ++i) {
esyslog("DH: %s", (*i).c_str());
}
RecordingsTree& recordingsTree = LiveRecordingsTree();
bool active = false;
RecordingsTree::Map::iterator iter;
RecordingsTree::Map::iterator end = recordingsTree.end(path);
for (iter = recordingsTree.begin(path); iter != end; iter++) {
RecordingsTree::RecordingsItemPtr recItem = iter->second;
active = !active;
}>
- ">
% if (recItem->IsDir()) {
<$ recItem->StartTime() $>
<$ recItem->StartTime() $>
% } else {
<$ FormatDateTime(tr("%a, %b %d"), recItem->StartTime()) $>
<$ FormatDateTime(tr("%I:%M %p"), recItem->StartTime()) $>
% }
<$ recItem->Name() $>
<{
if (recItem->IsDir()) {
cxxtools::QueryParams recItemParams(qparam, false);
for (path_type::const_iterator i = path.begin(); i != path.end(); ++i) {
recItemParams.add("path", *i);
}
recItemParams.add("path", recItem->Name());
callComp("recordings_item", request, reply, recItemParams);
}
}>
<{
}
}>