Skip to content

Commit

Permalink
edit_timer. cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Ehrnsperger committed Jan 3, 2024
1 parent 6f3025c commit 855600c
Show file tree
Hide file tree
Showing 26 changed files with 157 additions and 443 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ VERSIONSUFFIX = gen_version_suffix.h
PLUGINOBJS := $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o timers.o \
tools.o recman.o tasks.o status.o epg_events.o epgsearch.o \
grab.o md5.o filecache.o livefeatures.o preload.o timerconflict.o \
users.o osd_status.o ffmpeg.o StringMatch.o largeString.o xxhash.o
users.o osd_status.o ffmpeg.o StringMatch.o xxhash.o
PLUGINSRCS := $(patsubst %.o,%.cpp,$(PLUGINOBJS))

WEB_LIB_PAGES := libpages.a
Expand Down
20 changes: 10 additions & 10 deletions epg_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ namespace vdrlive

const std::string EpgInfo::CurrentTime(const char* format) const
{
return FormatDateTime(format, time(0));
return std::string(cToSvDateTime(format, time(0)));
}

const std::string EpgInfo::StartTime(const char* format) const
{
time_t start = GetStartTime();
return start ? FormatDateTime(format, start) : "";
return start ? std::string(cToSvDateTime(format, start)) : "";
}

const std::string EpgInfo::EndTime(const char* format) const
{
time_t end = GetEndTime();
return end ? FormatDateTime(format, end) : "";
return end ? std::string(cToSvDateTime(format, end)) : "";
}

int EpgInfo::Elapsed() const
Expand Down Expand Up @@ -268,7 +268,7 @@ namespace vdrlive
{
std::string eventId("event_");

eventId += vdrlive::EncodeDomId(cToSvChannel(chanId), ".-", "pm");
eventId += vdrlive::EncodeDomId(cToSvConcat(chanId), ".-", "pm");
eventId += '_';
eventId += cSv(cToSvInt(eId));
return eventId;
Expand Down Expand Up @@ -485,7 +485,7 @@ namespace vdrlive

} // namespace EpgEvents

void AppendScraperData(cLargeString &target, cScraperVideo *scraperVideo) {
void AppendScraperData(cToSvConcat<0> &target, cScraperVideo *scraperVideo) {
cTvMedia s_image;
std::string s_title, s_episode_name, s_IMDB_ID, s_release_date;
if (scraperVideo == NULL) {
Expand All @@ -499,7 +499,7 @@ void AppendScraperData(cLargeString &target, cScraperVideo *scraperVideo) {
cOrientations(eOrientation::landscape, eOrientation::portrait, eOrientation::banner), false);
AppendScraperData(target, s_IMDB_ID, s_image, scraperVideo->getVideoType(), s_title, scraperVideo->getSeasonNumber(), scraperVideo->getEpisodeNumber(), s_episode_name, s_runtime, s_release_date);
}
bool appendEpgItem(cLargeString &epg_item, RecordingsItemRecPtr &recItem, const cEvent *Event, const cChannel *Channel, bool withChannel) {
bool appendEpgItem(cToSvConcat<0> &epg_item, RecordingsItemRecPtr &recItem, const cEvent *Event, const cChannel *Channel, bool withChannel) {
cGetScraperVideo getScraperVideo(Event, NULL);
getScraperVideo.call(LiveSetup().GetPluginScraper());

Expand All @@ -509,7 +509,7 @@ bool appendEpgItem(cLargeString &epg_item, RecordingsItemRecPtr &recItem, const

epg_item.append("[\"");
// [0] : EPG ID (without event_)
epg_item.appendS(EpgEvents::EncodeDomId(Channel->GetChannelID(), Event->EventID()).c_str() + 6);
epg_item.append(EpgEvents::EncodeDomId(Channel->GetChannelID(), Event->EventID()).c_str() + 6);
epg_item.append("\",\"");
// [1] : Timer ID
const cTimer* timer = LiveTimerManager().GetTimer(Event->EventID(), Channel->GetChannelID() );
Expand All @@ -520,7 +520,7 @@ bool appendEpgItem(cLargeString &epg_item, RecordingsItemRecPtr &recItem, const
epg_item.append(",");
// [9] : channelnr
if (withChannel) {
epg_item.append(Channel->Number());
epg_item.concat(Channel->Number());
epg_item.append(",\"");
// [10] : channelname
AppendHtmlEscapedAndCorrectNonUTF8(epg_item, Channel->Name() );
Expand All @@ -536,9 +536,9 @@ bool appendEpgItem(cLargeString &epg_item, RecordingsItemRecPtr &recItem, const
AppendTextTruncateOnWord(epg_item, Event->Description(), LiveSetup().GetMaxTooltipChars(), true);
epg_item.append("\",\"");
// [14] : Day, time & duration of event
AppendDateTime(epg_item, tr("%I:%M %p"), Event->StartTime() );
epg_item.appendDateTime(tr("%I:%M %p"), Event->StartTime() );
epg_item.append(" - ");
AppendDateTime(epg_item, tr("%I:%M %p"), Event->EndTime() );
epg_item.appendDateTime(tr("%I:%M %p"), Event->EndTime() );
epg_item.append(" ");
AppendDuration(epg_item, tr("(%d:%02d)"), Event->Duration());
epg_item.append("\"]");
Expand Down
2 changes: 1 addition & 1 deletion epg_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ namespace vdrlive
mutable bool m_checkedArchived;
mutable std::string m_archived;
};
bool appendEpgItem(cLargeString &epg_item, RecordingsItemRecPtr &recItem, const cEvent *Event, const cChannel *Channel, bool withChannel);
bool appendEpgItem(cToSvConcat<0> &epg_item, RecordingsItemRecPtr &recItem, const cEvent *Event, const cChannel *Channel, bool withChannel);
}; // namespace vdrlive

#endif // VDR_LIVE_EPG_EVENTS_H
4 changes: 2 additions & 2 deletions epgsearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ void SearchTimer::ParseBlacklist( std::string const& data )
std::string SearchTimer::StartTimeFormatted()
{
time_t start = cTimer::SetTime(time(NULL), (((StartTime() / 100 ) % 100) * 60 * 60) + (StartTime() % 100 * 60));
return FormatDateTime(tr("%I:%M %p"), start);
return std::string(cToSvDateTime(tr("%I:%M %p"), start));
}

std::string SearchTimer::StopTimeFormatted()
{
time_t stop = cTimer::SetTime(time(NULL), (((StopTime() / 100 ) % 100) * 60 * 60) + (StopTime() % 100 * 60));
return FormatDateTime(tr("%I:%M %p"), stop);
return std::string(cToSvDateTime(tr("%I:%M %p"), stop));
}

std::string SearchTimer::UseAsSearchTimerFrom(std::string const& format)
Expand Down
88 changes: 0 additions & 88 deletions largeString.cpp

This file was deleted.

137 changes: 0 additions & 137 deletions largeString.h

This file was deleted.

Loading

0 comments on commit 855600c

Please sign in to comment.