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 auto addMetadata = [&](
const auto it)
351 if (totalCount >= nStartIndex && (nCount == 0 || selectedCount < nCount)) {
353 pVideoMetadataInfos->AddNewVideoMetadataInfo();
354 pVideoMetadataInfo->setContentType(
"DIRECTORY");
355 pVideoMetadataInfo->setFileName(folder + it.value());
356 pVideoMetadataInfo->setTitle(it.value());
365 for (
auto it = map.cend(); it != map.cbegin(); )
374 for (
auto it = map.cbegin(); it != map.cend(); it++) {
380 for(
const auto& metadata : videos )
387 QString fnPart = metadata->GetFilename().mid(folderlen);
388 int slashPos = fnPart.indexOf(
'/',1);
393 if (totalCount >= nStartIndex && (nCount == 0 || selectedCount < nCount)) {
406 totalPages = (int)ceil((
float)totalCount / nCount);
412 curPage = (int)ceil((
float)nStartIndex / nCount) + 1;
415 pVideoMetadataInfos->setStartIndex ( nStartIndex );
416 pVideoMetadataInfos->setCount ( selectedCount );
417 pVideoMetadataInfos->setCurrentPage ( curPage );
418 pVideoMetadataInfos->setTotalPages ( totalPages );
419 pVideoMetadataInfos->setTotalAvailable( totalCount );
421 pVideoMetadataInfos->setVersion ( MYTH_BINARY_VERSION );
422 pVideoMetadataInfos->setProtoVer ( MYTH_PROTO_VERSION );
424 return pVideoMetadataInfos;
429 const QString &Subtitle,
430 const QString &Inetref,
444 list = factory->SynchronousLookup(Title, Subtitle,
445 Inetref, Season, Episode,
450 return pVideoLookups;
454 for(
const auto & lookup : std::as_const(list))
456 V2VideoLookup *pVideoLookup = pVideoLookups->AddNewVideoLookup();
460 pVideoLookup->setTitle(lookup->GetTitle());
461 pVideoLookup->setSubTitle(lookup->GetSubtitle());
462 pVideoLookup->setSeason(lookup->GetSeason());
463 pVideoLookup->setEpisode(lookup->GetEpisode());
464 pVideoLookup->setYear(lookup->GetYear());
465 pVideoLookup->setTagline(lookup->GetTagline());
466 pVideoLookup->setDescription(lookup->GetDescription());
467 pVideoLookup->setCertification(lookup->GetCertification());
468 pVideoLookup->setInetref(lookup->GetInetref());
469 pVideoLookup->setCollectionref(lookup->GetCollectionref());
470 pVideoLookup->setHomePage(lookup->GetHomepage());
471#if QT_VERSION < QT_VERSION_CHECK(6,5,0)
472 pVideoLookup->setReleaseDate(
473 QDateTime(lookup->GetReleaseDate(),
474 QTime(0,0),Qt::LocalTime).toUTC());
476 pVideoLookup->setReleaseDate(
477 QDateTime(lookup->GetReleaseDate(),
479 QTimeZone(QTimeZone::LocalTime)).toUTC());
481 pVideoLookup->setUserRating(lookup->GetUserRating());
482 pVideoLookup->setLength(lookup->GetRuntime().count());
483 pVideoLookup->setLanguage(lookup->GetLanguage());
484 pVideoLookup->setCountries(lookup->GetCountries());
485 pVideoLookup->setPopularity(lookup->GetPopularity());
486 pVideoLookup->setBudget(lookup->GetBudget());
487 pVideoLookup->setRevenue(lookup->GetRevenue());
488 pVideoLookup->setIMDB(lookup->GetIMDB());
489 pVideoLookup->setTMSRef(lookup->GetTMSref());
492 ArtworkList::iterator c;
493 for (c = coverartlist.begin(); c != coverartlist.end(); ++c)
496 art->setType(
"coverart");
497 art->setUrl((*c).url);
498 art->setThumbnail((*c).thumbnail);
499 art->setWidth((*c).width);
500 art->setHeight((*c).height);
503 ArtworkList::iterator f;
504 for (f = fanartlist.begin(); f != fanartlist.end(); ++f)
507 art->setType(
"fanart");
508 art->setUrl((*f).url);
509 art->setThumbnail((*f).thumbnail);
510 art->setWidth((*f).width);
511 art->setHeight((*f).height);
514 ArtworkList::iterator b;
515 for (b = bannerlist.begin(); b != bannerlist.end(); ++b)
518 art->setType(
"banner");
519 art->setUrl((*b).url);
520 art->setThumbnail((*b).thumbnail);
521 art->setWidth((*b).width);
522 art->setHeight((*b).height);
525 ArtworkList::iterator s;
526 for (s = screenshotlist.begin(); s != screenshotlist.end(); ++s)
529 art->setType(
"screenshot");
530 art->setUrl((*s).url);
531 art->setThumbnail((*s).thumbnail);
532 art->setWidth((*s).width);
533 art->setHeight((*s).height);
538 pVideoLookups->setCount ( list.count() );
540 pVideoLookups->setVersion ( MYTH_BINARY_VERSION );
541 pVideoLookups->setProtoVer ( MYTH_PROTO_VERSION );
545 return pVideoLookups;
551 bool bResult =
false;
556 mlm->setList(videolist);
560 bResult = metadata->DeleteFromDatabase();
566 const QString &sHostName )
568 if ( sHostName.isEmpty() )
569 throw( QString(
"Host not provided! Local storage is deprecated and "
570 "is not supported by the API." ));
572 if ( sFileName.isEmpty() ||
573 (sFileName.contains(
"/../")) ||
574 (sFileName.startsWith(
"../")) )
576 throw( QString(
"Filename not provided, or fails sanity checks!" ));
581 QString fullname = sgroup.
FindFile(sFileName);
584 throw( QString(
"Provided filename does not exist!" ));
590 LOG(VB_GENERAL, LOG_ERR,
"Video Hash Failed. Unless this is a DVD or "
591 "Blu-ray, something has probably gone wrong.");
601 QString(), QString(), QString(), QString(),
627 mlm->setList(videolist);
633 metadata->SetWatched(bWatched);
634 metadata->UpdateDatabase();
640 const QString &sTitle,
641 const QString &sSubTitle,
642 const QString &sTagLine,
643 const QString &sDirector,
644 const QString &sStudio,
645 const QString &sPlot,
646 const QString &sRating,
647 const QString &sInetref,
649 const QString &sHomePage,
658 const QString &sFileName,
659 const QString &sHash,
660 const QString &sCoverFile,
665 const QString &sPlayCommand,
667 const QString &sTrailer,
668 const QString &sHost,
669 const QString &sScreenshot,
670 const QString &sBanner,
671 const QString &sFanart,
673 const QString &sContentType,
674 const QString &sGenres,
675 const QString &sCast,
676 const QString &sCountries)
678 bool update_required =
false;
682 mlm->setList(videolist);
687 LOG(VB_GENERAL, LOG_ERR, QString(
"UpdateVideoMetadata: Id=%1 not found")
694 metadata->SetTitle(sTitle);
695 update_required =
true;
700 metadata->SetSubtitle(sSubTitle);
701 update_required =
true;
706 metadata->SetTagline(sTagLine);
707 update_required =
true;
712 metadata->SetDirector(sDirector);
713 update_required =
true;
718 metadata->SetStudio(sStudio);
719 update_required =
true;
724 metadata->SetPlot(sPlot);
725 update_required =
true;
730 metadata->SetUserRating(fUserRating);
731 update_required =
true;
736 metadata->SetInetRef(sInetref);
737 update_required =
true;
742 metadata->SetCollectionRef(nCollectionRef);
743 update_required =
true;
748 metadata->SetHomepage(sHomePage);
749 update_required =
true;
754 metadata->SetYear(nYear);
755 update_required =
true;
760 metadata->SetReleaseDate(sReleasedate);
761 update_required =
true;
766 metadata->SetRating(sRating);
767 update_required =
true;
772 metadata->SetLength(std::chrono::minutes(nLength));
773 update_required =
true;
778 metadata->SetPlayCount(nPlayCount);
779 update_required =
true;
784 metadata->SetSeason(nSeason);
785 update_required =
true;
790 metadata->SetEpisode(nEpisode);
791 update_required =
true;
797 update_required =
true;
802 metadata->SetFilename(sFileName);
803 update_required =
true;
808 metadata->SetHash(sHash);
809 update_required =
true;
814 metadata->SetCoverFile(sCoverFile);
815 update_required =
true;
820 metadata->SetChildID(nChildID);
821 update_required =
true;
826 metadata->SetBrowse(bBrowse);
827 update_required =
true;
832 metadata->SetWatched(bWatched);
833 update_required =
true;
838 metadata->SetProcessed(bProcessed);
839 update_required =
true;
844 metadata->SetPlayCommand(sPlayCommand);
845 update_required =
true;
850 metadata->SetCategoryID(nCategory);
851 update_required =
true;
856 metadata->SetTrailer(sTrailer);
857 update_required =
true;
862 metadata->SetHost(sHost);
863 update_required =
true;
868 metadata->SetScreenshot(sScreenshot);
869 update_required =
true;
874 metadata->SetBanner(sBanner);
875 update_required =
true;
880 metadata->SetFanart(sFanart);
881 update_required =
true;
886 metadata->SetInsertdate(sInsertDate);
887 update_required =
true;
894 if (sContentType ==
"MOVIE")
897 if (sContentType ==
"TELEVISION")
900 if (sContentType ==
"ADULT")
903 if (sContentType ==
"MUSICVIDEO")
906 if (sContentType ==
"HOMEVIDEO")
911 metadata->SetContentType(contentType);
912 update_required =
true;
916 LOG(VB_GENERAL, LOG_ERR, QString(
"UpdateVideoMetadata: Ignoring unknown ContentType: %1").arg(sContentType));
923 QStringList genresList = sGenres.split(
',', Qt::SkipEmptyParts);
924 std::transform(genresList.cbegin(), genresList.cend(), std::back_inserter(genres),
925 [](
const QString& name)
926 {return VideoMetadata::genre_list::value_type(-1, name.simplified());} );
928 metadata->SetGenres(genres);
929 update_required =
true;
935 QStringList castList = sCast.split(
',', Qt::SkipEmptyParts);
936 std::transform(castList.cbegin(), castList.cend(), std::back_inserter(cast),
937 [](
const QString& name)
938 {return VideoMetadata::cast_list::value_type(-1, name.simplified());} );
940 metadata->SetCast(cast);
941 update_required =
true;
947 QStringList countryList = sCountries.split(
',', Qt::SkipEmptyParts);
948 std::transform(countryList.cbegin(), countryList.cend(), std::back_inserter(countries),
949 [](
const QString& name)
950 {return VideoMetadata::country_list::value_type(-1, name.simplified());} );
952 metadata->SetCountries(countries);
953 update_required =
true;
957 metadata->UpdateDatabase();
970 query.
prepare(
"SELECT filename "
971 "FROM videometadata "
972 "WHERE intid = :ID ");
984 fileName = query.
value(0).toString();
987 LOG(VB_GENERAL, LOG_ERR, QString(
"Video/SetSavedBookmark Video id %1 Not found.").arg(Id));
1017 query.
prepare(
"SELECT filename "
1018 "FROM videometadata "
1019 "WHERE intid = :ID ");
1031 fileName = query.
value(0).toString();
1034 LOG(VB_GENERAL, LOG_ERR, QString(
"Video/SetLastPlayPos Video id %1 Not found.").arg(Id));
1059 QString path = sPath;
1061 if (sPath.isEmpty())
1064 LOG(VB_GENERAL, LOG_NOTICE,
1065 QString(
"Parsing Blu-ray at path: %1 ").arg(path));
1070 throw( QString(
"Unable to open Blu-ray Metadata Parser!" ));
1072 if ( !bdmeta->OpenDisc() )
1073 throw( QString(
"Unable to open Blu-ray Disc/Path!" ));
1075 if ( !bdmeta->ParseDisc() )
1076 throw( QString(
"Unable to parse metadata from Blu-ray Disc/Path!" ));
1080 pBlurayInfo->setPath(path);
1081 pBlurayInfo->setTitle(bdmeta->GetTitle());
1082 pBlurayInfo->setAltTitle(bdmeta->GetAlternateTitle());
1083 pBlurayInfo->setDiscLang(bdmeta->GetDiscLanguage());
1084 pBlurayInfo->setDiscNum(bdmeta->GetCurrentDiscNumber());
1085 pBlurayInfo->setTotalDiscNum(bdmeta->GetTotalDiscNumber());
1086 pBlurayInfo->setTitleCount(bdmeta->GetTitleCount());
1087 pBlurayInfo->setThumbCount(bdmeta->GetThumbnailCount());
1088 pBlurayInfo->setTopMenuSupported(bdmeta->GetTopMenuSupported());
1089 pBlurayInfo->setFirstPlaySupported(bdmeta->GetFirstPlaySupported());
1090 pBlurayInfo->setNumHDMVTitles(bdmeta->GetNumHDMVTitles());
1091 pBlurayInfo->setNumBDJTitles(bdmeta->GetNumBDJTitles());
1092 pBlurayInfo->setNumUnsupportedTitles(bdmeta->GetNumUnsupportedTitles());
1093 pBlurayInfo->setAACSDetected(bdmeta->GetAACSDetected());
1094 pBlurayInfo->setLibAACSDetected(bdmeta->GetLibAACSDetected());
1095 pBlurayInfo->setAACSHandled(bdmeta->GetAACSHandled());
1096 pBlurayInfo->setBDPlusDetected(bdmeta->GetBDPlusDetected());
1097 pBlurayInfo->setLibBDPlusDetected(bdmeta->GetLibBDPlusDetected());
1098 pBlurayInfo->setBDPlusHandled(bdmeta->GetBDPlusHandled());
1100 QStringList thumbs = bdmeta->GetThumbnails();
1101 if (!thumbs.empty())
1102 pBlurayInfo->setThumbPath(thumbs.at(0));
1120 (
const QString &storageGroup,
1121 const QString &FileName )
1127 QString sFullFileName = storage.
FindFile( FileName );
1136 pVideoStreamInfos->setVersion ( MYTH_BINARY_VERSION );
1137 pVideoStreamInfos->setProtoVer ( MYTH_PROTO_VERSION );
1138 pVideoStreamInfos->setErrorCode ( infos.
m_errorCode );
1139 pVideoStreamInfos->setErrorMsg ( infos.
m_errorMsg );
1143 V2VideoStreamInfo *pVideoStreamInfo = pVideoStreamInfos->AddNewVideoStreamInfo();
1144 pVideoStreamInfo->setCodecType ( QString(QChar(
info.m_codecType)) );
1145 pVideoStreamInfo->setCodecName (
info.m_codecName );
1146 pVideoStreamInfo->setWidth (
info.m_width );
1147 pVideoStreamInfo->setHeight (
info.m_height );
1148 pVideoStreamInfo->setAspectRatio (
info.m_SampleAspectRatio );
1149 pVideoStreamInfo->setFieldOrder (
info.m_fieldOrder );
1150 pVideoStreamInfo->setFrameRate (
info.m_frameRate );
1151 pVideoStreamInfo->setAvgFrameRate (
info.m_avgFrameRate );
1152 pVideoStreamInfo->setChannels (
info.m_channels );
1153 pVideoStreamInfo->setDuration (
info.m_duration );
1156 return pVideoStreamInfos;
1165 const QString &offsettype,
1170 query.
prepare(
"SELECT filename "
1171 "FROM videometadata "
1172 "WHERE intid = :ID ");
1178 throw QString(
"Database Error.");
1184 fileName = query.
value(0).toString();
1187 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetVideoCommBreak Video id %1 Not found.").arg(Id));
1188 throw QString(
"Video Not Found.");
1209 if (offsettype.toLower() ==
"position")
1211 else if (offsettype.toLower() ==
"duration")
1227 const QString &offsettype,
1232 query.
prepare(
"SELECT filename "
1233 "FROM videometadata "
1234 "WHERE intid = :ID ");
1240 throw QString(
"Database Error.");
1246 fileName = query.
value(0).toString();
1249 LOG(VB_GENERAL, LOG_ERR, QString(
"V2Video/GetVideoCommBreak Video id %1 Not found.").arg(Id));
1250 throw QString(
"Video Not Found.");
1271 if (offsettype.toLower() ==
"position")
1273 else if (offsettype.toLower() ==
"duration")
1288 query.
prepare(
"SELECT intid,category "
1289 "FROM videocategory ");
1294 throw QString(
"Database Error.");
1297 while (query.
next())
1299 auto *
cat = pCatList->AddNewCategory();
1300 cat->setId(query.
value(0).toInt());
1301 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