Ticket #5338: MythVideo.Watched.081109.diff

File MythVideo.Watched.081109.diff, 24.1 KB (added by robertm, 12 years ago)

Preliminary patch for trunk. Theme support not included yet.

  • mythvideo/mythvideo/videodlg.h

     
    7676
    7777    void EditMetadata();
    7878    void VideoSearch();
     79    void AllMetaDownload();
    7980    void TitleSubtitleSearch();
    8081    void ImageOnlyDownload();
    8182    void ManualVideoUID();
    8283    void ManualVideoTitle();
    8384    void ResetMetadata();
    8485    void ToggleBrowseable();
     86    void ToggleWatched();
    8587    void RemoveVideo();
    8688    void OnRemoveVideo(bool);
    8789
  • mythvideo/mythvideo/metadatalistmanager.cpp

     
    114114    const QString BaseMetadataQuery(
    115115        "SELECT title, director, plot, rating, year, "
    116116        "userrating, length, filename, showlevel, "
    117         "coverfile, inetref, childid, browse, playcommand, category, "
    118         "intid, trailer, screenshot, banner, fanart, "
     117        "coverfile, inetref, childid, browse, watched, playcommand, "
     118        "category, intid, trailer, screenshot, banner, fanart, "
    119119        "subtitle, season, episode, host FROM videometadata");
    120120
    121121    query.prepare(BaseMetadataQuery);
  • mythvideo/mythvideo/metadata.cpp

     
    9595             const QString &rating, int length,
    9696             int season, int episode,
    9797             int id, ParentalLevel::Level showlevel, int categoryID,
    98              int childID, bool browse,
     98             int childID, bool browse, bool watched,
    9999             const QString &playcommand, const QString &category,
    100100             const genre_list &genres,
    101101             const country_list &countries,
     
    110110        m_host(host), m_categoryID(categoryID), m_childID(childID),
    111111        m_year(year), m_length(length), m_season(season),
    112112        m_episode(episode), m_showlevel(showlevel),
    113         m_browse(browse), m_id(id), m_userrating(userrating)
     113        m_browse(browse), m_watched(watched), m_id(id),
     114        m_userrating(userrating)
    114115    {
    115116        VideoCategory::GetCategory().get(m_categoryID, m_category);
    116117    }
     
    155156            m_episode = rhs.m_episode;
    156157            m_showlevel = rhs.m_showlevel;
    157158            m_browse = rhs.m_browse;
     159            m_watched = rhs.m_watched;
    158160            m_id = rhs.m_id;
    159161            m_userrating = rhs.m_userrating;
    160162            m_host = rhs.m_host;
     
    272274    bool GetBrowse() const { return m_browse; }
    273275    void SetBrowse(bool browse) { m_browse = browse; }
    274276
     277    bool GetWatched() const { return m_watched; }
     278    void SetWatched(bool watched) { m_watched = watched; }
     279
    275280    unsigned int GetID() const { return m_id; }
    276281    void SetID(int id) { m_id = id; }
    277282
     
    329334    int m_episode;
    330335    ParentalLevel::Level m_showlevel;
    331336    bool m_browse;
     337    bool m_watched;
    332338    unsigned int m_id;  // videometadata.intid
    333339    float m_userrating;
    334340
     
    407413                    VIDEO_RATING_DEFAULT, 0,
    408414                    Metadata::FilenameToMeta(m_filename, 2).toInt(),
    409415                    Metadata::FilenameToMeta(m_filename, 3).toInt(), m_id,
    410                     ParentalLevel::plLowest, 0, -1, true, "", "",
     416                    ParentalLevel::plLowest, 0, -1, true, false, "", "",
    411417                    Metadata::genre_list(), Metadata::country_list(),
    412418                    Metadata::cast_list(), m_host);
    413419    tmp.m_prefix = m_prefix;
     
    497503    m_inetref = query.value(10).toString();
    498504    m_childID = query.value(11).toUInt();
    499505    m_browse = query.value(12).toBool();
    500     m_playcommand = query.value(13).toString();
    501     m_categoryID = query.value(14).toInt();
    502     m_id = query.value(15).toInt();
    503     m_trailer = query.value(16).toString();
    504     m_screenshot = query.value(17).toString();
    505     m_banner = query.value(18).toString();
    506     m_fanart = query.value(19).toString();
    507     m_subtitle = query.value(20).toString();
    508     m_season = query.value(21).toInt();
    509     m_episode = query.value(22).toInt();
    510     m_host = query.value(23).toString();
     506    m_watched = query.value(13).toBool();
     507    m_playcommand = query.value(14).toString();
     508    m_categoryID = query.value(15).toInt();
     509    m_id = query.value(16).toInt();
     510    m_trailer = query.value(17).toString();
     511    m_screenshot = query.value(18).toString();
     512    m_banner = query.value(19).toString();
     513    m_fanart = query.value(20).toString();
     514    m_subtitle = query.value(21).toString();
     515    m_season = query.value(22).toInt();
     516    m_episode = query.value(23).toInt();
     517    m_host = query.value(24).toString();
    511518
    512519    VideoCategory::GetCategory().get(m_categoryID, m_category);
    513520
     
    562569    {
    563570        m_browse = gContext->GetNumSetting("VideoNewBrowsable", 1);
    564571
     572        m_watched = 0;
     573
    565574        query.prepare("INSERT INTO videometadata (title,subtitle,director,plot,"
    566575                      "rating,year,userrating,length,season,episode,filename,"
    567                       "showlevel,coverfile,inetref,browse,trailer,screenshot,banner,"
    568                       "fanart,host) VALUES (:TITLE, :SUBTITLE, :DIRECTOR, :PLOT, "
    569                       ":RATING, :YEAR, :USERRATING, :LENGTH, :SEASON, :EPISODE, "
    570                       ":FILENAME, :SHOWLEVEL, :COVERFILE, :INETREF, :BROWSE, "
    571                       ":TRAILER, :SCREENSHOT, :BANNER, :FANART, :HOST)");
     576                      "showlevel,coverfile,inetref,browse,watched,trailer,"
     577                      "screenshot,banner,fanart,host) VALUES (:TITLE, :SUBTITLE, "
     578                      ":DIRECTOR, :PLOT, :RATING, :YEAR, :USERRATING, :LENGTH, "
     579                      ":SEASON, :EPISODE, :FILENAME, :SHOWLEVEL, :COVERFILE, "
     580                      ":INETREF, :BROWSE, :WATCHED, :TRAILER, :SCREENSHOT, "
     581                      ":BANNER, :FANART, :HOST)");
    572582    }
    573583    else
    574584    {
     
    579589                      "filename = :FILENAME, trailer = :TRAILER, "
    580590                      "showlevel = :SHOWLEVEL, coverfile = :COVERFILE, "
    581591                      "screenshot = :SCREENSHOT, banner = :BANNER, fanart = :FANART, "
    582                       "inetref = :INETREF, browse = :BROWSE, host = :HOST, "
    583                       "playcommand = :PLAYCOMMAND, childid = :CHILDID, "
     592                      "inetref = :INETREF, browse = :BROWSE, watched = :WATCHED, "
     593                      "host = :HOST, playcommand = :PLAYCOMMAND, childid = :CHILDID, "
    584594                      "category = :CATEGORY WHERE intid = :INTID");
    585595
    586596        query.bindValue(":PLAYCOMMAND", m_playcommand);
     
    608618    query.bindValue(":FANART", m_fanart);
    609619    query.bindValue(":INETREF", m_inetref);
    610620    query.bindValue(":BROWSE", m_browse);
     621    query.bindValue(":WATCHED", m_watched);
    611622    query.bindValue(":HOST", m_host);
    612623
    613624    if (!query.exec() || !query.isActive())
     
    902913             const QString &rating, int length,
    903914             int season, int episode,
    904915             int id, ParentalLevel::Level showlevel, int categoryID,
    905              int childID, bool browse,
     916             int childID, bool browse, bool watched,
    906917             const QString &playcommand, const QString &category,
    907918             const genre_list &genres,
    908919             const country_list &countries,
     
    912923    m_imp = new MetadataImp(filename, trailer, coverfile, screenshot, banner,
    913924                            fanart, title, subtitle, year, inetref, director, plot,
    914925                            userrating, rating, length, season, episode, id,
    915                             showlevel, categoryID, childID, browse, playcommand,
    916                             category, genres, countries, cast, host);
     926                            showlevel, categoryID, childID, browse, watched,
     927                            playcommand, category, genres, countries, cast, host);
    917928}
    918929
    919930Metadata::~Metadata()
     
    11061117    m_imp->SetBrowse(browse);
    11071118}
    11081119
     1120bool Metadata::GetWatched() const
     1121{
     1122    return m_imp->GetWatched();
     1123}
     1124
     1125void Metadata::SetWatched(bool watched)
     1126{
     1127    m_imp->SetWatched(watched);
     1128}
     1129
    11091130const QString &Metadata::GetPlayCommand() const
    11101131{
    11111132    return m_imp->getPlayCommand();
  • mythvideo/mythvideo/globalsettings.cpp

     
    195195    return gc;
    196196}
    197197
     198HostSpinBox *WatchedThreshhold()
     199{
     200    HostSpinBox *rc = new HostSpinBox("mythvideo.WatchedThreshhold", 0,
     201            200, 1);
     202    rc->setLabel(QObject::tr("Video is watched after (minutes)"));
     203    rc->setValue(0);
     204    rc->setHelpText(QObject::tr("The number of minutes a video should "
     205                    "play before being considered watched.  0 will never "
     206                    "mark a video watched."));
     207    return rc;
     208}
     209
    198210HostLineEdit *SearchListingsCommand()
    199211{
    200212    HostLineEdit *gc = new HostLineEdit("MovieListCommandLine");
     
    808820    page2->addChild(VideoSortIgnoresCase());
    809821    page2->addChild(VideoDBFolderView());
    810822    page2->addChild(VideoTreeRemember());
     823    page2->addChild(WatchedThreshhold());
    811824
    812825    VConfigPage page3(pages, false);
    813826    page3->addChild(SetDVDDevice());
  • mythvideo/mythvideo/videofilter.h

     
    3030        kFilterInetRefChanged = (1 << 8),
    3131        kFilterCoverFileChanged = (1 << 9),
    3232        kFilterParentalLevelChanged = (1 << 10),
    33         kFilterCastChanged = (1 << 11)
     33        kFilterCastChanged = (1 << 11),
     34        kFilterWatchedChanged = (1 << 12)
    3435    };
    3536
    3637  public:
     
    114115        browse = lbrowse;
    115116    }
    116117
     118    int GetWatched() const {return watched; }
     119    void SetWatched(int lwatched)
     120    {
     121        m_changed_state |= kFilterWatchedChanged;
     122        watched = lwatched;
     123    }
     124
    117125    ordering getOrderby() const { return orderby; }
    118126    void setOrderby(ordering lorderby)
    119127    {
     
    158166    int runtime;
    159167    int userrating;
    160168    int browse;
     169    int watched;
    161170    int m_inetref;
    162171    int m_coverfile;
    163172    ordering orderby;
     
    220229    void SetCast(MythUIButtonListItem *item);
    221230    void setRunTime(MythUIButtonListItem *item);
    222231    void SetBrowse(MythUIButtonListItem *item);
     232    void SetWatched(MythUIButtonListItem *item);
    223233    void SetInetRef(MythUIButtonListItem *item);
    224234    void SetCoverFile(MythUIButtonListItem *item);
    225235    void setOrderby(MythUIButtonListItem *item);
     
    230240    VideoFilterSettings m_settings;
    231241
    232242    MythUIButtonList  *m_browseList;
     243    MythUIButtonList  *m_watchedList;
    233244    MythUIButtonList  *m_orderbyList;
    234245    MythUIButtonList  *m_yearList;
    235246    MythUIButtonList  *m_userratingList;
  • mythvideo/mythvideo/dbcheck.cpp

     
    3838    const QString lastMythDVDDBVersion = "1002";
    3939    const QString lastMythVideoVersion = "1010";
    4040
    41     const QString currentDatabaseVersion = "1024";
     41    const QString currentDatabaseVersion = "1025";
    4242
    4343    const QString OldMythVideoVersionName = "VideoDBSchemaVer";
    4444    const QString OldMythDVDVersionName = "DVDDBSchemaVer";
     
    844844            performActualUpdate(updates, "1024", dbver, MythVideoVersionName);
    845845        }
    846846
     847        if (dbver == "1024")
     848        {
     849            QStringList updates;
     850            updates +=
     851            "ALTER TABLE videometadata ADD watched BOOL NOT NULL DEFAULT 0;";
     852            performActualUpdate(updates, "1025", dbver, MythVideoVersionName);
     853        }
     854
    847855    }
    848856}
    849857
  • mythvideo/mythvideo/videoutils.cpp

     
    156156    return browse ? QObject::tr("Yes") : QObject::tr("No");
    157157}
    158158
     159QString GetDisplayWatched(bool watched)
     160{
     161    return watched ? QObject::tr("Yes") : QObject::tr("No");
     162}
     163
    159164QString GetDisplayYear(int year)
    160165{
    161166    return year == VIDEO_YEAR_DEFAULT ? "?" : QString::number(year);
  • mythvideo/mythvideo/editmetadata.h

     
    4343    void SetLevel(MythUIButtonListItem*);
    4444    void SetChild(MythUIButtonListItem*);
    4545    void ToggleBrowse();
     46    void ToggleWatched();
    4647    void FindCoverArt();
    4748    void FindBanner();
    4849    void FindFanart();
     
    7273    MythUIButtonList      *m_levelList;
    7374    MythUIButtonList      *m_childList;
    7475    MythUICheckBox      *m_browseCheck;
     76    MythUICheckBox      *m_watchedCheck;
    7577    MythUIButton        *m_coverartButton;
    7678    MythUIText          *m_coverartText;
    7779    MythUIButton        *m_screenshotButton;
  • mythvideo/mythvideo/videodlg.cpp

     
    13411341                break;
    13421342        }
    13431343        while (item && playing_time.elapsed() > WATCHED_WATERMARK);
     1344
     1345        int thresh = gContext->GetNumSetting("mythvideo.watchedThreshhold", 0);
     1346        long long int watched = (thresh * 60000);
     1347        if ((playing_time.elapsed() > watched) && (watched > 0))
     1348            item->SetWatched(true);
    13441349    }
    13451350
    13461351    struct CopyMetadataDestination
     
    15291534            tmp["inetref"] = metadata->GetInetRef();
    15301535            tmp["child_id"] = QString::number(metadata->GetChildID());
    15311536            tmp["browseable"] = GetDisplayBrowse(metadata->GetBrowse());
     1537            tmp["watched"] = GetDisplayWatched(metadata->GetWatched());
    15321538            tmp["category"] = metadata->GetCategory();
    15331539        }
    15341540
     
    15891595        h.handleText("inetref");
    15901596        h.handleText("child_id");
    15911597        h.handleText("browseable");
     1598        h.handleText("watched");
    15921599        h.handleText("category");
    15931600
    15941601        h.handleState("trailerstate");
     
    29532960            SLOT(ManualVideoTitle()));
    29542961    m_menuPopup->AddButton(tr("Reset Metadata"), SLOT(ResetMetadata()));
    29552962    m_menuPopup->AddButton(tr("Toggle Browseable"), SLOT(ToggleBrowseable()));
     2963    m_menuPopup->AddButton(tr("Toggle Watched"), SLOT(ToggleWatched()));
    29562964    m_menuPopup->AddButton(tr("Remove Video"), SLOT(RemoveVideo()));
    29572965
    29582966    m_menuPopup->AddButton(tr("Cancel"));
     
    32953303    }
    32963304}
    32973305
     3306void VideoDialog::ToggleWatched()
     3307{
     3308    Metadata *metadata = GetMetadata(GetItemCurrent());
     3309    if (metadata)
     3310    {
     3311        metadata->SetWatched(!metadata->GetWatched());
     3312        metadata->UpdateDatabase();
     3313
     3314        refreshData();
     3315    }
     3316}
     3317
    32983318// void VideoDialog::OnVideoSearchListCancel()
    32993319// {
    33003320//     // I'm keeping this behavior for now, though item
  • mythvideo/mythvideo/videofilter.cpp

     
    5151    kBrowseFilterAll = -1
    5252};
    5353
     54enum WatchedFilter {
     55    kWatchedFilterAll = -1
     56};       
     57
    5458enum InetRefFilter {
    5559    kInetRefFilterAll = -1,
    5660    kInetRefFilterUnknown = 0
     
    7074    country(kCountryFilterAll), cast(kCastFilterAll),
    7175    year(kYearFilterAll), runtime(kRuntimeFilterAll),
    7276    userrating(kUserRatingFilterAll), browse(kBrowseFilterAll),
    73     m_inetref(kInetRefFilterAll), m_coverfile(kCoverFileFilterAll),
    74     orderby(kOrderByTitle), m_parental_level(ParentalLevel::plNone),
    75     m_changed_state(0)
     77    watched(kWatchedFilterAll), m_inetref(kInetRefFilterAll),
     78    m_coverfile(kCoverFileFilterAll), orderby(kOrderByTitle),
     79    m_parental_level(ParentalLevel::plNone), m_changed_state(0)
    7680{
    7781    if (_prefix.isEmpty())
    7882        prefix = "VideoDefault";
     
    99103                                        kUserRatingFilterAll);
    100104        browse = gContext->GetNumSetting(QString("%1Browse").arg(prefix),
    101105                                         kBrowseFilterAll);
     106        watched = gContext->GetNumSetting(QString("%1Watched").arg(prefix),
     107                                         kWatchedFilterAll);
    102108        m_inetref = gContext->GetNumSetting(QString("%1InetRef").arg(prefix),
    103109                kInetRefFilterAll);
    104110        m_coverfile = gContext->GetNumSetting(QString("%1CoverFile")
     
    168174        browse = rhs.browse;
    169175    }
    170176
     177    if (watched != rhs.watched)
     178    {
     179        m_changed_state |= kFilterWatchedChanged;
     180        watched = rhs.watched;
     181    }
     182
    171183    if (m_inetref != rhs.m_inetref)
    172184    {
    173185        m_changed_state |= kFilterInetRefChanged;
     
    205217    gContext->SaveSetting(QString("%1Runtime").arg(prefix), runtime);
    206218    gContext->SaveSetting(QString("%1Userrating").arg(prefix), userrating);
    207219    gContext->SaveSetting(QString("%1Browse").arg(prefix), browse);
     220    gContext->SaveSetting(QString("%1Watched").arg(prefix), watched);
    208221    gContext->SaveSetting(QString("%1InetRef").arg(prefix), m_inetref);
    209222    gContext->SaveSetting(QString("%1CoverFile").arg(prefix), m_coverfile);
    210223    gContext->SaveSetting(QString("%1Orderby").arg(prefix), orderby);
     
    307320        matches = mdata.GetBrowse() == browse;
    308321    }
    309322
     323    if (matches && watched != kWatchedFilterAll)
     324    {
     325        matches = mdata.GetWatched() == watched;
     326    }
     327
    310328    if (matches && m_inetref != kInetRefFilterAll)
    311329    {
    312330        matches = mdata.GetInetRef() == VIDEO_INETREF_DEFAULT;
     
    429447/////////////////////////////////
    430448VideoFilterDialog::VideoFilterDialog(MythScreenStack *lparent, QString lname,
    431449        VideoList *video_list) : MythScreenType(lparent, lname),
    432     m_browseList(0), m_orderbyList(0), m_yearList(0), m_userratingList(0),
    433     m_categoryList(0), m_countryList(0), m_genreList(0), m_castList(0),
    434     m_runtimeList(0), m_inetrefList(0), m_coverfileList(0), m_saveButton(0),
    435     m_doneButton(0), m_numvideosText(0), m_videoList(*video_list)
     450    m_browseList(0), m_watchedList(0), m_orderbyList(0), m_yearList(0),
     451    m_userratingList(0), m_categoryList(0), m_countryList(0), m_genreList(0),
     452    m_castList(0), m_runtimeList(0), m_inetrefList(0), m_coverfileList(0),
     453    m_saveButton(0), m_doneButton(0), m_numvideosText(0), m_videoList(*video_list)
    436454{
    437455    m_fsp = new BasicFilterSettingsProxy<VideoList>(*video_list);
    438456    m_settings = m_fsp->getSettings();
     
    457475    UIUtilE::Assign(this, m_castList, "cast_select", &err);
    458476    UIUtilE::Assign(this, m_runtimeList, "runtime_select", &err);
    459477    UIUtilE::Assign(this, m_browseList, "browse_select", &err);
     478    UIUtilE::Assign(this, m_watchedList, "watched_select", &err);
    460479    UIUtilE::Assign(this, m_inetrefList, "inetref_select", &err);
    461480    UIUtilE::Assign(this, m_coverfileList, "coverfile_select", &err);
    462481    UIUtilE::Assign(this, m_orderbyList, "orderby_select", &err);
     
    494513            SLOT(setRunTime(MythUIButtonListItem*)));
    495514    connect(m_browseList, SIGNAL(itemSelected(MythUIButtonListItem*)),
    496515            SLOT(SetBrowse(MythUIButtonListItem*)));
     516    connect(m_watchedList, SIGNAL(itemSelected(MythUIButtonListItem*)),
     517            SLOT(SetWatched(MythUIButtonListItem*)));
    497518    connect(m_inetrefList, SIGNAL(itemSelected(MythUIButtonListItem*)),
    498519            SLOT(SetInetRef(MythUIButtonListItem*)));
    499520    connect(m_coverfileList, SIGNAL(itemSelected(MythUIButtonListItem*)),
     
    664685                                qVariantFromValue(0));
    665686    m_browseList->SetValueByData(m_settings.GetBrowse());
    666687
     688    // Watched
     689    new MythUIButtonListItem(m_watchedList, QObject::tr("All"), kWatchedFilterAll);
     690    new MythUIButtonListItem(m_watchedList, QObject::tr("Yes"),
     691                                qVariantFromValue(1));
     692    new MythUIButtonListItem(m_watchedList, QObject::tr("No"),
     693                                qVariantFromValue(0));
     694    m_watchedList->SetValueByData(m_settings.GetWatched());
     695
    667696    // Inet Reference
    668697    new MythUIButtonListItem(m_inetrefList, QObject::tr("All"),
    669698                           kInetRefFilterAll);
     
    760789    update_numvideo();
    761790}
    762791
     792void VideoFilterDialog::SetWatched(MythUIButtonListItem *item)
     793{
     794    m_settings.SetWatched(item->GetData().toInt());
     795    update_numvideo();
     796}
     797
    763798void VideoFilterDialog::SetInetRef(MythUIButtonListItem *item)
    764799{
    765800    m_settings.SetInetRef(item->GetData().toInt());
  • mythvideo/mythvideo/metadata.h

     
    7272             int categoryID = 0,
    7373             int childID = -1,
    7474             bool browse = true,
     75             bool watched = false,
    7576             const QString &playcommand = QString(),
    7677             const QString &category = QString(),
    7778             const genre_list &genres = genre_list(),
     
    133134    bool GetBrowse() const;
    134135    void SetBrowse(bool browse);
    135136
     137    bool GetWatched() const;
     138    void SetWatched(bool watched);
     139
    136140    const QString &GetPlayCommand() const;
    137141    void SetPlayCommand(const QString &playCommand);
    138142
  • mythvideo/mythvideo/editmetadata.cpp

     
    2626    m_origMetadata(source_metadata), m_titleEdit(0), m_subtitleEdit(0),
    2727    m_playerEdit(0), m_seasonSpin(0), m_episodeSpin(0),
    2828    m_categoryList(0), m_levelList(0), m_childList(0),
    29     m_browseCheck(0), m_coverartButton(0), m_coverartText(0),
    30     m_screenshotButton(0), m_screenshotText(0),
     29    m_browseCheck(0), m_watchedCheck(0), m_coverartButton(0),
     30    m_coverartText(0), m_screenshotButton(0), m_screenshotText(0),
    3131    m_bannerButton(0), m_bannerText(0),
    3232    m_fanartButton(0), m_fanartText(0),
    3333    m_trailerButton(0), m_trailerText(0),
     
    6666    UIUtilE::Assign(this, m_childList, "child_select", &err);
    6767
    6868    UIUtilE::Assign(this, m_browseCheck, "browse_check", &err);
     69    UIUtilE::Assign(this, m_watchedCheck, "watched_check", &err);
    6970
    7071    UIUtilE::Assign(this, m_coverartButton, "coverart_button", &err);
    7172    UIUtilE::Assign(this, m_bannerButton, "banner_button", &err);
     
    9899    connect(m_screenshotButton, SIGNAL(Clicked()), SLOT(FindScreenshot()));
    99100
    100101    connect(m_browseCheck, SIGNAL(valueChanged()), SLOT(ToggleBrowse()));
     102    connect(m_watchedCheck, SIGNAL(valueChanged()), SLOT(ToggleWatched()));
    101103
    102104    connect(m_childList, SIGNAL(itemSelected(MythUIButtonListItem*)),
    103105            SLOT(SetChild(MythUIButtonListItem*)));
     
    281283
    282284    if (m_workingMetadata->GetBrowse())
    283285        m_browseCheck->SetCheckState(MythUIStateType::Full);
     286    if (m_workingMetadata->GetWatched())
     287        m_watchedCheck->SetCheckState(MythUIStateType::Full);
    284288    m_coverartText->SetText(m_workingMetadata->GetCoverFile());
    285289    m_screenshotText->SetText(m_workingMetadata->GetScreenshot());
    286290    m_bannerText->SetText(m_workingMetadata->GetBanner());
     
    371375            SetBrowse(m_browseCheck->GetBooleanCheckState());
    372376}
    373377
     378void EditMetadataDialog::ToggleWatched()
     379{
     380    m_workingMetadata->
     381            SetWatched(m_watchedCheck->GetBooleanCheckState());
     382}
     383
    374384void EditMetadataDialog::FindCoverArt()
    375385{
    376386    FindImagePopup(gContext->GetSetting("VideoArtworkDir"),
  • mythvideo/mythvideo/videoutils.h

     
    3535QString GetDisplayLength(int length);
    3636QString GetDisplaySeasonEpisode(int seasEp, int digits);
    3737QString GetDisplayBrowse(bool browse);
     38QString GetDisplayWatched(bool watched);
    3839QString GetDisplayYear(int year);
    3940QString GetDisplayRating(const QString &rating);
    4041