/** * @brief TheTvDbImages::TheTvDbImages * @param parent */ TheTvDbImages::TheTvDbImages(QObject *parent) { setParent(parent); m_provides << ImageType::TvShowPoster << ImageType::TvShowBackdrop << ImageType::TvShowBanner << ImageType::TvShowSeasonPoster << ImageType::TvShowEpisodeThumb << ImageType::TvShowSeasonBanner << ImageType::TvShowSeasonBackdrop; m_dummyShow = new TvShow(QString(), this); m_dummyEpisode = new TvShowEpisode(QStringList(), m_dummyShow); m_tvdb = new TheTvDb(this); m_searchResultLimit = 0; connect(m_tvdb, SIGNAL(sigSearchDone(QList<ScraperSearchResult>)), this, SLOT(onSearchTvShowFinished(QList<ScraperSearchResult>))); connect(m_dummyShow, SIGNAL(sigLoaded(TvShow*)), this, SLOT(onLoadTvShowDataFinished())); connect(m_dummyEpisode, SIGNAL(sigLoaded()), this, SLOT(onLoadTvShowDataFinished())); }
void ImportDialog::onTvShowChosen() { if (m_episode) m_episode->deleteLater(); ui->stackedWidget->slideInIdx(1, SlidingStackedWidget::RIGHT2LEFT); ui->loading->setVisible(true); ui->labelLoading->setText(tr("Loading episode information...")); ui->badgeSuccess->setVisible(false); ui->formLayout->setEnabled(false); m_episode = new TvShowEpisode(files(), m_show); m_episode->setSeason(TvShowFileSearcher::getSeasonNumber(files())); QList<int> episodes = TvShowFileSearcher::getEpisodeNumbers(files()); if (!episodes.isEmpty()) m_episode->setEpisode(episodes.first()); m_episode->loadData(ui->tvShowSearchEpisode->scraperId(), Manager::instance()->tvScrapers().at(0), ui->tvShowSearchEpisode->infosToLoad()); connect(m_episode, SIGNAL(sigLoaded()), this, SLOT(onEpisodeLoadDone()), Qt::UniqueConnection); }
/** * @brief Called from the scraper when loading has finished */ void TvShowEpisode::scraperLoadDone() { emit sigLoaded(); }
/** * @brief Called from the scraper interface */ void TvShow::scraperLoadDone() { emit sigLoaded(this); }