VideoInformationPlugin* VideoInformation::getRegisteredPlugin(const QString pluginId) { for (int n = 0; n < plugins->count(); n++) { VideoInformationPlugin *plugin = plugins->at(n); // compare names if (plugin->getID() == pluginId) return plugin; } // not found return NULL; }
bool VideoInformation::isBlockedHost(QString URL, BlockedState &result) { VideoInformationPlugin *service = getPluginByHost(QUrl(URL)); result = bsNotBlocked; if (service != NULL) { if (service->hasAdultContent() && blockAdultContent) result = bsAdultContent; else if (blockAdultContentList.indexOf(service->getID(), 0) != -1) result = bsBlocked; } return result != bsNotBlocked; }