MCPcopy Create free account
hub / github.com/QNapi/qnapi / lookForSubtitles

Method lookForSubtitles

gui/src/qnapi.cpp:72–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72bool QNapi::lookForSubtitles(QString lang, QString engine) {
73 bool result = false;
74
75 if (engine.isEmpty()) {
76 foreach (QSharedPointer<SubtitleDownloadEngine> e, enginesList) {
77 e->setMoviePath(movie);
78 result = e->lookForSubtitles(lang) || result;
79 }
80 } else {
81 QSharedPointer<SubtitleDownloadEngine> e = engineByName(engine);
82 if (e) {
83 e->setMoviePath(movie);
84 result = e->lookForSubtitles(lang);
85 }
86 }
87
88 if (!result) {
89 errorMsg = QObject::tr("No subtitles found!");
90 }
91
92 return result;
93}
94
95QList<SubtitleInfo> QNapi::listSubtitles() {
96 subtitlesList.clear();

Callers 3

foreachFunction · 0.45
foreachFunction · 0.45
foreachFunction · 0.45

Calls 1

setMoviePathMethod · 0.45

Tested by

no test coverage detected