9#include "libmythbase/mythversion.h"
32 qRegisterMetaType<V2VideoMetadataInfo*>(
"V2VideoMetadataInfo");
33 qRegisterMetaType<V2VideoMetadataInfoList*>(
"V2VideoMetadataInfoList");
34 qRegisterMetaType<V2VideoLookupList*>(
"V2VideoLookupList");
35 qRegisterMetaType<V2BlurayInfo*>(
"V2BlurayInfo");
36 qRegisterMetaType<V2VideoStreamInfoList*>(
"V2VideoStreamInfoList");
37 qRegisterMetaType<V2VideoStreamInfo*>(
"V2VideoStreamInfo");
38 qRegisterMetaType<V2ArtworkInfoList*>(
"V2ArtworkInfoList");
39 qRegisterMetaType<V2ArtworkInfo*>(
"V2ArtworkInfo");
40 qRegisterMetaType<V2CastMemberList*>(
"V2CastMemberList");
41 qRegisterMetaType<V2CastMember*>(
"V2CastMember");
42 qRegisterMetaType<V2GenreList*>(
"V2GenreList");
43 qRegisterMetaType<V2Genre*>(
"V2Genre");
44 qRegisterMetaType<V2VideoLookupList*>(
"V2VideoLookupList");
45 qRegisterMetaType<V2VideoLookup*>(
"V2VideoLookup");
46 qRegisterMetaType<V2ArtworkItem*>(
"V2ArtworkItem");
47 qRegisterMetaType<V2CutList*>(
"V2CutList");
48 qRegisterMetaType<V2Cutting*>(
"V2Cutting");
49 qRegisterMetaType<V2VideoCategory*>(
"V2VideoCategory");
50 qRegisterMetaType<V2VideoCategoryList*>(
"V2VideoCategoryList");
64 throw( QString(
"No metadata found for selected ID!." ));
70 return pVideoMetadataInfo;
78 mlm->setList(videolist);
82 throw( QString(
"No metadata found for selected filename!." ));
88 return pVideoMetadataInfo;
100 query.
prepare(
"SELECT filename "
101 "FROM videometadata "
102 "WHERE intid = :ID ");
114 fileName = query.
value(0).toString();
117 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetSavedBookmark Video id %1 Not found.").arg(Id));
147 query.
prepare(
"SELECT filename "
148 "FROM videometadata "
149 "WHERE intid = :ID ");
161 fileName = query.
value(0).toString();
164 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetLastPlayPos Video id %1 Not found.").arg(Id));
207 const QString &TitleRegEx,
212 bool CollapseSubDirs )
214 QString fields =
"title,director,studio,plot,rating,year,releasedate,"
215 "userrating,length,playcount,filename,hash,showlevel,"
216 "coverfile,inetref,collectionref,homepage,childid,browse,watched,"
217 "playcommand,category,intid,trailer,screenshot,banner,fanart,"
218 "subtitle,tagline,season,episode,host,insertdate,processed,contenttype";
220 QStringList sortFields = fields.split(
',');
226 QStringList bindValues;
228 if (!Folder.isEmpty())
230 if (Folder.endsWith(
'/'))
233 folder = Folder +
"/";
234 sql.append(
" WHERE filename LIKE :BIND0 ");
235 bindValues.append(folder +
"%");
237 if (!TitleRegEx.isEmpty())
239 if (bindValues.empty())
241 sql.append(
" WHERE ");
247 sql.append(
" title REGEXP :BIND" + QString::number(bindValues.size()) +
" ");
248 bindValues.append(TitleRegEx);
252 if (bindValues.empty())
254 sql.append(
" WHERE ");
260 sql.append(
" category = :BIND" + QString::number(bindValues.size()) +
" ");
261 bindValues.append( QString::number(Category) );
263 sql.append(
" ORDER BY ");
264 QString defSeq =
" ASC";
268 QStringList sortList = Sort.toLower().split(
',',Qt::SkipEmptyParts);
270 for (
const auto & item : std::as_const(sortList))
272 QStringList partList = item.split(
' ',Qt::SkipEmptyParts);
273 if (partList.empty())
275 QString sort = partList[0];
278 else if (sort ==
"released")
279 sort =
"releasedate";
280 if (sortFields.contains(sort))
287 QString prefixes = sh->getPrefixes();
288 sort =
"REGEXP_REPLACE(title,'" + prefixes +
"','')";
290 else if (sort ==
"subtitle")
293 QString prefixes = sh->getPrefixes();
294 sort =
"REGEXP_REPLACE(subtitle,'" + prefixes +
"','')";
297 if (partList.length() > 1 && partList[1].compare(
"DESC",Qt::CaseInsensitive) == 0)
299 else if (partList.length() > 1 && partList[1].compare(
"ASC",Qt::CaseInsensitive) == 0)
313 std::vector<VideoMetadataListManager::VideoMetadataPtr> videos(videolist.begin(), videolist.end());
320 QMap<QString, QString> map;
321 int folderlen = folder.length();
323 nStartIndex = (nStartIndex > 0) ? std::min( nStartIndex, (
int)videos.size() ) : 0;
324 int selectedCount = 0;
331 for(
const auto& metadata : videos )
335 QString fnPart = metadata->GetFilename().mid(folderlen);
336 int slashPos = fnPart.indexOf(
'/',1);
339 dir = fnPart.mid(0, slashPos);
340 QString key = dir.toLower();
342 key = sh->doTitle(key);
343 if (!map.contains(key))
344 map.insert(key, dir);
349 QMapIterator<QString, QString> it(map);
353 while (bDescending? it.hasPrevious() : it.hasNext())
359 if (totalCount >= nStartIndex && (nCount == 0 || selectedCount < nCount)) {
361 pVideoMetadataInfos->AddNewVideoMetadataInfo();
362 pVideoMetadataInfo->setContentType(
"DIRECTORY");
363 pVideoMetadataInfo->setFileName(folder + it.value());
364 pVideoMetadataInfo->setTitle(it.value());
371 for(
const auto& metadata : videos )
378 QString fnPart = metadata->GetFilename().mid(folderlen);
379 int slashPos = fnPart.indexOf(
'/',1);
384 if (totalCount >= nStartIndex && (nCount == 0 || selectedCount < nCount)) {
397 totalPages = (int)ceil((
float)totalCount / nCount);
403 curPage = (int)ceil((
float)nStartIndex / nCount) + 1;
406 pVideoMetadataInfos->setStartIndex ( nStartIndex );
407 pVideoMetadataInfos->setCount ( selectedCount );
408 pVideoMetadataInfos->setCurrentPage ( curPage );
409 pVideoMetadataInfos->setTotalPages ( totalPages );
410 pVideoMetadataInfos->setTotalAvailable( totalCount );
412 pVideoMetadataInfos->setVersion ( MYTH_BINARY_VERSION );
413 pVideoMetadataInfos->setProtoVer ( MYTH_PROTO_VERSION );
415 return pVideoMetadataInfos;
420 const QString &Subtitle,
421 const QString &Inetref,
435 list = factory->SynchronousLookup(Title, Subtitle,
436 Inetref, Season, Episode,
441 return pVideoLookups;
445 for(
const auto & lookup : std::as_const(list))
447 V2VideoLookup *pVideoLookup = pVideoLookups->AddNewVideoLookup();
451 pVideoLookup->setTitle(lookup->GetTitle());
452 pVideoLookup->setSubTitle(lookup->GetSubtitle());
453 pVideoLookup->setSeason(lookup->GetSeason());
454 pVideoLookup->setEpisode(lookup->GetEpisode());
455 pVideoLookup->setYear(lookup->GetYear());
456 pVideoLookup->setTagline(lookup->GetTagline());
457 pVideoLookup->setDescription(lookup->GetDescription());
458 pVideoLookup->setCertification(lookup->GetCertification());
459 pVideoLookup->setInetref(lookup->GetInetref());
460 pVideoLookup->setCollectionref(lookup->GetCollectionref());
461 pVideoLookup->setHomePage(lookup->GetHomepage());
462#if QT_VERSION < QT_VERSION_CHECK(6,5,0)
463 pVideoLookup->setReleaseDate(
464 QDateTime(lookup->GetReleaseDate(),
465 QTime(0,0),Qt::LocalTime).toUTC());
467 pVideoLookup->setReleaseDate(
468 QDateTime(lookup->GetReleaseDate(),
470 QTimeZone(QTimeZone::LocalTime)).toUTC());
472 pVideoLookup->setUserRating(lookup->GetUserRating());
473 pVideoLookup->setLength(lookup->GetRuntime().count());
474 pVideoLookup->setLanguage(lookup->GetLanguage());
475 pVideoLookup->setCountries(lookup->GetCountries());
476 pVideoLookup->setPopularity(lookup->GetPopularity());
477 pVideoLookup->setBudget(lookup->GetBudget());
478 pVideoLookup->setRevenue(lookup->GetRevenue());
479 pVideoLookup->setIMDB(lookup->GetIMDB());
480 pVideoLookup->setTMSRef(lookup->GetTMSref());
483 ArtworkList::iterator c;
484 for (c = coverartlist.begin(); c != coverartlist.end(); ++c)
487 art->setType(
"coverart");
488 art->setUrl((*c).url);
489 art->setThumbnail((*c).thumbnail);
490 art->setWidth((*c).width);
491 art->setHeight((*c).height);
494 ArtworkList::iterator f;
495 for (f = fanartlist.begin(); f != fanartlist.end(); ++f)
498 art->setType(
"fanart");
499 art->setUrl((*f).url);
500 art->setThumbnail((*f).thumbnail);
501 art->setWidth((*f).width);
502 art->setHeight((*f).height);
505 ArtworkList::iterator b;
506 for (b = bannerlist.begin(); b != bannerlist.end(); ++b)
509 art->setType(
"banner");
510 art->setUrl((*b).url);
511 art->setThumbnail((*b).thumbnail);
512 art->setWidth((*b).width);
513 art->setHeight((*b).height);
516 ArtworkList::iterator s;
517 for (s = screenshotlist.begin(); s != screenshotlist.end(); ++s)
520 art->setType(
"screenshot");
521 art->setUrl((*s).url);
522 art->setThumbnail((*s).thumbnail);
523 art->setWidth((*s).width);
524 art->setHeight((*s).height);
529 pVideoLookups->setCount ( list.count() );
531 pVideoLookups->setVersion ( MYTH_BINARY_VERSION );
532 pVideoLookups->setProtoVer ( MYTH_PROTO_VERSION );
536 return pVideoLookups;
542 bool bResult =
false;
547 mlm->setList(videolist);
551 bResult = metadata->DeleteFromDatabase();
557 const QString &sHostName )
559 if ( sHostName.isEmpty() )
560 throw( QString(
"Host not provided! Local storage is deprecated and "
561 "is not supported by the API." ));
563 if ( sFileName.isEmpty() ||
564 (sFileName.contains(
"/../")) ||
565 (sFileName.startsWith(
"../")) )
567 throw( QString(
"Filename not provided, or fails sanity checks!" ));
572 QString fullname = sgroup.
FindFile(sFileName);
575 throw( QString(
"Provided filename does not exist!" ));
581 LOG(VB_GENERAL, LOG_ERR,
"Video Hash Failed. Unless this is a DVD or "
582 "Blu-ray, something has probably gone wrong.");
592 QString(), QString(), QString(), QString(),
618 mlm->setList(videolist);
624 metadata->SetWatched(bWatched);
625 metadata->UpdateDatabase();
631 const QString &sTitle,
632 const QString &sSubTitle,
633 const QString &sTagLine,
634 const QString &sDirector,
635 const QString &sStudio,
636 const QString &sPlot,
637 const QString &sRating,
638 const QString &sInetref,
640 const QString &sHomePage,
649 const QString &sFileName,
650 const QString &sHash,
651 const QString &sCoverFile,
656 const QString &sPlayCommand,
658 const QString &sTrailer,
659 const QString &sHost,
660 const QString &sScreenshot,
661 const QString &sBanner,
662 const QString &sFanart,
664 const QString &sContentType,
665 const QString &sGenres,
666 const QString &sCast,
667 const QString &sCountries)
669 bool update_required =
false;
673 mlm->setList(videolist);
678 LOG(VB_GENERAL, LOG_ERR, QString(
"UpdateVideoMetadata: Id=%1 not found")
685 metadata->SetTitle(sTitle);
686 update_required =
true;
691 metadata->SetSubtitle(sSubTitle);
692 update_required =
true;
697 metadata->SetTagline(sTagLine);
698 update_required =
true;
703 metadata->SetDirector(sDirector);
704 update_required =
true;
709 metadata->SetStudio(sStudio);
710 update_required =
true;
715 metadata->SetPlot(sPlot);
716 update_required =
true;
721 metadata->SetUserRating(fUserRating);
722 update_required =
true;
727 metadata->SetInetRef(sInetref);
728 update_required =
true;
733 metadata->SetCollectionRef(nCollectionRef);
734 update_required =
true;
739 metadata->SetHomepage(sHomePage);
740 update_required =
true;
745 metadata->SetYear(nYear);
746 update_required =
true;
751 metadata->SetReleaseDate(sReleasedate);
752 update_required =
true;
757 metadata->SetRating(sRating);
758 update_required =
true;
763 metadata->SetLength(std::chrono::minutes(nLength));
764 update_required =
true;
769 metadata->SetPlayCount(nPlayCount);
770 update_required =
true;
775 metadata->SetSeason(nSeason);
776 update_required =
true;
781 metadata->SetEpisode(nEpisode);
782 update_required =
true;
788 update_required =
true;
793 metadata->SetFilename(sFileName);
794 update_required =
true;
799 metadata->SetHash(sHash);
800 update_required =
true;
805 metadata->SetCoverFile(sCoverFile);
806 update_required =
true;
811 metadata->SetChildID(nChildID);
812 update_required =
true;
817 metadata->SetBrowse(bBrowse);
818 update_required =
true;
823 metadata->SetWatched(bWatched);
824 update_required =
true;
829 metadata->SetProcessed(bProcessed);
830 update_required =
true;
835 metadata->SetPlayCommand(sPlayCommand);
836 update_required =
true;
841 metadata->SetCategoryID(nCategory);
842 update_required =
true;
847 metadata->SetTrailer(sTrailer);
848 update_required =
true;
853 metadata->SetHost(sHost);
854 update_required =
true;
859 metadata->SetScreenshot(sScreenshot);
860 update_required =
true;
865 metadata->SetBanner(sBanner);
866 update_required =
true;
871 metadata->SetFanart(sFanart);
872 update_required =
true;
877 metadata->SetInsertdate(sInsertDate);
878 update_required =
true;
885 if (sContentType ==
"MOVIE")
888 if (sContentType ==
"TELEVISION")
891 if (sContentType ==
"ADULT")
894 if (sContentType ==
"MUSICVIDEO")
897 if (sContentType ==
"HOMEVIDEO")
902 metadata->SetContentType(contentType);
903 update_required =
true;
907 LOG(VB_GENERAL, LOG_ERR, QString(
"UpdateVideoMetadata: Ignoring unknown ContentType: %1").arg(sContentType));
914 QStringList genresList = sGenres.split(
',', Qt::SkipEmptyParts);
915 std::transform(genresList.cbegin(), genresList.cend(), std::back_inserter(genres),
916 [](
const QString& name)
917 {return VideoMetadata::genre_list::value_type(-1, name.simplified());} );
919 metadata->SetGenres(genres);
920 update_required =
true;
926 QStringList castList = sCast.split(
',', Qt::SkipEmptyParts);
927 std::transform(castList.cbegin(), castList.cend(), std::back_inserter(cast),
928 [](
const QString& name)
929 {return VideoMetadata::cast_list::value_type(-1, name.simplified());} );
931 metadata->SetCast(cast);
932 update_required =
true;
938 QStringList countryList = sCountries.split(
',', Qt::SkipEmptyParts);
939 std::transform(countryList.cbegin(), countryList.cend(), std::back_inserter(countries),
940 [](
const QString& name)
941 {return VideoMetadata::country_list::value_type(-1, name.simplified());} );
943 metadata->SetCountries(countries);
944 update_required =
true;
948 metadata->UpdateDatabase();
961 query.
prepare(
"SELECT filename "
962 "FROM videometadata "
963 "WHERE intid = :ID ");
975 fileName = query.
value(0).toString();
978 LOG(VB_GENERAL, LOG_ERR, QString(
"Video/SetSavedBookmark Video id %1 Not found.").arg(Id));
1008 query.
prepare(
"SELECT filename "
1009 "FROM videometadata "
1010 "WHERE intid = :ID ");
1022 fileName = query.
value(0).toString();
1025 LOG(VB_GENERAL, LOG_ERR, QString(
"Video/SetLastPlayPos Video id %1 Not found.").arg(Id));
1050 QString path = sPath;
1052 if (sPath.isEmpty())
1055 LOG(VB_GENERAL, LOG_NOTICE,
1056 QString(
"Parsing Blu-ray at path: %1 ").arg(path));
1061 throw( QString(
"Unable to open Blu-ray Metadata Parser!" ));
1063 if ( !bdmeta->OpenDisc() )
1064 throw( QString(
"Unable to open Blu-ray Disc/Path!" ));
1066 if ( !bdmeta->ParseDisc() )
1067 throw( QString(
"Unable to parse metadata from Blu-ray Disc/Path!" ));
1071 pBlurayInfo->setPath(path);
1072 pBlurayInfo->setTitle(bdmeta->GetTitle());
1073 pBlurayInfo->setAltTitle(bdmeta->GetAlternateTitle());
1074 pBlurayInfo->setDiscLang(bdmeta->GetDiscLanguage());
1075 pBlurayInfo->setDiscNum(bdmeta->GetCurrentDiscNumber());
1076 pBlurayInfo->setTotalDiscNum(bdmeta->GetTotalDiscNumber());
1077 pBlurayInfo->setTitleCount(bdmeta->GetTitleCount());
1078 pBlurayInfo->setThumbCount(bdmeta->GetThumbnailCount());
1079 pBlurayInfo->setTopMenuSupported(bdmeta->GetTopMenuSupported());
1080 pBlurayInfo->setFirstPlaySupported(bdmeta->GetFirstPlaySupported());
1081 pBlurayInfo->setNumHDMVTitles(bdmeta->GetNumHDMVTitles());
1082 pBlurayInfo->setNumBDJTitles(bdmeta->GetNumBDJTitles());
1083 pBlurayInfo->setNumUnsupportedTitles(bdmeta->GetNumUnsupportedTitles());
1084 pBlurayInfo->setAACSDetected(bdmeta->GetAACSDetected());
1085 pBlurayInfo->setLibAACSDetected(bdmeta->GetLibAACSDetected());
1086 pBlurayInfo->setAACSHandled(bdmeta->GetAACSHandled());
1087 pBlurayInfo->setBDPlusDetected(bdmeta->GetBDPlusDetected());
1088 pBlurayInfo->setLibBDPlusDetected(bdmeta->GetLibBDPlusDetected());
1089 pBlurayInfo->setBDPlusHandled(bdmeta->GetBDPlusHandled());
1091 QStringList thumbs = bdmeta->GetThumbnails();
1092 if (!thumbs.empty())
1093 pBlurayInfo->setThumbPath(thumbs.at(0));
1111 (
const QString &storageGroup,
1112 const QString &FileName )
1118 QString sFullFileName = storage.
FindFile( FileName );
1127 pVideoStreamInfos->setVersion ( MYTH_BINARY_VERSION );
1128 pVideoStreamInfos->setProtoVer ( MYTH_PROTO_VERSION );
1129 pVideoStreamInfos->setErrorCode ( infos.
m_errorCode );
1130 pVideoStreamInfos->setErrorMsg ( infos.
m_errorMsg );
1134 V2VideoStreamInfo *pVideoStreamInfo = pVideoStreamInfos->AddNewVideoStreamInfo();
1135 pVideoStreamInfo->setCodecType ( QString(QChar(
info.m_codecType)) );
1136 pVideoStreamInfo->setCodecName (
info.m_codecName );
1137 pVideoStreamInfo->setWidth (
info.m_width );
1138 pVideoStreamInfo->setHeight (
info.m_height );
1139 pVideoStreamInfo->setAspectRatio (
info.m_SampleAspectRatio );
1140 pVideoStreamInfo->setFieldOrder (
info.m_fieldOrder );
1141 pVideoStreamInfo->setFrameRate (
info.m_frameRate );
1142 pVideoStreamInfo->setAvgFrameRate (
info.m_avgFrameRate );
1143 pVideoStreamInfo->setChannels (
info.m_channels );
1144 pVideoStreamInfo->setDuration (
info.m_duration );
1147 return pVideoStreamInfos;
1156 const QString &offsettype,
1161 query.
prepare(
"SELECT filename "
1162 "FROM videometadata "
1163 "WHERE intid = :ID ");
1169 throw QString(
"Database Error.");
1175 fileName = query.
value(0).toString();
1178 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetVideoCommBreak Video id %1 Not found.").arg(Id));
1179 throw QString(
"Video Not Found.");
1200 if (offsettype.toLower() ==
"position")
1202 else if (offsettype.toLower() ==
"duration")
1218 const QString &offsettype,
1223 query.
prepare(
"SELECT filename "
1224 "FROM videometadata "
1225 "WHERE intid = :ID ");
1231 throw QString(
"Database Error.");
1237 fileName = query.
value(0).toString();
1240 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetVideoCommBreak Video id %1 Not found.").arg(Id));
1241 throw QString(
"Video Not Found.");
1262 if (offsettype.toLower() ==
"position")
1264 else if (offsettype.toLower() ==
"duration")
1279 query.
prepare(
"SELECT intid,category "
1280 "FROM videocategory ");
1285 throw QString(
"Database Error.");
1288 while (query.
next())
1290 auto *
cat = pCatList->AddNewCategory();
1291 cat->setId(query.
value(0).toInt());
1292 cat->setName(query.
value(1).toString());
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
QVariant value(int i) const
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
QString GetSetting(const QString &key, const QString &defaultval="")
static void DBError(const QString &where, const MSqlQuery &query)
bool HAS_PARAMv2(const QString &p)
QVector< MythStreamInfo > m_streamInfoList
Holds information on recordings and videos.
void SaveLastPlayPos(uint64_t frame)
TODO Move to RecordingInfo.
uint64_t QueryLastPlayPos(void) const
Gets any lastplaypos position in database, unless the ignore lastplaypos flag is set.
uint64_t QueryBookmark(void) const
Gets any bookmark position in database, unless the ignore bookmark flag is set.
void SaveBookmark(uint64_t frame)
Clears any existing bookmark in DB and if frame is greater than 0 sets a new bookmark.
QString FindFile(const QString &filename)
V2ArtworkItem * AddNewArtwork()
bool UpdateVideoMetadata(int Id, const QString &Title, const QString &SubTitle, const QString &TagLine, const QString &Director, const QString &Studio, const QString &Plot, const QString &Rating, const QString &Inetref, int CollectionRef, const QString &HomePage, int Year, QDate ReleaseDate, float UserRating, int Length, int PlayCount, int Season, int Episode, int ShowLevel, const QString &FileName, const QString &Hash, const QString &CoverFile, int ChildID, bool Browse, bool Watched, bool Processed, const QString &PlayCommand, int Category, const QString &Trailer, const QString &Host, const QString &Screenshot, const QString &Banner, const QString &Fanart, QDate InsertDate, const QString &ContentType, const QString &Genres, const QString &Cast, const QString &Countries)
static V2CutList * GetVideoCutList(int Id, const QString &OffsetType, bool IncludeFps)
static bool AddVideo(const QString &FileName, const QString &HostName)
static V2VideoMetadataInfo * GetVideoByFileName(const QString &FileName)
static bool SetSavedBookmark(int Id, long Offset)
static void RegisterCustomTypes()
static bool UpdateVideoWatchedStatus(int Id, bool Watched)
static V2CutList * GetVideoCommBreak(int Id, const QString &OffsetType, bool IncludeFps)
static bool RemoveVideoFromDB(int Id)
static bool SetLastPlayPos(int Id, long Offset)
static long GetLastPlayPos(int Id)
static long GetSavedBookmark(int Id)
static V2VideoLookupList * LookupVideo(const QString &Title, const QString &Subtitle, const QString &Inetref, int Season, int Episode, const QString &GrabberType, bool AllowGeneric)
static V2BlurayInfo * GetBluray(const QString &Path)
V2VideoMetadataInfoList * GetVideoList(const QString &Folder, const QString &Sort, const QString &TitleRegEx, int Category, bool Descending, int StartIndex, int Count, bool CollapseSubDirs)
static V2VideoStreamInfoList * GetStreamInfo(const QString &StorageGroup, const QString &FileName)
static V2VideoMetadataInfo * GetVideo(int Id)
static V2VideoCategoryList * GetCategoryList()
const QString VIDEO_INETREF_DEFAULT
const QString VIDEO_PLOT_DEFAULT
const QString VIDEO_TRAILER_DEFAULT
const QString VIDEO_BANNER_DEFAULT
const QString VIDEO_SCREENSHOT_DEFAULT
const QString VIDEO_FANART_DEFAULT
const QString VIDEO_RATING_DEFAULT
const QString VIDEO_DIRECTOR_DEFAULT
const QString VIDEO_COVERFILE_DEFAULT
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
QString FileHash(const QString &filename)
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
void V2FillCommBreak(V2CutList *pCutList, ProgramInfo *rInfo, int marktype, bool includeFps)
void V2FillVideoMetadataInfo(V2VideoMetadataInfo *pVideoMetadataInfo, const VideoMetadataListManager::VideoMetadataPtr &pMetadata, bool bDetails)
void V2FillCutList(V2CutList *pCutList, ProgramInfo *rInfo, int marktype, bool includeFps)
Q_GLOBAL_STATIC_WITH_ARGS(MythHTTPMetaService, s_service,(VIDEO_HANDLE, V2Video::staticMetaObject, &V2Video::RegisterCustomTypes)) void V2Video