From: erik Date: Thu, 1 Mar 2007 17:45:27 +0000 (+0000) Subject: now updating file size in the database when the file has changed. X-Git-Tag: MYTHTV_EAR_NO_MSG_LINKING~26 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=8cd9a22ead17d3fcbfc80d724f708d702a41c83c;p=utils now updating file size in the database when the file has changed. --- diff --git a/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java b/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java index 7effde65..48672337 100644 --- a/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java +++ b/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java @@ -74,6 +74,8 @@ public class LinkStructure implements Listener { // Re-assess file type Recording recording = _recordings.get(aFile); LOG.debug("Recording changed " + recording); + recording.setFilesize(aFile.length()); + _database.update(recording); String dir = getDirectory(recording); FileType type = getFileType(aFile); String path = dir + "/" + getFilename(recording, type); @@ -119,6 +121,7 @@ public class LinkStructure implements Listener { LOG.debug("file deleted " + aFile); Recording recording = _recordings.get(aFile); _recordings.remove(recording); + // mythtv will remove the recording from its database itself. LOG.info("recording deleted " + recording); String dir = getDirectory(recording); for (FileType t: FileType.values()) {