Browse files

previewgen: Fix handling of --infile

Currently if the infile name looks like a myth recording title with a valid
channel ID and start time then the file is only searched for in the
recordings folder and so is consequently not found.

This fix checks if the file exists and if so doesn't attempt to extract
the channel ID and start time with the result that the file is not searched for in the recordings folder.

Signed-off-by: Lawrence Rust <>
Signed-off-by: Stuart Morgan <>
  • Loading branch information...
Lawrence Rust authored and stuartm committed Oct 30, 2011
1 parent b7a1bd2 commit 542dc7f0bac3e75e47fc35ab98bb30ab2e1a51f3
Showing with 1 addition and 1 deletion.
  1. +1 −1 mythtv/programs/mythpreviewgen/main.cpp
@@ -96,7 +96,7 @@ int preview_helper(uint chanid, QDateTime starttime,
if (setpriority(PRIO_PROCESS, 0, 9))
LOG(VB_GENERAL, LOG_ERR, "Setting priority failed." + ENO);
if (!chanid || !starttime.isValid())
if (!QFileInfo(infile).isReadable() && (!chanid || !starttime.isValid()))
ProgramInfo::QueryKeyFromPathname(infile, chanid, starttime);
ProgramInfo *pginfo = NULL;

0 comments on commit 542dc7f

Please sign in to comment.