From 65fec2cecdf8345c7b6b6e8ad5b83d6b5a6dad80 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 22 Feb 2025 12:32:10 +0100 Subject: Guess actors from filename Continuing to use the filename pattern: use the first capture group split by '&' as possible actors. --- movieinfopage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'movieinfopage.cpp') diff --git a/movieinfopage.cpp b/movieinfopage.cpp index 4b02b05..22a2b65 100644 --- a/movieinfopage.cpp +++ b/movieinfopage.cpp @@ -28,6 +28,7 @@ #include #include "movieinfopage.h" +#include "newmoviewizard.h" #include "wizardtreemodel.h" #include "smtreeview.h" #include "delegates.h" @@ -249,9 +250,12 @@ bool MovieInfoPage::extractFromTitle(const QString &title){ QString subtitle = titleMatch.captured(2).simplified().toLower(); QDate created = QDate::fromString(titleMatch.captured(3), Qt::ISODate); QStringList actors = titleMatch.captured(1).split('&'); + QStringList aRes; for(const auto &a : std::as_const(actors)){ - mPossbileActors.append(a.simplified().toLower()); + aRes.append(a.simplified().toLower()); } + auto wiz = static_cast(wizard()); + wiz->setPossibleActors(aRes); mSubtitle->setText(subtitle); mCreationDate->setDate(created); return true; -- cgit v1.2.3-70-g09d2