Ejemplo n.º 1
0
/**
 * @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()));
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
/**
 * @brief Called from the scraper when loading has finished
 */
void TvShowEpisode::scraperLoadDone()
{
    emit sigLoaded();
}
Ejemplo n.º 4
0
/**
 * @brief Called from the scraper interface
 */
void TvShow::scraperLoadDone()
{
    emit sigLoaded(this);
}