MythTV
master
|
#include <algorithm>
#include <QMap>
#include <QUrl>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include "programinfoupdater.h"
#include "mythcorecontext.h"
#include "mythscheduler.h"
#include "mythmiscutil.h"
#include "storagegroup.h"
#include "mythlogging.h"
#include "programinfo.h"
#include "remotefile.h"
#include "remoteutil.h"
#include "mythdb.h"
#include "compat.h"
#include "mythcdrom.h"
#include "mythsorthelper.h"
#include <unistd.h>
#include <cassert>
Go to the source code of this file.
Macros | |
#define | LOC QString("ProgramInfo(%1): ").arg(GetBasename()) |
#define | INT_TO_LIST(x) do { list << QString::number(x); } while (false) |
#define | DATETIME_TO_LIST(x) |
#define | LONGLONG_TO_LIST(x) do { list << QString::number(x); } while (false) |
#define | STR_TO_LIST(x) do { list << (x); } while (false) |
#define | DATE_TO_LIST(x) do { list << (x).toString(Qt::ISODate); } while (false) |
#define | FLOAT_TO_LIST(x) do { list << QString("%1").arg(x); } while (false) |
#define | NEXT_STR() |
#define | INT_FROM_LIST(x) do { NEXT_STR(); (x) = ts.toLongLong(); } while (false) |
#define | ENUM_FROM_LIST(x, y) do { NEXT_STR(); (x) = ((y)ts.toInt()); } while (false) |
#define | DATETIME_FROM_LIST(x) |
#define | DATE_FROM_LIST(x) |
#define | STR_FROM_LIST(x) do { NEXT_STR(); (x) = ts; } while (false) |
#define | FLOAT_FROM_LIST(x) do { NEXT_STR(); (x) = ts.toFloat(); } while (false) |
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 ProgramInfoType | discover_program_info_type (uint chanid, const QString &pathname, bool use_remote) |
static uint | load_markup_datum (MarkTypes type, uint chanid, const QDateTime &recstartts) |
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 | GetNextRecordingList (QDateTime &nextRecordingStart, bool *hasConflicts, vector< ProgramInfo > *list) |
MPUBLIC QString | format_season_and_episode (int seasEp, int digits) |
Variables | |
int | force_init = pginfo_init_statics() |
const static uint | kInvalidDateTime = UINT_MAX |
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 37 of file programinfo.cpp.
#define INT_TO_LIST | ( | x | ) | do { list << QString::number(x); } while (false) |
Definition at line 1247 of file programinfo.cpp.
#define DATETIME_TO_LIST | ( | x | ) |
Definition at line 1249 of file programinfo.cpp.
#define LONGLONG_TO_LIST | ( | x | ) | do { list << QString::number(x); } while (false) |
Definition at line 1257 of file programinfo.cpp.
#define STR_TO_LIST | ( | x | ) | do { list << (x); } while (false) |
Definition at line 1259 of file programinfo.cpp.
Definition at line 1260 of file programinfo.cpp.
Definition at line 1262 of file programinfo.cpp.
#define NEXT_STR | ( | ) |
Definition at line 1334 of file programinfo.cpp.
Definition at line 1342 of file programinfo.cpp.
Definition at line 1343 of file programinfo.cpp.
#define DATETIME_FROM_LIST | ( | x | ) |
Definition at line 1345 of file programinfo.cpp.
#define DATE_FROM_LIST | ( | x | ) |
Definition at line 1353 of file programinfo.cpp.
Definition at line 1358 of file programinfo.cpp.
Definition at line 1360 of file programinfo.cpp.
|
static |
Definition at line 5113 of file programinfo.cpp.
Referenced by ProgramInfo::i18n().
int pginfo_init_statics | ( | ) |
Definition at line 43 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::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(), 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 1017 of file programinfo.cpp.
Referenced by ProgramInfo::operator==().
|
static |
Definition at line 2300 of file programinfo.cpp.
Referenced by ProgramInfo::DiscoverProgramInfoType(), and ProgramInfo::SetPathname().
Definition at line 4235 of file programinfo.cpp.
Referenced by ProgramInfo::QueryAverageFrameRate(), ProgramInfo::QueryAverageHeight(), ProgramInfo::QueryAverageScanProgressive(), ProgramInfo::QueryAverageWidth(), ProgramInfo::QueryTotalDuration(), and ProgramInfo::QueryTotalFrames().
|
static |
Definition at line 5365 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 5460 of file programinfo.cpp.
Referenced by ProgLister::FillItemList(), TVBrowseHelper::GetNextProgramDB(), Guide::GetProgramGuide(), Guide::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 5482 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 5531 of file programinfo.cpp.
ProgramInfo* LoadProgramFromProgram | ( | const uint | chanid, |
const QDateTime & | starttime | ||
) |
Definition at line 5612 of file programinfo.cpp.
Referenced by Dvr::AddDontRecordSchedule(), and Guide::GetProgramDetails().
bool LoadFromOldRecorded | ( | ProgramList & | destination, |
const QString & | sql, | ||
const MSqlBindings & | bindings | ||
) |
Definition at line 5648 of file programinfo.cpp.
Referenced by ProgLister::FillItemList(), Dvr::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 5655 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 | ||
) |
Definition at line 5812 of file programinfo.cpp.
Referenced by LookerUpper::CopyRuleInetrefsToRecordings(), Dvr::GetRecordedList(), LookerUpper::HandleAllArtwork(), LookerUpper::HandleAllRecordings(), and MainServer::HandleQueryRecordings().
bool GetNextRecordingList | ( | QDateTime & | nextRecordingStart, |
bool * | hasConflicts, | ||
vector< ProgramInfo > * | list | ||
) |
Definition at line 6045 of file programinfo.cpp.
Referenced by setScheduledWakeupTime(), and WelcomeDialog::updateScheduledList().
MPUBLIC QString format_season_and_episode | ( | int | seasEp, |
int | digits | ||
) |
Definition at line 6096 of file programinfo.cpp.
Referenced by PlaybackBox::saveRecMetadata(), VideoMetadata::toMap(), ResultItem::toMap(), ProgramInfo::ToMap(), and RecordingSelector::updateRecordingList().
int force_init = pginfo_init_statics() |
Definition at line 46 of file programinfo.cpp.
|
static |
Definition at line 49 of file programinfo.cpp.
|
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 3885 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 3891 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 3897 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 3904 of file programinfo.cpp.
Referenced by ProgramInfo::QueryKeyFrameDuration(), and ProgramInfo::QueryKeyFramePosition().
|
static |
Definition at line 3911 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 3917 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 3923 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().
|
static |
Definition at line 3930 of file programinfo.cpp.
Referenced by ProgramInfo::QueryDurationKeyFrame(), and ProgramInfo::QueryPositionKeyFrame().