|
MythTV master
|
#include <unistd.h>#include <algorithm>#include <QMap>#include <QUrl>#include <QFile>#include <QFileInfo>#include <QDir>#include <QTimeZone>#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 "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 | delete_markup_datum (MarkTypes type, uint mark, 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, ProgGroupBy::Type groupBy) |
| 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, ProgGroupBy::Type groupBy) |
| bool | LoadFromProgram (ProgramList &destination, const QString &sql, const MSqlBindings &bindings, const ProgramList &schedList, const uint start, const uint limit, uint &count, ProgGroupBy::Type groupBy) |
| 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) |
| bool | RemoteCheckFile (ProgramInfo *pginfo, bool checkSlaves) |
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 DEFINE_FLAGS_NAMES |
Definition at line 48 of file programinfo.cpp.
| #define LOC QString("ProgramInfo(%1): ").arg(GetBasename()) |
Definition at line 33 of file programinfo.cpp.
| #define NEXT_STR | ( | ) |
Definition at line 1340 of file programinfo.cpp.
|
inlinestatic |
Definition at line 1355 of file programinfo.cpp.
Referenced by ProgramInfo::FromStringList().
|
inlinestatic |
Definition at line 1348 of file programinfo.cpp.
Referenced by ProgramInfo::FromStringList().
|
inlinestatic |
Definition at line 1263 of file programinfo.cpp.
Referenced by ProgramInfo::ToStringList().
|
static |
Definition at line 4362 of file programinfo.cpp.
|
static |
Definition at line 4344 of file programinfo.cpp.
Referenced by ProgramInfo::SaveTotalDuration(), and ProgramInfo::SaveTotalFrames().
Definition at line 4378 of file programinfo.cpp.
|
static |
Definition at line 89 of file programinfo.cpp.
Referenced by discover_program_info_type(), and ProgramInfo::ProgramInfo().
|
static |
Definition at line 2422 of file programinfo.cpp.
Referenced by ProgramInfo::DiscoverProgramInfoType(), and ProgramInfo::SetPathname().
|
static |
Definition at line 5682 of file programinfo.cpp.
Referenced by LoadFromProgram().
| bool GetNextRecordingList | ( | QDateTime & | nextRecordingStart, |
| bool * | hasConflicts, | ||
| std::vector< ProgramInfo > * | list | ||
| ) |
Definition at line 6451 of file programinfo.cpp.
Referenced by setScheduledWakeupTime(), and WelcomeDialog::updateScheduledList().
|
static |
Definition at line 5426 of file programinfo.cpp.
Referenced by ProgramInfo::i18n().
|
static |
Definition at line 4413 of file programinfo.cpp.
|
static |
Definition at line 4395 of file programinfo.cpp.
Referenced by ProgramInfo::SaveTotalDuration(), and ProgramInfo::SaveTotalFrames().
Definition at line 4543 of file programinfo.cpp.
Definition at line 4507 of file programinfo.cpp.
Referenced by ProgramInfo::QueryAverageFrameRate(), ProgramInfo::QueryAverageHeight(), ProgramInfo::QueryAverageScanProgressive(), ProgramInfo::QueryAverageWidth(), ProgramInfo::QueryTotalDuration(), and ProgramInfo::QueryTotalFrames().
| bool LoadFromOldRecorded | ( | ProgramList & | destination, |
| const QString & | sql, | ||
| const MSqlBindings & | bindings | ||
| ) |
Definition at line 5988 of file programinfo.cpp.
Referenced by ProgLister::FillItemList(), 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 5995 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, | ||
| ProgGroupBy::Type | groupBy | ||
| ) |
Definition at line 5870 of file programinfo.cpp.
| bool LoadFromProgram | ( | ProgramList & | destination, |
| const QString & | sql, | ||
| const MSqlBindings & | bindings, | ||
| const ProgramList & | schedList, | ||
| ProgGroupBy::Type | groupBy | ||
| ) |
Definition at line 5830 of file programinfo.cpp.
| bool LoadFromProgram | ( | ProgramList & | destination, |
| const QString & | where, | ||
| const QString & | groupBy, | ||
| const QString & | orderBy, | ||
| const MSqlBindings & | bindings, | ||
| const ProgramList & | schedList | ||
| ) |
Definition at line 5807 of file programinfo.cpp.
Referenced by ProgLister::FillItemList(), TVBrowseHelper::GetNextProgramDB(), V2Guide::GetProgramGuide(), V2Guide::GetProgramList(), GuideGrid::GetProgramList(), GuideGrid::getProgramListFromProgram(), LoadFromProgram(), LoadProgramFromProgram(), RecordingInfo::RecordingInfo(), and ProgFinder::selectShowData().
| 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 6153 of file programinfo.cpp.
Referenced by LookerUpper::CopyRuleInetrefsToRecordings(), V2Dvr::GetRecordedList(), LookerUpper::HandleAllArtwork(), LookerUpper::HandleAllRecordings(), and MainServer::HandleQueryRecordings().
| ProgramInfo * LoadProgramFromProgram | ( | const uint | chanid, |
| const QDateTime & | starttime | ||
| ) |
Definition at line 5952 of file programinfo.cpp.
Referenced by V2Dvr::AddDontRecordSchedule(), V2Dvr::AllowReRecord(), and V2Guide::GetProgramDetails().
| 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().
| int pginfo_init_statics | ( | void | ) |
Definition at line 39 of file programinfo.cpp.
| uint propsValueFromString | ( | const QString & | name, |
| const QMap< T, QString > & | propNames, | ||
| const QString & | props | ||
| ) |
Definition at line 1483 of file programinfo.cpp.
Referenced by ProgramInfo::AudioPropertiesFromNames(), ProgramInfo::ProgramFlagsFromNames(), ProgramInfo::SubtitleTypesFromNames(), and ProgramInfo::VideoPropertiesFromNames().
| QString propsValueToString | ( | const QString & | name, |
| QMap< T, QString > | propNames, | ||
| T | props | ||
| ) |
Definition at line 1457 of file programinfo.cpp.
Referenced by ProgramInfo::GetAudioPropertyNames(), ProgramInfo::GetProgramFlagNames(), ProgramInfo::GetSubtitleTypeNames(), and ProgramInfo::GetVideoPropertyNames().
| 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 1031 of file programinfo.cpp.
Referenced by ProgramInfo::operator==().
| bool RemoteCheckFile | ( | ProgramInfo * | pginfo, |
| bool | checkSlaves | ||
| ) |
Definition at line 6681 of file programinfo.cpp.
Referenced by ProgramInfo::GetPlaybackURL(), and ProgramInfo::IsFileReadable().
|
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().
| ProgramInfo::CategoryType string_to_myth_category_type | ( | const QString & | category_type | ) |
Definition at line 137 of file programinfo.cpp.
Referenced by Scheduler::AddNewRecords(), V2Dvr::AddRecordedProgram(), DBEvent::GetOverlappingPrograms(), LoadFromProgram(), LoadFromRecorded(), ProgramInfo::LoadProgramFromRecorded(), XMLTVParser::parseFile(), and ProgramInfo::QueryCategoryType().
| int force_init = pginfo_init_statics() |
Definition at line 42 of file programinfo.cpp.
|
static |
Definition at line 4114 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4120 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4088 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4094 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4126 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4133 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 4100 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 4107 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 125 of file programinfo.cpp.
Referenced by myth_category_type_to_string(), and string_to_myth_category_type().
|
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().