--- /dev/null
+<?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
--- /dev/null
+<?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
<!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>
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
+