Opened 15 years ago

Closed 15 years ago

#8018 closed defect (fixed)

Screenshot Filename Date is Incorrect

Reported by: Scott.Atkins@… 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 15 years ago by Scott.Atkins@…

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

comment:2 Changed 15 years ago by sphery

Resolution: fixed
Status: newclosed

(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.

Note: See TracTickets for help on using tickets.