Permalink
Browse files

DVD: Remove the "Delete DVD Bookmarks after x days" setting.

Even with a massive, massive library, the size of all DVD bookmarks is minute even compared to a single recoding seektable.  If you don't want a bookmark to exist any more, then just unset the bookmark.
  • Loading branch information...
1 parent 444c43f commit bf706173ec7ddd6c9d8f3efa02eeeb201ed53407 Robert McNamara committed Dec 21, 2010
@@ -160,16 +160,6 @@ HostComboBox *SetOnInsertDVD()
return gc;
}
-HostSlider *DVDBookmarkDays()
-{
- HostSlider *gs = new HostSlider("DVDBookmarkDays",5, 50, 5);
- gs->setLabel(QObject::tr("Remove DVD Bookmarks Older than (days)"));
- gs->setValue(10);
- gs->setHelpText((QObject::tr("Delete DVD Bookmarks that are older than the "
- "number of days specified.")));
- return gs;
-}
-
HostSlider *SetDVDDriveSpeed()
{
HostSlider *gs = new HostSlider("DVDDriveSpeed", 2, 12, 2);
@@ -296,7 +286,6 @@ VideoGeneralSettings::VideoGeneralSettings()
VConfigPage page2(pages, false);
page2->addChild(SetOnInsertDVD());
page2->addChild(SetDVDDriveSpeed());
- page2->addChild(DVDBookmarkDays());
// page 3
VerticalConfigurationGroup *pctrl =
@@ -2207,7 +2207,7 @@ uint64_t ProgramInfo::QueryBookmark(uint chanid, const QDateTime &recstartts)
* \return list containing title, audio track, subtitle, framenum
*/
QStringList ProgramInfo::QueryDVDBookmark(
- const QString &serialid, bool delbookmark) const
+ const QString &serialid) const
{
QStringList fields = QStringList();
MSqlQuery query(MSqlQuery::InitCon());
@@ -2226,18 +2226,6 @@ QStringList ProgramInfo::QueryDVDBookmark(
}
}
- if (delbookmark)
- {
- int days = -(gCoreContext->GetNumSetting("DVDBookmarkDays", 10));
- QDateTime removedate = mythCurrentDateTime().addDays(days);
- query.prepare(" DELETE from dvdbookmark "
- " WHERE timestamp < ? ");
- query.addBindValue(removedate.toString(Qt::ISODate));
-
- if (!query.exec())
- MythDB::DBError("GetDVDBookmark deleting old entries", query);
- }
-
return fields;
}
@@ -489,8 +489,7 @@ class MPUBLIC ProgramInfo
uint QueryMplexID(void) const;
QDateTime QueryBookmarkTimeStamp(void) const;
uint64_t QueryBookmark(void) const;
- QStringList QueryDVDBookmark(const QString &serialid,
- bool delbookmark) const;
+ QStringList QueryDVDBookmark(const QString &serialid) const;
bool QueryIsEditing(void) const;
bool QueryIsInUse(QStringList &byWho) const;
bool QueryIsInUse(QString &byWho) const;
@@ -368,8 +368,7 @@ uint64_t MythDVDPlayer::GetBookmark(void)
player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
return 0;
}
- dvdbookmark = player_ctx->playingInfo->QueryDVDBookmark(serialid,
- false);
+ dvdbookmark = player_ctx->playingInfo->QueryDVDBookmark(serialid);
if (!dvdbookmark.empty())
{
QStringList::Iterator it = dvdbookmark.begin();
@@ -789,7 +789,7 @@ static int internal_play_media(const QString &mrl, const QString &plot,
if (tmprbuf->IsDVD() &&
tmprbuf->DVD()->GetNameAndSerialNum(name, serialid))
{
- QStringList fields = pginfo->QueryDVDBookmark(serialid, false);
+ QStringList fields = pginfo->QueryDVDBookmark(serialid);
if (!fields.empty())
{
QStringList::Iterator it = fields.begin();

0 comments on commit bf70617

Please sign in to comment.