Opened 14 years ago
Closed 14 years ago
#8018 closed defect (fixed)
Screenshot Filename Date is Incorrect
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - User Interface Library | Version: | 0.22 |
Severity: | medium | Keywords: | screenshot date filename |
Cc: | Ticket locked: | no |
Description
The current month is not included in the file name, but the minute is included twice. The code in question is: bool MythMainWindow::screenShot(int x, int y, int x2, int y2) {
QString fPath = GetMythDB()->GetSetting?("ScreenShotPath?","/tmp/"); QString fName = QString("/%1/myth-screenshot-%2.png")
.arg(fPath) .arg(QDateTime::currentDateTime()
.toString("yyyy-mm-ddThh-mm-ss.zzz"));
return screenShot(fName, x, y, x2, y2, 0, 0);
}
Note the toString has mm twice. Looking up QDateTime, month should be MM. Meaning the code should be: bool MythMainWindow::screenShot(int x, int y, int x2, int y2) {
QString fPath = GetMythDB()->GetSetting?("ScreenShotPath?","/tmp/"); QString fName = QString("/%1/myth-screenshot-%2.png")
.arg(fPath) .arg(QDateTime::currentDateTime()
.toString("yyyy-MM-ddThh-mm-ss.zzz"));
return screenShot(fName, x, y, x2, y2, 0, 0);
}
This code starts at line 735 of mythmainwindow.cpp as of changeset 23069.
Yes it is a minor thing, but makes a big difference in trying to find all screen shots on the same day.
Change History (2)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [23458]) Fixes #8018. Fix the screenshot filename used with the ScreenShot? jump point (not the SCREENSHOT keybinding in TV Player context). Also changes a couple other locations where help text used the same 'yyyy-mm-dd' rather than 'yyyy-MM-dd' (just to make searching for broken specifications easier).
Thanks to Scott Atkins for finding the bug.
As of today, on the trunk the bug still exists: http://svn.mythtv.org/trac/browser/trunk/mythtv/libs/libmythui/mythmainwindow.cpp?rev=23348
Function starts at line 785