From: erik Date: Wed, 19 Mar 2008 21:05:55 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.2@603~239 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=5923845cf3e6aeb42b8479a446cf12d0cc22816d;p=utils --- diff --git a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/LinkStructure.java b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/LinkStructure.java index ced5ae11..4d6583c8 100644 --- a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/LinkStructure.java +++ b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/LinkStructure.java @@ -73,7 +73,7 @@ public class LinkStructure implements Listener { // Re-assess file type Recording recording = _recordings.get(aFile); - LOG.debug("Recording changed " + recording); + LOG.info("Recording changed " + recording); recording.setFilesize(aFile.length()); _database.update(recording); String dir = getDirectory(recording); diff --git a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java index cf7bc5f5..cbcf89d2 100644 --- a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java +++ b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java @@ -71,8 +71,6 @@ public class RecordingDatabase extends JpaDaoSupport { } public void update(Recording aRecording) { - // Update is not required since the whole task of updating the - // directory structure occurs within a single transaction. - // Therefore, modifications to recordings are automatically persisted. + getJpaTemplate().getEntityManager().merge(aRecording); } } diff --git a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java index da06d3d0..88d31c3b 100644 --- a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java +++ b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java @@ -93,4 +93,12 @@ public class RecordingPk implements Serializable { public int hashCode() { return _channel.hashCode() + _starttime.hashCode(); } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "pk(" + _channel + ", " + _starttime + ")"; + } } diff --git a/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.hibernate.xml b/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.hibernate.xml index fb66e86b..29f176a8 100644 --- a/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.hibernate.xml +++ b/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.hibernate.xml @@ -2,43 +2,6 @@ - - - - - - - - java:comp/env/persistence/mythtv diff --git a/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.properties b/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.properties index 0b3a0b6c..85f9a0e8 100644 --- a/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.properties +++ b/trunk/mythtv/war/src/main/resources/org.wamblee.mythtv.properties @@ -1,8 +1,8 @@ org.wamblee.mythtv.datasource=jdbc/mythtv org.wamblee.mythtv.pollinterval=120 -#org.wamblee.mythtv.monitordir=/data/vcr -#org.wamblee.mythtv.linkdir=/data/vcr/links +org.wamblee.mythtv.monitordir=/data/vcr +org.wamblee.mythtv.linkdir=/data/vcr/links -org.wamblee.mythtv.monitordir=/ext/home/erik/java/workspace/utils/mythtv/testdata/input -org.wamblee.mythtv.linkdir=/ext/home/erik/java/workspace/utils/mythtv/testdata/links +#org.wamblee.mythtv.monitordir=/ext/home/erik/java/workspace/utils/mythtv/testdata/input +#org.wamblee.mythtv.linkdir=/ext/home/erik/java/workspace/utils/mythtv/testdata/links