Actions
Feature #2568
openNew recording highlighting / Neue Aufnahmen hervorheben
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/18/2018
Due date:
% Done:
0%
Estimated time:
Description
Having new recordings highlighted would be a helpful feature to organise large recording collections.
For example an alternative color or bold font could be sufficient.
If I get some useful hints how to start, I could do something on my own.
Any ideas?
Gruss, Xcoder
Files
Updated by Xcoder about 6 years ago
A first try:
diff -ur vdr-plugin-live-0.3.0+git20160123/pages/recordings.ecpp vdr-plugin-live/pages/recordings.ecpp --- vdr-plugin-live-0.3.0+git20160123/pages/recordings.ecpp 2016-01-23 22:56:47.000000000 +0100 +++ vdr-plugin-live/pages/recordings.ecpp 2018-10-18 23:06:01.612261727 +0200 @@ -250,6 +250,7 @@ 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->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.")); @@ -262,7 +263,7 @@ { </%cpp> <li class="recording"> - <& rec_item_file name=(recItem->Name()) level=(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=(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> } @@ -367,6 +368,7 @@ string duration; string hint; string shortDescr; + string newR; string archived; </%args> <div class="recording_item"> @@ -374,7 +376,7 @@ <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"><a <& tooltip.hint text=(hint) &><& tooltip.display domId=(id) &>><$ newR $><$ 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> diff -ur vdr-plugin-live-0.3.0+git20160123/recman.cpp vdr-plugin-live/recman.cpp --- vdr-plugin-live-0.3.0+git20160123/recman.cpp 2016-01-23 22:56:47.000000000 +0100 +++ vdr-plugin-live/recman.cpp 2018-10-18 21:45:12.917613874 +0200 @@ -401,6 +401,12 @@ return RecLength; } + long RecordingsItemRec::GetResume() const + { + if (!m_recording->FileName()) return 0; + return m_recording->GetResume(); + } + /** * Implementation of class RecordingsTree: */ diff -ur vdr-plugin-live-0.3.0+git20160123/recman.h vdr-plugin-live/recman.h --- vdr-plugin-live-0.3.0+git20160123/recman.h 2016-01-23 22:56:47.000000000 +0100 +++ vdr-plugin-live/recman.h 2018-10-18 21:41:53.877834471 +0200 @@ -161,6 +161,7 @@ virtual time_t StartTime() const = 0; virtual bool IsDir() const = 0; virtual long Duration() const = 0; + virtual long GetResume() const = 0; virtual const std::string& Name() const { return m_name; } virtual const std::string Id() const = 0; @@ -191,6 +192,7 @@ virtual time_t StartTime() const { return 0; } virtual long Duration() const { return 0; } virtual bool IsDir() const { return true; } + virtual long GetResume() const { return 0; } virtual std::string const Id() const { return ""; } private: @@ -213,6 +215,7 @@ virtual time_t StartTime() const; virtual long Duration() const; virtual bool IsDir() const { return false; } + virtual long GetResume() const; virtual const std::string Id() const { return m_id; } virtual const cRecording* Recording() const { return m_recording; }
Updated by Xcoder about 6 years ago
Some more features added.
Updated by Xcoder about 6 years ago
Small fix added.
Updated by Xcoder about 6 years ago
Multilevel directories are now properly highlighted as well.
Updated by Xcoder about 6 years ago
Included recsort patch from shofmann
Actions