- YTSearch *search = qobject_cast<YTSearch *>(videoSource);
- SearchParams *searchParams = search->getSearchParams();
+ SearchParams *searchParams;
+ if (clazz == QLatin1String("YTSearch")) {
+ auto search = qobject_cast<YTSearch *>(videoSource);
+ searchParams = search->getSearchParams();
+ } else if (clazz == QLatin1String("IVSearch")) {
+ auto search = qobject_cast<IVSearch *>(videoSource);
+ searchParams = search->getSearchParams();
+ } else if (clazz == QLatin1String("IVChannelSource")) {
+ auto search = qobject_cast<IVChannelSource *>(videoSource);
+ searchParams = search->getSearchParams();
+ }