MythTV
master
|
#include <unistd.h>
#include <algorithm>
#include <QMap>
#include <QUrl>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include "libmythbase/compat.h"
#include "libmythbase/mythcdrom.h"
#include "libmythbase/mythcorecontext.h"
#include "libmythbase/mythdb.h"
#include "libmythbase/mythlogging.h"
#include "libmythbase/mythmiscutil.h"
#include "libmythbase/mythscheduler.h"
#include "libmythbase/mythsorthelper.h"
#include "libmythbase/remotefile.h"
#include "libmythbase/storagegroup.h"
#include "libmythbase/stringutil.h"
#include "programinfo.h"
#include "programinfoupdater.h"
#include "remoteutil.h"
#include "libmythbase/programtypeflags.h"
Go to the source code of this file.
Macros | |
#define | LOC QString("ProgramInfo(%1): ").arg(GetBasename()) |
#define | DEFINE_FLAGS_NAMES |
#define | NEXT_STR() |
Functions | |
static int | init_tr (void) |
int | pginfo_init_statics () |
static void | set_flag (uint32_t &flags, int flag_to_set, bool is_set) |
static QString | determineURLType (const QString &url) |
QString | myth_category_type_to_string (ProgramInfo::CategoryType category_type) |
ProgramInfo::CategoryType | string_to_myth_category_type (const QString &category_type) |
bool | qstringEqualOrDefault (const QString &a, const QString &b) |
static QString | DateTimeToListInt (const QDateTime &x) |
static QDateTime | DateTimeFromListItem (const QString &str) |
static QDate | DateFromListItem (const QString &str) |
template<typename T > | |
QString | propsValueToString (const QString &name, QMap< T, QString > propNames, T props) |
template<typename T > | |
uint | propsValueFromString (const QString &name, const QMap< T, QString > &propNames, const QString &props) |
static ProgramInfoType | discover_program_info_type (uint chanid, const QString &pathname, bool use_remote) |
static void | delete_markup_datum (MarkTypes type, uint chanid, const QDateTime &recstartts) |
static void | delete_markup_datum (MarkTypes type, const QString &videoPath) |
static void | insert_markup_datum (MarkTypes type, uint mark, uint offset, const QString &videoPath) |
static void | insert_markup_datum (MarkTypes type, uint mark, uint data, uint chanid, const QDateTime &recstartts) |
static uint | load_markup_datum (MarkTypes type, uint chanid, const QDateTime &recstartts) |
static uint | load_markup_datum (MarkTypes type, const QString &videoPath) |
static bool | FromProgramQuery (const QString &sql, const MSqlBindings &bindings, MSqlQuery &query, const uint start, const uint limit, uint &count) |
bool | LoadFromProgram (ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList) |
bool | LoadFromProgram (ProgramList &destination, const QString &sql, const MSqlBindings &bindings, const ProgramList &schedList) |
bool | LoadFromProgram (ProgramList &destination, const QString &sql, const MSqlBindings &bindings, const ProgramList &schedList, const uint start, const uint limit, uint &count) |
ProgramInfo * | LoadProgramFromProgram (const uint chanid, const QDateTime &starttime) |
bool | LoadFromOldRecorded (ProgramList &destination, const QString &sql, const MSqlBindings &bindings) |
bool | LoadFromOldRecorded (ProgramList &destination, const QString &sql, const MSqlBindings &bindings, const uint start, const uint limit, uint &count) |
bool | LoadFromRecorded (ProgramList &destination, bool possiblyInProgressRecordingsOnly, const QMap< QString, uint32_t > &inUseMap, const QMap< QString, bool > &isJobRunning, const QMap< QString, ProgramInfo * > &recMap, int sort, const QString &sortBy, bool ignoreLiveTV, bool ignoreDeleted) |
bool | GetNextRecordingList (QDateTime &nextRecordingStart, bool *hasConflicts, std::vector< ProgramInfo > *list) |
Variables | |
int | force_init = pginfo_init_statics() |
static constexpr uint | kInvalidDateTime { UINT_MAX } |
static constexpr int64_t | kLastUpdateOffset { 61LL * 60 } |
static const std::array< const QString, ProgramInfo::kNumCatTypes > | kCatName { "", "movie", "series", "sports", "tvshow" } |
static const char * | from_filemarkup_offset_asc |
static const char * | from_filemarkup_offset_desc |
static const char * | from_recordedseek_offset_asc |
static const char * | from_recordedseek_offset_desc |
static const char * | from_filemarkup_mark_asc |
static const char * | from_filemarkup_mark_desc |
static const char * | from_recordedseek_mark_asc |
static const char * | from_recordedseek_mark_desc |
#define LOC QString("ProgramInfo(%1): ").arg(GetBasename()) |
Definition at line 33 of file programinfo.cpp.
#define DEFINE_FLAGS_NAMES |
Definition at line 48 of file programinfo.cpp.
#define NEXT_STR | ( | ) |
Definition at line 1335 of file programinfo.cpp.
|
static |
Definition at line 5387 of file programinfo.cpp.
Referenced by ProgramInfo::i18n().
int pginfo_init_statics | ( | ) |
Definition at line 39 of file programinfo.cpp.
|
static |
Definition at line 82 of file programinfo.cpp.
Referenced by LoadFromRecorded(), ProgramInfo::LoadProgramFromRecorded(), ProgramInfo::ProgramInfo(), ProgramInfo::SaveAutoExpire(), ProgramInfo::SaveBookmark(), ProgramInfo::SaveCommFlagged(), ProgramInfo::SaveDeletePendingFlag(), ProgramInfo::SaveEditing(), ProgramInfo::SaveLastPlayPos(), ProgramInfo::SavePreserve(), ProgramInfo::SaveTranscodeStatus(), and ProgramInfo::SaveWatched().
|
static |
Definition at line 89 of file programinfo.cpp.
Referenced by discover_program_info_type(), and ProgramInfo::ProgramInfo().
QString myth_category_type_to_string | ( | ProgramInfo::CategoryType | category_type | ) |
Definition at line 128 of file programinfo.cpp.
Referenced by ProgramInfo::GetCategoryTypeString(), DBEvent::InsertDB(), ProgInfo::InsertDB(), ProgramData::IsUnchanged(), XMLTVParser::parseFile(), ProgramInfo::ToMap(), ContentDescriptor::toString(), and DBEvent::UpdateDB().
ProgramInfo::CategoryType string_to_myth_category_type | ( | const QString & | category_type | ) |
Definition at line 137 of file programinfo.cpp.
Referenced by Scheduler::AddNewRecords(), Dvr::AddRecordedProgram(), V2Dvr::AddRecordedProgram(), DBEvent::GetOverlappingPrograms(), LoadFromProgram(), LoadFromRecorded(), ProgramInfo::LoadProgramFromRecorded(), XMLTVParser::parseFile(), and ProgramInfo::QueryCategoryType().
bool qstringEqualOrDefault | ( | const QString & | a, |
const QString & | b | ||
) |
Compare two QStrings when they can either be initialized to "Default" or to the empty string.
Definition at line 1026 of file programinfo.cpp.
Referenced by ProgramInfo::operator==().
|
inlinestatic |
Definition at line 1258 of file programinfo.cpp.
Referenced by ProgramInfo::ToStringList().
|
inlinestatic |
Definition at line 1343 of file programinfo.cpp.
Referenced by ProgramInfo::FromStringList().
|
inlinestatic |
Definition at line 1350 of file programinfo.cpp.
Referenced by ProgramInfo::FromStringList().
QString propsValueToString | ( | const QString & | name, |
QMap< T, QString > | propNames, | ||
T | props | ||
) |
Definition at line 1452 of file programinfo.cpp.
Referenced by ProgramInfo::GetAudioPropertyNames(), ProgramInfo::GetProgramFlagNames(), ProgramInfo::GetSubtitleTypeNames(), and ProgramInfo::GetVideoPropertyNames().
uint propsValueFromString | ( | const QString & | name, |
const QMap< T, QString > & | propNames, | ||
const QString & | props | ||
) |
Definition at line 1478 of file programinfo.cpp.
Referenced by ProgramInfo::AudioPropertiesFromNames(), ProgramInfo::ProgramFlagsFromNames(), ProgramInfo::SubtitleTypesFromNames(), and ProgramInfo::VideoPropertiesFromNames().
|
static |
Definition at line 2407 of file programinfo.cpp.
Referenced by ProgramInfo::DiscoverProgramInfoType(), and ProgramInfo::SetPathname().
|
static |
Definition at line 4329 of file programinfo.cpp.
Referenced by ProgramInfo::SaveTotalDuration(), and ProgramInfo::SaveTotalFrames().
|
static |
Definition at line 4346 of file programinfo.cpp.
|
static |
Definition at line 4361 of file programinfo.cpp.
Referenced by ProgramInfo::SaveTotalDuration(), and ProgramInfo::SaveTotalFrames().
|
static |
Definition at line 4379 of file programinfo.cpp.
Definition at line 4468 of file programinfo.cpp.
Referenced by ProgramInfo::QueryAverageFrameRate(), ProgramInfo::QueryAverageHeight(), ProgramInfo::QueryAverageScanProgressive(), ProgramInfo::QueryAverageWidth(), ProgramInfo::QueryTotalDuration(), and ProgramInfo::QueryTotalFrames().
Definition at line 4504 of file programinfo.cpp.
|
static |
Definition at line 5643 of file programinfo.cpp.
Referenced by LoadFromProgram().
bool LoadFromProgram | ( | ProgramList & | destination, |
const QString & | where, | ||
const QString & | groupBy, | ||
const QString & | orderBy, | ||
const MSqlBindings & | bindings, | ||
const ProgramList & | schedList | ||
) |
Definition at line 5738 of file programinfo.cpp.
Referenced by ProgLister::FillItemList(), TVBrowseHelper::GetNextProgramDB(), Guide::GetProgramGuide(), V2Guide::GetProgramGuide(), Guide::GetProgramList(), V2Guide::GetProgramList(), GuideGrid::GetProgramList(), GuideGrid::getProgramListFromProgram(), LoadFromProgram(), LoadProgramFromProgram(), RecordingInfo::RecordingInfo(), and ProgFinder::selectShowData().
bool LoadFromProgram | ( | ProgramList & | destination, |
const QString & | sql, | ||
const MSqlBindings & | bindings, | ||
const ProgramList & | schedList | ||
) |
Definition at line 5760 of file programinfo.cpp.
bool LoadFromProgram | ( | ProgramList & | destination, |
const QString & | sql, | ||
const MSqlBindings & | bindings, | ||
const ProgramList & | schedList, | ||
const uint | start, | ||
const uint | limit, | ||
uint & | count | ||
) |
Definition at line 5809 of file programinfo.cpp.
ProgramInfo* LoadProgramFromProgram | ( | const uint | chanid, |
const QDateTime & | starttime | ||
) |
Definition at line 5890 of file programinfo.cpp.
Referenced by Dvr::AddDontRecordSchedule(), V2Dvr::AddDontRecordSchedule(), V2Dvr::AllowReRecord(), Guide::GetProgramDetails(), and V2Guide::GetProgramDetails().
bool LoadFromOldRecorded | ( | ProgramList & | destination, |
const QString & | sql, | ||
const MSqlBindings & | bindings | ||
) |
Definition at line 5926 of file programinfo.cpp.
Referenced by ProgLister::FillItemList(), Dvr::GetOldRecordedList(), V2Dvr::GetOldRecordedList(), LoadFromOldRecorded(), PrevRecordedList::LoadShowsByDate(), and PrevRecordedList::LoadShowsByTitle().
bool LoadFromOldRecorded | ( | ProgramList & | destination, |
const QString & | sql, | ||
const MSqlBindings & | bindings, | ||
const uint | start, | ||
const uint | limit, | ||
uint & | count | ||
) |
Definition at line 5933 of file programinfo.cpp.
bool LoadFromRecorded | ( | ProgramList & | destination, |
bool | possiblyInProgressRecordingsOnly, | ||
const QMap< QString, uint32_t > & | inUseMap, | ||
const QMap< QString, bool > & | isJobRunning, | ||
const QMap< QString, ProgramInfo * > & | recMap, | ||
int | sort, | ||
const QString & | sortBy, | ||
bool | ignoreLiveTV, | ||
bool | ignoreDeleted | ||
) |
Definition at line 6091 of file programinfo.cpp.
Referenced by LookerUpper::CopyRuleInetrefsToRecordings(), Dvr::GetRecordedList(), V2Dvr::GetRecordedList(), LookerUpper::HandleAllArtwork(), LookerUpper::HandleAllRecordings(), and MainServer::HandleQueryRecordings().
bool GetNextRecordingList | ( | QDateTime & | nextRecordingStart, |
bool * | hasConflicts, | ||
std::vector< ProgramInfo > * | list | ||
) |
Definition at line 6344 of file programinfo.cpp.
Referenced by setScheduledWakeupTime(), and WelcomeDialog::updateScheduledList().
int force_init = pginfo_init_statics() |
Definition at line 42 of file programinfo.cpp.
|
staticconstexpr |
Definition at line 45 of file programinfo.cpp.
Referenced by DateTimeFromListItem(), and DateTimeToListInt().
|
staticconstexpr |
Definition at line 46 of file programinfo.cpp.
Referenced by ProgramInfo::MarkAsInUse(), ProgramInfo::QueryInUseMap(), and ProgramInfo::QueryIsInUse().
|
static |
Definition at line 126 of file programinfo.cpp.
Referenced by myth_category_type_to_string(), and string_to_myth_category_type().
|
static |
Definition at line 4073 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4079 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4085 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4092 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4099 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4105 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4111 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4118 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().