(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 9 Feb 2007 23:03:27 +0000 (23:03 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Fri, 9 Feb 2007 23:03:27 +0000 (23:03 +0000)
trunk/mythtv/src/main/resources/Channel.hbm.xml [new file with mode: 0644]
trunk/mythtv/src/main/resources/Recording.hbm.xml [new file with mode: 0644]
trunk/mythtv/src/main/resources/org.wamblee.mythtv.application.xml
trunk/mythtv/src/main/resources/org.wamblee.mythtv.properties

diff --git a/trunk/mythtv/src/main/resources/Channel.hbm.xml b/trunk/mythtv/src/main/resources/Channel.hbm.xml
new file mode 100644 (file)
index 0000000..5b47f5c
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+    
+    <hibernate-mapping default-access="field">
+        
+        <class name="org.wamblee.mythtv.Channel" table="channel" lazy="false">
+            <id name="_id" column="chanid">
+                <generator class="native"/>
+            </id>
+            
+            <property name="_name" column="name"/>
+        </class>
+        
+    </hibernate-mapping>
\ No newline at end of file
diff --git a/trunk/mythtv/src/main/resources/Recording.hbm.xml b/trunk/mythtv/src/main/resources/Recording.hbm.xml
new file mode 100644 (file)
index 0000000..6e52a54
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+    
+    <hibernate-mapping default-access="field">
+        
+        <class name="org.wamblee.mythtv.Recording" table="recorded" lazy="false">
+          
+            <composite-id>
+                <key-many-to-one name="_channel" column="chanid" class="org.wamblee.mythtv.Channel"/>
+                <key-property name="_starttime" column="starttime"></key-property>
+            </composite-id>
+          
+            <property name="_basename" column="basename"/>
+            <property name="_progstart" column="progstart"/>
+            <property name="_title" column="title"/>
+            <property name="_subtitle" column="subtitle"/>
+            <property name="_filesize" column="filesize"/>
+        </class>
+        
+    </hibernate-mapping>
\ No newline at end of file
index e00a326dbbaa983592d19ddcc7f88a43a414dd3c..35681dc7cac616ba77c083329372eb088ce5db42 100644 (file)
@@ -2,5 +2,39 @@
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 
 <beans>
+    
+    <bean id="linkDir" class="java.io.File">
+        <constructor-arg><value>${org.wamblee.mythtv.linkdir}</value></constructor-arg>
+    </bean>
+    
+    <bean id="monitorDir" class="java.io.File">
+        <constructor-arg><value>${org.wamblee.mythtv.monitordir}</value></constructor-arg>
+    </bean>
+    
+    <bean id="fileFilter" class="org.apache.oro.io.AwkFilenameFilter">
+        <constructor-arg><value>^[a-zA-Z0-9-_]*.mpg$</value></constructor-arg>
+    </bean>
+    
+    
+    <bean id="org.wamblee.mythtv.RecordingDatabase" class="org.wamblee.mythtv.RecordingDatabase"
+    init-method="init">    
+        <property name="hibernateTemplate"><ref bean="hibernateTemplate"/></property>
+    </bean>
+    
+    <bean id="org.wamblee.mythtv.LinkStructure" class="org.wamblee.mythtv.LinkStructure">
+        <constructor-arg><value>${org.wamblee.mythtv.monitordir}</value></constructor-arg>
+        <constructor-arg><ref local="linkDir"/></constructor-arg>
+        <constructor-arg><ref local="org.wamblee.mythtv.RecordingDatabase"/></constructor-arg>
+    </bean>
+    
+    <bean id="org.wamblee.io.DirectoryMonitor" class="org.wamblee.io.DirectoryMonitor">
+        <constructor-arg><ref local="monitorDir"/></constructor-arg>
+        <constructor-arg><ref local="fileFilter"/></constructor-arg>
+        <constructor-arg><ref local="org.wamblee.mythtv.LinkStructure"/></constructor-arg>
+    </bean>
+    
+    <bean id="org.wamblee.mythtv.MonitorScheduler" class="org.wamblee.mythtv.MonitorScheduler">
+        <constructor-arg><value>${org.wamblee.mythtv.pollinterval}</value></constructor-arg>    
+    </bean>
 
 </beans> 
index 45e303ebb32ad1debbdfed7e832c8d3f6a46ed57..e6172694601f96e3e424e40515ad324b313c0cec 100644 (file)
@@ -1,5 +1,6 @@
 
 org.wamblee.mythtv.datasource=java:mythtv
-org.wamblee.mythtv.pollinterval=30
+org.wamblee.mythtv.pollinterval=120
 org.wamblee.mythtv.monitordir=/data/vcr
 org.wamblee.mythtv.linkdir=/data/vcr/links
+