12#include "libmythbase/mythversion.h"
35 qRegisterMetaType<V2VideoMetadataInfo*>(
"V2VideoMetadataInfo");
36 qRegisterMetaType<V2VideoMetadataInfoList*>(
"V2VideoMetadataInfoList");
37 qRegisterMetaType<V2VideoLookupList*>(
"V2VideoLookupList");
38 qRegisterMetaType<V2BlurayInfo*>(
"V2BlurayInfo");
39 qRegisterMetaType<V2VideoStreamInfoList*>(
"V2VideoStreamInfoList");
40 qRegisterMetaType<V2VideoStreamInfo*>(
"V2VideoStreamInfo");
41 qRegisterMetaType<V2ArtworkInfoList*>(
"V2ArtworkInfoList");
42 qRegisterMetaType<V2ArtworkInfo*>(
"V2ArtworkInfo");
43 qRegisterMetaType<V2CastMemberList*>(
"V2CastMemberList");
44 qRegisterMetaType<V2CastMember*>(
"V2CastMember");
45 qRegisterMetaType<V2GenreList*>(
"V2GenreList");
46 qRegisterMetaType<V2Genre*>(
"V2Genre");
47 qRegisterMetaType<V2VideoLookupList*>(
"V2VideoLookupList");
48 qRegisterMetaType<V2VideoLookup*>(
"V2VideoLookup");
49 qRegisterMetaType<V2ArtworkItem*>(
"V2ArtworkItem");
50 qRegisterMetaType<V2CutList*>(
"V2CutList");
51 qRegisterMetaType<V2Cutting*>(
"V2Cutting");
52 qRegisterMetaType<V2VideoCategory*>(
"V2VideoCategory");
53 qRegisterMetaType<V2VideoCategoryList*>(
"V2VideoCategoryList");
67 throw( QString(
"No metadata found for selected ID!." ));
73 return pVideoMetadataInfo;
81 mlm->setList(videolist);
85 throw( QString(
"No metadata found for selected filename!." ));
91 return pVideoMetadataInfo;
103 query.
prepare(
"SELECT filename "
104 "FROM videometadata "
105 "WHERE intid = :ID ");
118 fileName = query.
value(0).toString();
122 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetSavedBookmark Video id %1 Not found.").arg(Id));
152 query.
prepare(
"SELECT filename "
153 "FROM videometadata "
154 "WHERE intid = :ID ");
167 fileName = query.
value(0).toString();
171 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetLastPlayPos Video id %1 Not found.").arg(Id));
214 const QString &TitleRegEx,
219 bool CollapseSubDirs )
221 QString fields =
"title,director,studio,plot,rating,year,releasedate,"
222 "userrating,length,playcount,filename,hash,showlevel,"
223 "coverfile,inetref,collectionref,homepage,childid,browse,watched,"
224 "playcommand,category,intid,trailer,screenshot,banner,fanart,"
225 "subtitle,tagline,season,episode,host,insertdate,processed,contenttype";
227 QStringList sortFields = fields.split(
',');
233 QStringList bindValues;
235 if (!Folder.isEmpty())
237 if (Folder.endsWith(
'/'))
240 folder = Folder +
"/";
241 sql.append(
" WHERE filename LIKE :BIND0 ");
242 bindValues.append(folder +
"%");
244 if (!TitleRegEx.isEmpty())
246 if (bindValues.empty())
248 sql.append(
" WHERE ");
254 sql.append(
" title REGEXP :BIND" + QString::number(bindValues.size()) +
" ");
255 bindValues.append(TitleRegEx);
259 if (bindValues.empty())
261 sql.append(
" WHERE ");
267 sql.append(
" category = :BIND" + QString::number(bindValues.size()) +
" ");
268 bindValues.append( QString::number(Category) );
270 sql.append(
" ORDER BY ");
271 QString defSeq =
" ASC";
275 QStringList sortList = Sort.toLower().split(
',',Qt::SkipEmptyParts);
277 for (
const auto & item : std::as_const(sortList))
279 QStringList partList = item.split(
' ',Qt::SkipEmptyParts);
280 if (partList.empty())
282 QString sort = partList[0];
285 else if (sort ==
"released")
286 sort =
"releasedate";
287 if (sortFields.contains(sort))
294 QString prefixes = sh->getPrefixes();
295 sort =
"REGEXP_REPLACE(title,'" + prefixes +
"','')";
297 else if (sort ==
"subtitle")
300 QString prefixes = sh->getPrefixes();
301 sort =
"REGEXP_REPLACE(subtitle,'" + prefixes +
"','')";
304 if (partList.length() > 1 && partList[1].compare(
"DESC",Qt::CaseInsensitive) == 0)
306 else if (partList.length() > 1 && partList[1].compare(
"ASC",Qt::CaseInsensitive) == 0)
320 std::vector<VideoMetadataListManager::VideoMetadataPtr> videos(videolist.begin(), videolist.end());
327 QMap<QString, QString> map;
328 int folderlen = folder.length();
330 nStartIndex = (nStartIndex > 0) ? std::min( nStartIndex, (
int)videos.size() ) : 0;
331 int selectedCount = 0;
338 for(
const auto& metadata : videos )
342 QString fnPart = metadata->GetFilename().mid(folderlen);
343 int slashPos = fnPart.indexOf(
'/',1);
346 dir = fnPart.mid(0, slashPos);
347 QString key = dir.toLower();
349 key = sh->doTitle(key);
350 if (!map.contains(key))
351 map.insert(key, dir);
356 auto addMetadata = [&](
const auto it)
358 if (totalCount >= nStartIndex && (nCount == 0 || selectedCount < nCount)) {
360 pVideoMetadataInfos->AddNewVideoMetadataInfo();
361 pVideoMetadataInfo->setContentType(
"DIRECTORY");
362 pVideoMetadataInfo->setFileName(folder + it.value());
363 pVideoMetadataInfo->setTitle(it.value());
372 for (
auto it = map.cend(); it != map.cbegin(); )
381 for (
auto it = map.cbegin(); it != map.cend(); it++) {
387 for(
const auto& metadata : videos )
394 QString fnPart = metadata->GetFilename().mid(folderlen);
395 int slashPos = fnPart.indexOf(
'/',1);
400 if (totalCount >= nStartIndex && (nCount == 0 || selectedCount < nCount)) {
413 totalPages = (int)ceil((
float)totalCount / nCount);
421 curPage = (int)ceil((
float)nStartIndex / nCount) + 1;
424 pVideoMetadataInfos->setStartIndex ( nStartIndex );
425 pVideoMetadataInfos->setCount ( selectedCount );
426 pVideoMetadataInfos->setCurrentPage ( curPage );
427 pVideoMetadataInfos->setTotalPages ( totalPages );
428 pVideoMetadataInfos->setTotalAvailable( totalCount );
430 pVideoMetadataInfos->setVersion ( MYTH_BINARY_VERSION );
431 pVideoMetadataInfos->setProtoVer ( MYTH_PROTO_VERSION );
433 return pVideoMetadataInfos;
438 const QString &Subtitle,
439 const QString &Inetref,
453 list = factory->SynchronousLookup(Title, Subtitle,
454 Inetref, Season, Episode,
459 return pVideoLookups;
463 for(
const auto & lookup : std::as_const(list))
465 V2VideoLookup *pVideoLookup = pVideoLookups->AddNewVideoLookup();
469 pVideoLookup->setTitle(lookup->GetTitle());
470 pVideoLookup->setSubTitle(lookup->GetSubtitle());
471 pVideoLookup->setSeason(lookup->GetSeason());
472 pVideoLookup->setEpisode(lookup->GetEpisode());
473 pVideoLookup->setYear(lookup->GetYear());
474 pVideoLookup->setTagline(lookup->GetTagline());
475 pVideoLookup->setDescription(lookup->GetDescription());
476 pVideoLookup->setCertification(lookup->GetCertification());
477 pVideoLookup->setInetref(lookup->GetInetref());
478 pVideoLookup->setCollectionref(lookup->GetCollectionref());
479 pVideoLookup->setHomePage(lookup->GetHomepage());
480#if QT_VERSION < QT_VERSION_CHECK(6,5,0)
481 pVideoLookup->setReleaseDate(
482 QDateTime(lookup->GetReleaseDate(),
483 QTime(0,0),Qt::LocalTime).toUTC());
485 pVideoLookup->setReleaseDate(
486 QDateTime(lookup->GetReleaseDate(),
488 QTimeZone(QTimeZone::LocalTime)).toUTC());
490 pVideoLookup->setUserRating(lookup->GetUserRating());
491 pVideoLookup->setLength(lookup->GetRuntime().count());
492 pVideoLookup->setLanguage(lookup->GetLanguage());
493 pVideoLookup->setCountries(lookup->GetCountries());
494 pVideoLookup->setPopularity(lookup->GetPopularity());
495 pVideoLookup->setBudget(lookup->GetBudget());
496 pVideoLookup->setRevenue(lookup->GetRevenue());
497 pVideoLookup->setIMDB(lookup->GetIMDB());
498 pVideoLookup->setTMSRef(lookup->GetTMSref());
501 ArtworkList::iterator c;
502 for (c = coverartlist.begin(); c != coverartlist.end(); ++c)
505 art->setType(
"coverart");
506 art->setUrl((*c).url);
507 art->setThumbnail((*c).thumbnail);
508 art->setWidth((*c).width);
509 art->setHeight((*c).height);
512 ArtworkList::iterator f;
513 for (f = fanartlist.begin(); f != fanartlist.end(); ++f)
516 art->setType(
"fanart");
517 art->setUrl((*f).url);
518 art->setThumbnail((*f).thumbnail);
519 art->setWidth((*f).width);
520 art->setHeight((*f).height);
523 ArtworkList::iterator b;
524 for (b = bannerlist.begin(); b != bannerlist.end(); ++b)
527 art->setType(
"banner");
528 art->setUrl((*b).url);
529 art->setThumbnail((*b).thumbnail);
530 art->setWidth((*b).width);
531 art->setHeight((*b).height);
534 ArtworkList::iterator s;
535 for (s = screenshotlist.begin(); s != screenshotlist.end(); ++s)
538 art->setType(
"screenshot");
539 art->setUrl((*s).url);
540 art->setThumbnail((*s).thumbnail);
541 art->setWidth((*s).width);
542 art->setHeight((*s).height);
547 pVideoLookups->setCount ( list.count() );
549 pVideoLookups->setVersion ( MYTH_BINARY_VERSION );
550 pVideoLookups->setProtoVer ( MYTH_PROTO_VERSION );
554 return pVideoLookups;
560 bool bResult =
false;
565 mlm->setList(videolist);
569 bResult = metadata->DeleteFromDatabase();
575 const QString &sHostName )
577 if ( sHostName.isEmpty() )
578 throw( QString(
"Host not provided! Local storage is deprecated and "
579 "is not supported by the API." ));
581 if ( sFileName.isEmpty() ||
582 (sFileName.contains(
"/../")) ||
583 (sFileName.startsWith(
"../")) )
585 throw( QString(
"Filename not provided, or fails sanity checks!" ));
590 QString fullname = sgroup.
FindFile(sFileName);
593 throw( QString(
"Provided filename does not exist!" ));
599 LOG(VB_GENERAL, LOG_ERR,
"Video Hash Failed. Unless this is a DVD or "
600 "Blu-ray, something has probably gone wrong.");
610 QString(), QString(), QString(), QString(),
636 mlm->setList(videolist);
642 metadata->SetWatched(bWatched);
643 metadata->UpdateDatabase();
649 const QString &sTitle,
650 const QString &sSubTitle,
651 const QString &sTagLine,
652 const QString &sDirector,
653 const QString &sStudio,
654 const QString &sPlot,
655 const QString &sRating,
656 const QString &sInetref,
658 const QString &sHomePage,
667 const QString &sFileName,
668 const QString &sHash,
669 const QString &sCoverFile,
674 const QString &sPlayCommand,
676 const QString &sTrailer,
677 const QString &sHost,
678 const QString &sScreenshot,
679 const QString &sBanner,
680 const QString &sFanart,
682 const QString &sContentType,
683 const QString &sGenres,
684 const QString &sCast,
685 const QString &sCountries)
687 bool update_required =
false;
691 mlm->setList(videolist);
696 LOG(VB_GENERAL, LOG_ERR, QString(
"UpdateVideoMetadata: Id=%1 not found")
703 metadata->SetTitle(sTitle);
704 update_required =
true;
709 metadata->SetSubtitle(sSubTitle);
710 update_required =
true;
715 metadata->SetTagline(sTagLine);
716 update_required =
true;
721 metadata->SetDirector(sDirector);
722 update_required =
true;
727 metadata->SetStudio(sStudio);
728 update_required =
true;
733 metadata->SetPlot(sPlot);
734 update_required =
true;
739 metadata->SetUserRating(fUserRating);
740 update_required =
true;
745 metadata->SetInetRef(sInetref);
746 update_required =
true;
751 metadata->SetCollectionRef(nCollectionRef);
752 update_required =
true;
757 metadata->SetHomepage(sHomePage);
758 update_required =
true;
763 metadata->SetYear(nYear);
764 update_required =
true;
769 metadata->SetReleaseDate(sReleasedate);
770 update_required =
true;
775 metadata->SetRating(sRating);
776 update_required =
true;
781 metadata->SetLength(std::chrono::minutes(nLength));
782 update_required =
true;
787 metadata->SetPlayCount(nPlayCount);
788 update_required =
true;
793 metadata->SetSeason(nSeason);
794 update_required =
true;
799 metadata->SetEpisode(nEpisode);
800 update_required =
true;
806 update_required =
true;
811 metadata->SetFilename(sFileName);
812 update_required =
true;
817 metadata->SetHash(sHash);
818 update_required =
true;
823 metadata->SetCoverFile(sCoverFile);
824 update_required =
true;
829 metadata->SetChildID(nChildID);
830 update_required =
true;
835 metadata->SetBrowse(bBrowse);
836 update_required =
true;
841 metadata->SetWatched(bWatched);
842 update_required =
true;
847 metadata->SetProcessed(bProcessed);
848 update_required =
true;
853 metadata->SetPlayCommand(sPlayCommand);
854 update_required =
true;
859 metadata->SetCategoryID(nCategory);
860 update_required =
true;
865 metadata->SetTrailer(sTrailer);
866 update_required =
true;
871 metadata->SetHost(sHost);
872 update_required =
true;
877 metadata->SetScreenshot(sScreenshot);
878 update_required =
true;
883 metadata->SetBanner(sBanner);
884 update_required =
true;
889 metadata->SetFanart(sFanart);
890 update_required =
true;
895 metadata->SetInsertdate(sInsertDate);
896 update_required =
true;
903 if (sContentType ==
"MOVIE")
906 if (sContentType ==
"TELEVISION")
909 if (sContentType ==
"ADULT")
912 if (sContentType ==
"MUSICVIDEO")
915 if (sContentType ==
"HOMEVIDEO")
920 metadata->SetContentType(contentType);
921 update_required =
true;
925 LOG(VB_GENERAL, LOG_ERR, QString(
"UpdateVideoMetadata: Ignoring unknown ContentType: %1").arg(sContentType));
932 QStringList genresList = sGenres.split(
',', Qt::SkipEmptyParts);
933 std::ranges::transform(std::as_const(genresList), std::back_inserter(genres),
934 [](
const QString& name)
935 {
return VideoMetadata::genre_list::value_type(-1, name.simplified());} );
937 metadata->SetGenres(genres);
938 update_required =
true;
944 QStringList castList = sCast.split(
',', Qt::SkipEmptyParts);
945 std::ranges::transform(std::as_const(castList), std::back_inserter(cast),
946 [](
const QString& name)
947 {
return VideoMetadata::cast_list::value_type(-1, name.simplified());} );
949 metadata->SetCast(cast);
950 update_required =
true;
956 QStringList countryList = sCountries.split(
',', Qt::SkipEmptyParts);
957 std::ranges::transform(std::as_const(countryList), std::back_inserter(countries),
958 [](
const QString& name)
959 {
return VideoMetadata::country_list::value_type(-1, name.simplified());} );
961 metadata->SetCountries(countries);
962 update_required =
true;
966 metadata->UpdateDatabase();
979 query.
prepare(
"SELECT filename "
980 "FROM videometadata "
981 "WHERE intid = :ID ");
994 fileName = query.
value(0).toString();
998 LOG(VB_GENERAL, LOG_ERR, QString(
"Video/SetSavedBookmark Video id %1 Not found.").arg(Id));
1028 query.
prepare(
"SELECT filename "
1029 "FROM videometadata "
1030 "WHERE intid = :ID ");
1043 fileName = query.
value(0).toString();
1047 LOG(VB_GENERAL, LOG_ERR, QString(
"Video/SetLastPlayPos Video id %1 Not found.").arg(Id));
1072 QString path = sPath;
1074 if (sPath.isEmpty())
1077 LOG(VB_GENERAL, LOG_NOTICE,
1078 QString(
"Parsing Blu-ray at path: %1 ").arg(path));
1083 throw( QString(
"Unable to open Blu-ray Metadata Parser!" ));
1085 if ( !bdmeta->OpenDisc() )
1086 throw( QString(
"Unable to open Blu-ray Disc/Path!" ));
1088 if ( !bdmeta->ParseDisc() )
1089 throw( QString(
"Unable to parse metadata from Blu-ray Disc/Path!" ));
1093 pBlurayInfo->setPath(path);
1094 pBlurayInfo->setTitle(bdmeta->GetTitle());
1095 pBlurayInfo->setAltTitle(bdmeta->GetAlternateTitle());
1096 pBlurayInfo->setDiscLang(bdmeta->GetDiscLanguage());
1097 pBlurayInfo->setDiscNum(bdmeta->GetCurrentDiscNumber());
1098 pBlurayInfo->setTotalDiscNum(bdmeta->GetTotalDiscNumber());
1099 pBlurayInfo->setTitleCount(bdmeta->GetTitleCount());
1100 pBlurayInfo->setThumbCount(bdmeta->GetThumbnailCount());
1101 pBlurayInfo->setTopMenuSupported(bdmeta->GetTopMenuSupported());
1102 pBlurayInfo->setFirstPlaySupported(bdmeta->GetFirstPlaySupported());
1103 pBlurayInfo->setNumHDMVTitles(bdmeta->GetNumHDMVTitles());
1104 pBlurayInfo->setNumBDJTitles(bdmeta->GetNumBDJTitles());
1105 pBlurayInfo->setNumUnsupportedTitles(bdmeta->GetNumUnsupportedTitles());
1106 pBlurayInfo->setAACSDetected(bdmeta->GetAACSDetected());
1107 pBlurayInfo->setLibAACSDetected(bdmeta->GetLibAACSDetected());
1108 pBlurayInfo->setAACSHandled(bdmeta->GetAACSHandled());
1109 pBlurayInfo->setBDPlusDetected(bdmeta->GetBDPlusDetected());
1110 pBlurayInfo->setLibBDPlusDetected(bdmeta->GetLibBDPlusDetected());
1111 pBlurayInfo->setBDPlusHandled(bdmeta->GetBDPlusHandled());
1113 QStringList thumbs = bdmeta->GetThumbnails();
1114 if (!thumbs.empty())
1115 pBlurayInfo->setThumbPath(thumbs.at(0));
1133 (
const QString &storageGroup,
1134 const QString &FileName )
1140 QString sFullFileName = storage.
FindFile( FileName );
1149 pVideoStreamInfos->setVersion ( MYTH_BINARY_VERSION );
1150 pVideoStreamInfos->setProtoVer ( MYTH_PROTO_VERSION );
1151 pVideoStreamInfos->setErrorCode ( infos.
m_errorCode );
1152 pVideoStreamInfos->setErrorMsg ( infos.
m_errorMsg );
1156 V2VideoStreamInfo *pVideoStreamInfo = pVideoStreamInfos->AddNewVideoStreamInfo();
1157 pVideoStreamInfo->setCodecType ( QString(QChar(
info.m_codecType)) );
1158 pVideoStreamInfo->setCodecName (
info.m_codecName );
1159 pVideoStreamInfo->setWidth (
info.m_width );
1160 pVideoStreamInfo->setHeight (
info.m_height );
1161 pVideoStreamInfo->setAspectRatio (
info.m_SampleAspectRatio );
1162 pVideoStreamInfo->setFieldOrder (
info.m_fieldOrder );
1163 pVideoStreamInfo->setFrameRate (
info.m_frameRate );
1164 pVideoStreamInfo->setAvgFrameRate (
info.m_avgFrameRate );
1165 pVideoStreamInfo->setChannels (
info.m_channels );
1166 pVideoStreamInfo->setDuration (
info.m_duration );
1169 return pVideoStreamInfos;
1178 const QString &offsettype,
1183 query.
prepare(
"SELECT filename "
1184 "FROM videometadata "
1185 "WHERE intid = :ID ");
1191 throw QString(
"Database Error.");
1198 fileName = query.
value(0).toString();
1202 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetVideoCommBreak Video id %1 Not found.").arg(Id));
1203 throw QString(
"Video Not Found.");
1224 if (offsettype.toLower() ==
"position")
1226 else if (offsettype.toLower() ==
"duration")
1242 const QString &offsettype,
1247 query.
prepare(
"SELECT filename "
1248 "FROM videometadata "
1249 "WHERE intid = :ID ");
1255 throw QString(
"Database Error.");
1262 fileName = query.
value(0).toString();
1266 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetVideoCommBreak Video id %1 Not found.").arg(Id));
1267 throw QString(
"Video Not Found.");
1288 if (offsettype.toLower() ==
"position")
1290 else if (offsettype.toLower() ==
"duration")
1305 query.
prepare(
"SELECT intid,category "
1306 "FROM videocategory ");
1311 throw QString(
"Database Error.");
1314 while (query.
next())
1316 auto *
cat = pCatList->AddNewCategory();
1317 cat->setId(query.
value(0).toInt());
1318 cat->setName(query.
value(1).toString());
1324#include "moc_v2video.cpp"
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