From 65fc23fc7a04b4f9c378a3c8d93d9df0763310f6 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 1 Mar 2007 17:45:27 +0000 Subject: [PATCH] now updating file size in the database when the file has changed. --- .../mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trunk/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java b/trunk/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java index 7effde65..48672337 100644 --- a/trunk/mythtv/src/main/java/org/wamblee/mythtv/LinkStructure.java +++ b/trunk/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()) { -- 2.31.1