diff options
author | Arno <arno@disconnect.de> | 2025-02-22 12:32:10 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2025-02-22 12:32:10 +0100 |
commit | 65fec2cecdf8345c7b6b6e8ad5b83d6b5a6dad80 (patch) | |
tree | 84f63aea2b6af37b3a999732d65a03cfa6ca96f5 /movieinfopage.cpp | |
parent | a90ed071336371936abb25b6de892c543d3c30cf (diff) | |
download | SheMov-65fec2cecdf8345c7b6b6e8ad5b83d6b5a6dad80.tar.gz SheMov-65fec2cecdf8345c7b6b6e8ad5b83d6b5a6dad80.tar.bz2 SheMov-65fec2cecdf8345c7b6b6e8ad5b83d6b5a6dad80.zip |
Guess actors from filename
Continuing to use the filename pattern: use the first capture group
split by '&' as possible actors.
Diffstat (limited to 'movieinfopage.cpp')
-rw-r--r-- | movieinfopage.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/movieinfopage.cpp b/movieinfopage.cpp index 4b02b05..22a2b65 100644 --- a/movieinfopage.cpp +++ b/movieinfopage.cpp @@ -28,6 +28,7 @@ #include <QApplication> #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<NewMovieWizard*>(wizard()); + wiz->setPossibleActors(aRes); mSubtitle->setText(subtitle); mCreationDate->setDate(created); return true; |