diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-23 21:35:06 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-23 21:35:06 +0000 |
commit | ede1b5fd158d094e8752464e3355f1a6f1cc5501 (patch) | |
tree | 78c5c0efd2a62c0faddf9d220fd94d9bfe3f55bc | |
parent | Switch lib64 references for native ones (diff) | |
download | mythfs-ede1b5fd158d094e8752464e3355f1a6f1cc5501.tar.bz2 mythfs-ede1b5fd158d094e8752464e3355f1a6f1cc5501.tar.xz mythfs-ede1b5fd158d094e8752464e3355f1a6f1cc5501.zip |
Initial WIP commit of MythFS
-rw-r--r-- | mythfs/Jamfile.jam | 30 | ||||
-rw-r--r-- | mythfs/etc/icebox.config | 1 | ||||
-rw-r--r-- | mythfs/service/Jamfile.jam | 19 | ||||
-rw-r--r-- | mythfs/service/main.cpp | 18 | ||||
-rw-r--r-- | mythfs/service/recordingsVolume.cpp | 108 | ||||
-rw-r--r-- | mythfs/service/recordingsVolume.h | 46 | ||||
-rw-r--r-- | mythfs/service/service.cpp | 13 | ||||
-rw-r--r-- | mythfs/service/service.h | 15 | ||||
-rw-r--r-- | mythfs/unittests/Jamfile.jam | 52 | ||||
-rw-r--r-- | mythfs/unittests/fixtures/data.sql | 45 | ||||
-rw-r--r-- | mythfs/unittests/fixtures/schema.sql | 2227 | ||||
-rw-r--r-- | mythfs/unittests/mockDefs.cpp | 16 | ||||
-rw-r--r-- | mythfs/unittests/mockDefs.h | 24 | ||||
-rw-r--r-- | mythfs/unittests/testMain.cpp | 33 |
14 files changed, 2647 insertions, 0 deletions
diff --git a/mythfs/Jamfile.jam b/mythfs/Jamfile.jam new file mode 100644 index 0000000..ef3532b --- /dev/null +++ b/mythfs/Jamfile.jam @@ -0,0 +1,30 @@ +import slice ; +import package ; + +lib adhocutil : : : : <include>/usr/include/adhocutil ; +lib slicer : : : : <include>/usr/include/slicer ; +lib slicer-db : : : : <include>/usr/include/slicer ; +lib netfsComms : : : : <include>/usr/include/netfs ; +lib icetray : : : : <include>/usr/include/icetray ; +lib dbppcore : : : : <include>/usr/include/dbpp ; +lib Ice ; +lib IceUtil ; +lib pthread ; +lib IceBox ; +lib boost_filesystem ; +lib boost_system ; +lib boost_thread ; +lib boost_date_time ; + +project + : requirements + <cflags>"-fvisibility=hidden" + ; + +build-project service ; +build-project unittests ; + +package.install install : : : + service//mythfs + ; + diff --git a/mythfs/etc/icebox.config b/mythfs/etc/icebox.config new file mode 100644 index 0000000..f7ee191 --- /dev/null +++ b/mythfs/etc/icebox.config @@ -0,0 +1 @@ +IceBox.Service.MythFS=mythfs:createIceTrayService --MythFS.ThreadPool.Size=2 --MythFS.ThreadPool.SizeMax=10 --mythconverg.Database.ConnectionString="server=mysql user=mythtv database=mythconverg password=mythpass" --GentooBrowseAPI.Endpoints="tcp -p 4001" diff --git a/mythfs/service/Jamfile.jam b/mythfs/service/Jamfile.jam new file mode 100644 index 0000000..25225f9 --- /dev/null +++ b/mythfs/service/Jamfile.jam @@ -0,0 +1,19 @@ +lib mythfs : + [ glob *.cpp ] + : + <library>..//netfsComms + <library>..//adhocutil + <library>..//dbppcore + <library>..//boost_system + <library>..//Ice + <library>..//IceBox + <library>..//IceUtil + <library>..//pthread + <library>..//icetray + <library>..//slicer-db + <library>../..//glibmm + : : + <include>. + <library>..//netfsComms + <library>..//icetray + ; diff --git a/mythfs/service/main.cpp b/mythfs/service/main.cpp new file mode 100644 index 0000000..f12472d --- /dev/null +++ b/mythfs/service/main.cpp @@ -0,0 +1,18 @@ +#include <Ice/Communicator.h> +#include <Ice/ObjectAdapter.h> +#include <icetrayService.h> +#include "service.h" +#include "recordingsVolume.h" + +class Api : public IceTray::Service { + public: + void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override + { + auto db = getConnectionPool(ic, "mysql", "mythconverg"); + adp->add(new MythFS::Service(), ic->stringToIdentity("service")); + adp->add(new MythFS::RecordingsVolume(db), ic->stringToIdentity("recordings")); + } +}; + +NAMEDFACTORY("default", Api, IceTray::ServiceFactory); + diff --git a/mythfs/service/recordingsVolume.cpp b/mythfs/service/recordingsVolume.cpp new file mode 100644 index 0000000..4a6f437 --- /dev/null +++ b/mythfs/service/recordingsVolume.cpp @@ -0,0 +1,108 @@ +#include "recordingsVolume.h" + +namespace MythFS { + RecordingsVolume::RecordingsVolume(boost::shared_ptr<AdHoc::ResourcePool<DB::Connection>> d) : + IceTray::AbstractDatabaseClient(d) + { + } + + NetFS::DirectoryPrx + RecordingsVolume::opendir(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) + { + return NULL; + } + void RecordingsVolume::mkdir(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::rmdir(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::truncate(const NetFS::ReqEnv &, const std::string &, Ice::Long, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::unlink(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + NetFS::FilePrx RecordingsVolume::open(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + NetFS::ReadOnlyFilePrx RecordingsVolume::openReadOnly(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + NetFS::FilePrx RecordingsVolume::create(const NetFS::ReqEnv &, const std::string &, Ice::Int, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + NetFS::VFS RecordingsVolume::statfs(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + Ice::Int RecordingsVolume::access(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + NetFS::Attr RecordingsVolume::getattr(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::mknod(const NetFS::ReqEnv &, const std::string &, Ice::Int, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::symlink(const NetFS::ReqEnv &, const std::string &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::link(const NetFS::ReqEnv &, const std::string &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::rename(const NetFS::ReqEnv &, const std::string &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + std::string RecordingsVolume::readlink(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::chmod(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::chown(const NetFS::ReqEnv &, const std::string &, Ice::Int, Ice::Int, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::utimens(const NetFS::ReqEnv &, const std::string &, Ice::Long, Ice::Long, Ice::Long, Ice::Long, const Ice::Current&) + { + throw ::NetFS::SystemError(ENOSYS); + } + + void RecordingsVolume::disconnect(const Ice::Current&) + { + } +} + diff --git a/mythfs/service/recordingsVolume.h b/mythfs/service/recordingsVolume.h new file mode 100644 index 0000000..a1e2573 --- /dev/null +++ b/mythfs/service/recordingsVolume.h @@ -0,0 +1,46 @@ +#ifndef MYTHFS_RECORDINGS_VOLUME_H +#define MYTHFS_RECORDINGS_VOLUME_H + +#include <resourcePool.h> +#include <visibility.h> +#include <volume.h> +#include <abstractDatabaseClient.h> + +namespace MythFS { + class DLL_PUBLIC RecordingsVolume : public ::NetFS::Volume, ::IceTray::AbstractDatabaseClient { + public: + RecordingsVolume(boost::shared_ptr<AdHoc::ResourcePool<DB::Connection>>); + + virtual NetFS::DirectoryPrx opendir(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + + virtual void mkdir(const NetFS::ReqEnv &, const std::string & path, Ice::Int id, const Ice::Current&) override; + virtual void rmdir(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + + virtual void truncate(const NetFS::ReqEnv &, const std::string & path, Ice::Long size, const Ice::Current&) override; + + virtual void unlink(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + + virtual NetFS::FilePrx open(const NetFS::ReqEnv &, const std::string & path, Ice::Int flags, const Ice::Current&) override; + virtual NetFS::ReadOnlyFilePrx openReadOnly(const NetFS::ReqEnv &, const std::string & path, Ice::Int flags, const Ice::Current&) override; + virtual NetFS::FilePrx create(const NetFS::ReqEnv &, const std::string & path, Ice::Int flags, Ice::Int mode, const Ice::Current&) override; + + virtual NetFS::VFS statfs(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + + virtual Ice::Int access(const NetFS::ReqEnv &, const std::string & path, Ice::Int mode, const Ice::Current&) override; + virtual NetFS::Attr getattr(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + virtual void mknod(const NetFS::ReqEnv &, const std::string & path, Ice::Int mode, Ice::Int dev, const Ice::Current&) override; + virtual void symlink(const NetFS::ReqEnv &, const std::string & path1, const std::string & path2, const Ice::Current&) override; + virtual void link(const NetFS::ReqEnv &, const std::string & path1, const std::string & path2, const Ice::Current&) override; + virtual void rename(const NetFS::ReqEnv &, const std::string & path1, const std::string & path2, const Ice::Current&) override; + virtual std::string readlink(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + virtual void chmod(const NetFS::ReqEnv &, const std::string & path, Ice::Int mode, const Ice::Current&) override; + virtual void chown(const NetFS::ReqEnv &, const std::string & path, Ice::Int uid, Ice::Int gid, const Ice::Current&) override; + virtual void utimens(const NetFS::ReqEnv &, const std::string & path, Ice::Long, Ice::Long, Ice::Long, Ice::Long, const Ice::Current&) override; + + virtual void disconnect(const Ice::Current&) override; + + }; +} + +#endif + diff --git a/mythfs/service/service.cpp b/mythfs/service/service.cpp new file mode 100644 index 0000000..8a2e77d --- /dev/null +++ b/mythfs/service/service.cpp @@ -0,0 +1,13 @@ +#include "service.h" +#include <Ice/ObjectAdapter.h> +#include <Ice/Communicator.h> + +namespace MythFS { + ::NetFS::VolumePrx + Service::connect(const std::string & volume, const std::string &, const Ice::Current & ic) + { + return ::NetFS::VolumePrx::checkedCast( + ic.adapter->createProxy(ic.adapter->getCommunicator()->stringToIdentity(volume))); + } +} + diff --git a/mythfs/service/service.h b/mythfs/service/service.h new file mode 100644 index 0000000..d021f2b --- /dev/null +++ b/mythfs/service/service.h @@ -0,0 +1,15 @@ +#ifndef MYTHFS_SERVICE_H +#define MYTHFS_SERVICE_H + +#include <visibility.h> +#include <service.h> + +namespace MythFS { + class Service : public ::NetFS::Service { + public: + ::NetFS::VolumePrx connect(const std::string &, const ::std::string &, const Ice::Current &) override; + }; +} + +#endif + diff --git a/mythfs/unittests/Jamfile.jam b/mythfs/unittests/Jamfile.jam new file mode 100644 index 0000000..8ae546c --- /dev/null +++ b/mythfs/unittests/Jamfile.jam @@ -0,0 +1,52 @@ +import testing ; + +lib boost_utf : : <name>boost_unit_test_framework ; +lib dbpp-mysql : : : : <include>/usr/include/dbpp-mysql ; +lib dryice : : : : <include>/usr/include/icetray ; + +path-constant me : . ; + +alias test-data : + [ glob-tree *.dat ] + fixtures/schema.sql + ; + +lib testCommon : + mockDefs.cpp + : + <library>dbpp-mysql + <library>..//dbppcore + <library>..//adhocutil + <define>ROOT=\"$(me)\" + <library>..//boost_system + <library>..//boost_filesystem + <library>..//netfsComms + <library>..//IceUtil + <library>..//Ice + <library>..//IceBox + <library>..//pthread + <library>dryice + : : + <library>dryice + <library>..//dbppcore + <library>..//adhocutil + <library>..//IceUtil + <library>..//Ice + <library>..//IceBox + <library>..//pthread + ; + +run + testMain.cpp + : : + : + <define>BOOST_TEST_DYN_LINK + <library>../service//mythfs + <library>..//boost_system + <library>..//boost_filesystem + <library>testCommon + <library>boost_utf + <dependency>test-data + <define>ROOT=\"$(me)\" + : testMain ; + diff --git a/mythfs/unittests/fixtures/data.sql b/mythfs/unittests/fixtures/data.sql new file mode 100644 index 0000000..fb39495 --- /dev/null +++ b/mythfs/unittests/fixtures/data.sql @@ -0,0 +1,45 @@ +-- MySQL dump 10.13 Distrib 5.6.27, for Linux (x86_64) +-- +-- Host: defiant Database: mythconverg +-- ------------------------------------------------------ +-- Server version 5.6.27-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Dumping data for table `recorded` +-- + +/*!40000 ALTER TABLE `recorded` DISABLE KEYS */; +INSERT INTO `recorded` VALUES (1004,'2013-03-25 01:49:00','2013-03-25 03:39:11','I\'m Not Scared','(2003) Thriller','Michele,10, lives a carefree life in Italy\'s cornfields until he discovers a boy shackled in an empty house. Befriending him, he doesn\'t realise the danger he is now in.',0,0,'Film','defiant',0,0,0,0,0,'Default',2812,'','www.channel4.com/43559/001','25300','2013-09-29 20:26:39',2323705860,0,0,'0000-00-00',0,735317,0,27,1,0,'1004_20130325014900.mpg','2013-03-25 01:50:00','2013-03-25 03:35:00','Default','Default',1,1,0,'Default','2013-03-25 03:41:01'); +INSERT INTO `recorded` VALUES (1009,'2015-06-13 19:59:00','2015-06-13 21:39:10','Echoes from the Dead','Swedish thriller','A mother returns to the desolate island where she was born to investigate the disappearance of her son 21 years ago. Contains some violence. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3358,'','fp.bbc.co.uk/4j63mu','tmdb3.py_196027','2015-06-13 21:39:10',2530997188,0,0,'2013-01-01',0,719528,0,27,1,0,'1009_20150613195900.mpg','2015-06-13 20:00:00','2015-06-13 21:35:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1030,'2015-03-13 20:59:00','2015-03-13 23:04:10','Jackie Chan\'s Forbidden Kingdom','Action adventure','Legends Jet Li and Jackie Chan meet in battle for the first time in this fantasy in which a kung-fu obsessed American teenager goes on a magical journey to ancient China.',0,0,'Film','defiant',0,0,0,1,0,'Default',3250,'','www.five.tv/v6hjv','','2015-03-13 23:04:10',1728827696,0,0,'2008-01-01',0,719528,0,27,1,0,'1030_20150313205900.mpg','2015-03-13 21:00:00','2015-03-13 23:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1032,'2015-04-26 18:09:00','2015-04-26 20:04:10','Dragon Wars','','Korean monster movie starring Jason Behr and Amanda Brooks, 2007. A reporter discovers his destiny is to save Los Angeles from a dragon that comes back to life every 500 years',0,0,'Film','defiant',0,0,0,1,0,'Default',3330,'','','tmdb3.py_10253','2015-04-26 20:04:10',1664782112,0,0,'2007-01-01',0,719528,0,27,1,0,'1032_20150426180900.mpg','2015-04-26 18:10:00','2015-04-26 20:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1032,'2015-12-11 20:59:00','2015-12-11 22:59:11','Omen IV','The Awakening','Damien may be dead but his spirit lives on in a mysterious girl named Delia who is adopted by two lawyers. They try to find the truth about Delia\'s real parents.',0,0,'Film','defiant',0,0,0,1,0,'Default',3476,'','','','2015-12-11 22:59:11',1493357696,0,0,'1991-01-01',0,719528,0,27,1,0,'1032_20151211205900.mpg','2015-12-11 21:00:00','2015-12-11 22:55:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1001,'2015-12-20 23:39:00','2015-12-21 00:24:10','Have I Got a Bit More News for You','','An extended compilation of the news quiz that looks back at the big news of 2015. With team captains Paul Merton and Ian Hislop, and a variety of guest hosts and panellists. Also in HD.',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',598,'fp.bbc.co.uk/nf5h3i','fp.bbc.co.uk/1rkiy1','','2015-12-21 00:24:10',1416394256,0,0,'0000-00-00',0,0,0,27,1,1,'1001_20151220233900.mpg','2015-12-20 23:40:00','2015-12-21 00:20:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1002,'2015-12-20 22:09:00','2015-12-20 22:59:10','Live at the Apollo','Part 0: Christmas Special','Stand-up comedy from the Hammersmith Apollo. In the festive final episode, Nina Conti introduces Tanyalee Davis, Hal Cruttenden and Josh Widdicombe. Also in HD.',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',3471,'fp.bbc.co.uk/nilln9','fp.bbc.co.uk/1rkiv9','ttvdb.py_80905','2015-12-20 22:59:10',1733000732,0,0,'0000-00-00',0,0,0,27,1,0,'1002_20151220220900.mpg','2015-12-20 22:10:00','2015-12-20 22:55:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1002,'2015-12-21 09:34:00','2015-12-21 11:04:11','Flight of the Navigator','Family science fiction adventure','In 1978, a 12-year-old boy takes a tumble and wakes up to find it is 1986. Meanwhile, Nasa scientists discover a mysterious alien spacecraft. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3480,'','fp.bbc.co.uk/4j452j','tmdb3.py_10122','2015-12-21 11:04:11',3144665660,0,0,'1986-01-01',0,719528,0,27,1,0,'1002_20151221093400.mpg','2015-12-21 09:35:00','2015-12-21 11:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1002,'2015-12-19 22:19:00','2015-12-19 23:09:10','QI XL','Merriment','Stephen Fry enjoys some merriment with Jenny Eclair, Johnny Vegas and Bill Bailey. Contains some strong language. Also in HD.',13,8,'Entertainment','defiant',0,0,0,0,0,'Default',2641,'fp.bbc.co.uk/nb9n2b','fp.bbc.co.uk/1rkhsh','ttvdb.py_72716','2015-12-19 23:09:10',1521299948,0,0,'0000-00-00',0,0,0,27,1,0,'1002_20151219221900.mpg','2015-12-19 22:20:00','2015-12-19 23:05:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1303,'2015-12-02 20:59:00','2015-12-02 23:14:10','Insidious','Chapter 2','Supernatural horror sequel with Patrick Wilson, Rose Byrne and Lin Shaye. Josh is back and Renai remains desperate to prevent the malevolent spirits from haunting her family again.',0,0,'Film','defiant',0,0,0,1,0,'Default',3244,'','www.channel4.com/59556/001','tmdb3.py_49018','2015-12-02 23:14:10',1778673264,0,0,'2013-01-01',0,719528,0,27,1,0,'1303_20151202205900.mpg','2015-12-02 21:00:00','2015-12-02 23:10:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1004,'2015-12-21 17:59:00','2015-12-21 18:34:10','The Simpsons','The Spy Who Learned Me','While he is at home on sick leave, Homer learns how to become a better husband with the help of dashing spy movie crime fighter Stradivarius Cain. (S23 Ep20/22)',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',10,'www.channel4.com/c4ei0041105162151952','www.channel4.com/61647/020','','2015-12-21 18:34:10',613944080,0,0,'0000-00-00',0,0,0,27,1,0,'1004_20151221175900.mpg','2015-12-21 18:00:00','2015-12-21 18:30:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +/*!40000 ALTER TABLE `recorded` ENABLE KEYS */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2015-12-21 19:02:15 diff --git a/mythfs/unittests/fixtures/schema.sql b/mythfs/unittests/fixtures/schema.sql new file mode 100644 index 0000000..fe6a17b --- /dev/null +++ b/mythfs/unittests/fixtures/schema.sql @@ -0,0 +1,2227 @@ +-- MySQL dump 10.13 Distrib 5.6.27, for Linux (x86_64) +-- +-- Host: defiant Database: mythconverg +-- ------------------------------------------------------ +-- Server version 5.6.27-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `archiveitems` +-- + +DROP TABLE IF EXISTS `archiveitems`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `archiveitems` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` set('Recording','Video','File') DEFAULT NULL, + `title` varchar(128) DEFAULT NULL, + `subtitle` varchar(128) DEFAULT NULL, + `description` text, + `startdate` varchar(30) DEFAULT NULL, + `starttime` varchar(30) DEFAULT NULL, + `size` bigint(20) unsigned NOT NULL, + `filename` text NOT NULL, + `hascutlist` tinyint(1) NOT NULL DEFAULT '0', + `cutlist` text, + `duration` int(10) unsigned NOT NULL DEFAULT '0', + `cutduration` int(10) unsigned NOT NULL DEFAULT '0', + `videowidth` int(10) unsigned NOT NULL DEFAULT '0', + `videoheight` int(10) unsigned NOT NULL DEFAULT '0', + `filecodec` varchar(50) NOT NULL DEFAULT '', + `videocodec` varchar(50) NOT NULL DEFAULT '', + `encoderprofile` varchar(50) NOT NULL DEFAULT 'NONE', + PRIMARY KEY (`intid`), + KEY `title` (`title`) +) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `bar` +-- + +DROP TABLE IF EXISTS `bar`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bar` ( + `cola` int(11) DEFAULT NULL, + `colb` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `callsignnetworkmap` +-- + +DROP TABLE IF EXISTS `callsignnetworkmap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `callsignnetworkmap` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `callsign` varchar(20) NOT NULL DEFAULT '', + `network` varchar(20) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `callsign` (`callsign`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `capturecard` +-- + +DROP TABLE IF EXISTS `capturecard`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `capturecard` ( + `cardid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `videodevice` varchar(128) DEFAULT NULL, + `audiodevice` varchar(128) DEFAULT NULL, + `vbidevice` varchar(128) DEFAULT NULL, + `cardtype` varchar(32) DEFAULT 'V4L', + `defaultinput` varchar(32) DEFAULT 'Television', + `audioratelimit` int(11) DEFAULT NULL, + `hostname` varchar(64) DEFAULT NULL, + `dvb_swfilter` int(11) DEFAULT '0', + `dvb_sat_type` int(11) NOT NULL DEFAULT '0', + `dvb_wait_for_seqstart` int(11) NOT NULL DEFAULT '1', + `skipbtaudio` tinyint(1) DEFAULT '0', + `dvb_on_demand` tinyint(4) NOT NULL DEFAULT '0', + `dvb_diseqc_type` smallint(6) DEFAULT NULL, + `firewire_speed` int(10) unsigned NOT NULL DEFAULT '0', + `firewire_model` varchar(32) DEFAULT NULL, + `firewire_connection` int(10) unsigned NOT NULL DEFAULT '0', + `signal_timeout` int(11) NOT NULL DEFAULT '1000', + `channel_timeout` int(11) NOT NULL DEFAULT '3000', + `dvb_tuning_delay` int(10) unsigned NOT NULL DEFAULT '0', + `contrast` int(11) NOT NULL DEFAULT '0', + `brightness` int(11) NOT NULL DEFAULT '0', + `colour` int(11) NOT NULL DEFAULT '0', + `hue` int(11) NOT NULL DEFAULT '0', + `diseqcid` int(10) unsigned DEFAULT NULL, + `dvb_eitscan` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`cardid`) +) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cardinput` +-- + +DROP TABLE IF EXISTS `cardinput`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cardinput` ( + `cardinputid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cardid` int(10) unsigned NOT NULL DEFAULT '0', + `sourceid` int(10) unsigned NOT NULL DEFAULT '0', + `inputname` varchar(32) NOT NULL DEFAULT '', + `externalcommand` varchar(128) DEFAULT NULL, + `changer_device` varchar(128) DEFAULT NULL, + `changer_model` varchar(128) DEFAULT NULL, + `tunechan` varchar(10) DEFAULT NULL, + `startchan` varchar(10) DEFAULT NULL, + `displayname` varchar(64) NOT NULL DEFAULT '', + `dishnet_eit` tinyint(1) NOT NULL DEFAULT '0', + `recpriority` int(11) NOT NULL DEFAULT '0', + `quicktune` tinyint(4) NOT NULL DEFAULT '0', + `schedorder` int(10) unsigned NOT NULL DEFAULT '0', + `livetvorder` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`cardinputid`) +) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `channel` +-- + +DROP TABLE IF EXISTS `channel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `channel` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `channum` varchar(10) NOT NULL DEFAULT '', + `freqid` varchar(10) DEFAULT NULL, + `sourceid` int(10) unsigned DEFAULT NULL, + `callsign` varchar(20) NOT NULL DEFAULT '', + `name` varchar(64) NOT NULL DEFAULT '', + `icon` varchar(255) NOT NULL DEFAULT '', + `finetune` int(11) DEFAULT NULL, + `videofilters` varchar(255) NOT NULL DEFAULT '', + `xmltvid` varchar(255) NOT NULL DEFAULT '', + `recpriority` int(10) NOT NULL DEFAULT '0', + `contrast` int(11) DEFAULT '32768', + `brightness` int(11) DEFAULT '32768', + `colour` int(11) DEFAULT '32768', + `hue` int(11) DEFAULT '32768', + `tvformat` varchar(10) NOT NULL DEFAULT 'Default', + `visible` tinyint(1) NOT NULL DEFAULT '1', + `outputfilters` varchar(255) NOT NULL DEFAULT '', + `useonairguide` tinyint(1) DEFAULT '0', + `mplexid` smallint(6) DEFAULT NULL, + `serviceid` mediumint(8) unsigned DEFAULT NULL, + `tmoffset` int(11) NOT NULL DEFAULT '0', + `atsc_major_chan` int(10) unsigned NOT NULL DEFAULT '0', + `atsc_minor_chan` int(10) unsigned NOT NULL DEFAULT '0', + `last_record` datetime NOT NULL, + `default_authority` varchar(32) NOT NULL DEFAULT '', + `commmethod` int(11) NOT NULL DEFAULT '-1', + `iptvid` smallint(6) unsigned DEFAULT NULL, + PRIMARY KEY (`chanid`), + KEY `channel_src` (`channum`,`sourceid`), + KEY `sourceid` (`sourceid`,`xmltvid`,`chanid`), + KEY `visible` (`visible`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `channelgroup` +-- + +DROP TABLE IF EXISTS `channelgroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `channelgroup` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `chanid` int(11) unsigned NOT NULL DEFAULT '0', + `grpid` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `channelgroupnames` +-- + +DROP TABLE IF EXISTS `channelgroupnames`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `channelgroupnames` ( + `grpid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(64) NOT NULL DEFAULT '0', + PRIMARY KEY (`grpid`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `channelscan` +-- + +DROP TABLE IF EXISTS `channelscan`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `channelscan` ( + `scanid` int(3) unsigned NOT NULL AUTO_INCREMENT, + `cardid` int(3) unsigned NOT NULL, + `sourceid` int(3) unsigned NOT NULL, + `processed` tinyint(1) unsigned NOT NULL, + `scandate` datetime NOT NULL, + PRIMARY KEY (`scanid`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `channelscan_channel` +-- + +DROP TABLE IF EXISTS `channelscan_channel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `channelscan_channel` ( + `transportid` int(6) unsigned NOT NULL, + `scanid` int(3) unsigned NOT NULL, + `mplex_id` smallint(6) NOT NULL, + `source_id` int(3) unsigned NOT NULL, + `channel_id` int(3) unsigned NOT NULL DEFAULT '0', + `callsign` varchar(20) NOT NULL DEFAULT '', + `service_name` varchar(64) NOT NULL DEFAULT '', + `chan_num` varchar(10) NOT NULL DEFAULT '', + `service_id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `atsc_major_channel` int(4) unsigned NOT NULL DEFAULT '0', + `atsc_minor_channel` int(4) unsigned NOT NULL DEFAULT '0', + `use_on_air_guide` tinyint(1) NOT NULL DEFAULT '0', + `hidden` tinyint(1) NOT NULL DEFAULT '0', + `hidden_in_guide` tinyint(1) NOT NULL DEFAULT '0', + `freqid` varchar(10) NOT NULL DEFAULT '', + `icon` varchar(255) NOT NULL DEFAULT '', + `tvformat` varchar(10) NOT NULL DEFAULT 'Default', + `xmltvid` varchar(64) NOT NULL DEFAULT '', + `pat_tsid` int(5) unsigned NOT NULL DEFAULT '0', + `vct_tsid` int(5) unsigned NOT NULL DEFAULT '0', + `vct_chan_tsid` int(5) unsigned NOT NULL DEFAULT '0', + `sdt_tsid` int(5) unsigned NOT NULL DEFAULT '0', + `orig_netid` int(5) unsigned NOT NULL DEFAULT '0', + `netid` int(5) unsigned NOT NULL DEFAULT '0', + `si_standard` varchar(10) NOT NULL, + `in_channels_conf` tinyint(1) unsigned NOT NULL DEFAULT '0', + `in_pat` tinyint(1) unsigned NOT NULL DEFAULT '0', + `in_pmt` tinyint(1) unsigned NOT NULL DEFAULT '0', + `in_vct` tinyint(1) unsigned NOT NULL DEFAULT '0', + `in_nit` tinyint(1) unsigned NOT NULL DEFAULT '0', + `in_sdt` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_encrypted` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_data_service` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_audio_service` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_opencable` tinyint(1) unsigned NOT NULL DEFAULT '0', + `could_be_opencable` tinyint(1) unsigned NOT NULL DEFAULT '0', + `decryption_status` smallint(2) unsigned NOT NULL DEFAULT '0', + `default_authority` varchar(32) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `channelscan_dtv_multiplex` +-- + +DROP TABLE IF EXISTS `channelscan_dtv_multiplex`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `channelscan_dtv_multiplex` ( + `transportid` int(6) unsigned NOT NULL AUTO_INCREMENT, + `scanid` int(3) unsigned NOT NULL, + `mplexid` smallint(6) unsigned NOT NULL, + `frequency` bigint(12) unsigned NOT NULL, + `inversion` char(1) NOT NULL DEFAULT 'a', + `symbolrate` bigint(12) unsigned NOT NULL DEFAULT '0', + `fec` varchar(10) NOT NULL DEFAULT 'auto', + `polarity` char(1) NOT NULL DEFAULT '', + `hp_code_rate` varchar(10) NOT NULL DEFAULT 'auto', + `mod_sys` varchar(10) DEFAULT NULL, + `rolloff` varchar(4) DEFAULT NULL, + `lp_code_rate` varchar(10) NOT NULL DEFAULT 'auto', + `modulation` varchar(10) NOT NULL DEFAULT 'auto', + `transmission_mode` char(1) NOT NULL DEFAULT 'a', + `guard_interval` varchar(10) NOT NULL DEFAULT 'auto', + `hierarchy` varchar(10) NOT NULL DEFAULT 'auto', + `bandwidth` char(1) NOT NULL DEFAULT 'a', + `sistandard` varchar(10) NOT NULL, + `tuner_type` smallint(2) unsigned NOT NULL, + `default_authority` varchar(32) NOT NULL DEFAULT '', + PRIMARY KEY (`transportid`) +) ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `codecparams` +-- + +DROP TABLE IF EXISTS `codecparams`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `codecparams` ( + `profile` int(10) unsigned NOT NULL DEFAULT '0', + `name` varchar(128) NOT NULL DEFAULT '', + `value` varchar(128) DEFAULT NULL, + PRIMARY KEY (`profile`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `credits` +-- + +DROP TABLE IF EXISTS `credits`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credits` ( + `person` mediumint(8) unsigned NOT NULL DEFAULT '0', + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + UNIQUE KEY `chanid` (`chanid`,`starttime`,`person`,`role`), + KEY `person` (`person`,`role`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `customexample` +-- + +DROP TABLE IF EXISTS `customexample`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customexample` ( + `rulename` varchar(64) NOT NULL, + `fromclause` varchar(10000) NOT NULL DEFAULT '', + `whereclause` varchar(10000) NOT NULL DEFAULT '', + `search` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`rulename`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `diseqc_config` +-- + +DROP TABLE IF EXISTS `diseqc_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `diseqc_config` ( + `cardinputid` int(10) unsigned NOT NULL DEFAULT '0', + `diseqcid` int(10) unsigned NOT NULL DEFAULT '0', + `value` varchar(16) NOT NULL DEFAULT '', + KEY `id` (`cardinputid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `diseqc_tree` +-- + +DROP TABLE IF EXISTS `diseqc_tree`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `diseqc_tree` ( + `diseqcid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `parentid` int(10) unsigned DEFAULT NULL, + `ordinal` tinyint(3) unsigned NOT NULL DEFAULT '0', + `type` varchar(16) NOT NULL DEFAULT '', + `subtype` varchar(16) NOT NULL DEFAULT '', + `description` varchar(32) NOT NULL DEFAULT '', + `switch_ports` tinyint(3) unsigned NOT NULL DEFAULT '0', + `rotor_hi_speed` float NOT NULL DEFAULT '0', + `rotor_lo_speed` float NOT NULL DEFAULT '0', + `rotor_positions` varchar(255) NOT NULL DEFAULT '', + `lnb_lof_switch` int(10) NOT NULL DEFAULT '0', + `lnb_lof_hi` int(10) NOT NULL DEFAULT '0', + `lnb_lof_lo` int(10) NOT NULL DEFAULT '0', + `cmd_repeat` int(11) NOT NULL DEFAULT '1', + `lnb_pol_inv` tinyint(4) NOT NULL DEFAULT '0', + `address` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`diseqcid`), + KEY `parentid` (`parentid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `displayprofilegroups` +-- + +DROP TABLE IF EXISTS `displayprofilegroups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `displayprofilegroups` ( + `name` varchar(128) NOT NULL, + `hostname` varchar(64) NOT NULL, + `profilegroupid` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`name`,`hostname`), + UNIQUE KEY `profilegroupid` (`profilegroupid`) +) ENGINE=MyISAM AUTO_INCREMENT=47 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `displayprofiles` +-- + +DROP TABLE IF EXISTS `displayprofiles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `displayprofiles` ( + `profilegroupid` int(10) unsigned NOT NULL, + `profileid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `value` varchar(128) NOT NULL, + `data` varchar(255) NOT NULL DEFAULT '', + KEY `profilegroupid` (`profilegroupid`), + KEY `profileid` (`profileid`,`value`), + KEY `profileid_2` (`profileid`) +) ENGINE=MyISAM AUTO_INCREMENT=141 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `dtv_multiplex` +-- + +DROP TABLE IF EXISTS `dtv_multiplex`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dtv_multiplex` ( + `mplexid` smallint(6) NOT NULL AUTO_INCREMENT, + `sourceid` smallint(6) DEFAULT NULL, + `transportid` int(11) DEFAULT NULL, + `networkid` int(11) DEFAULT NULL, + `frequency` int(11) DEFAULT NULL, + `inversion` char(1) DEFAULT 'a', + `symbolrate` int(11) DEFAULT NULL, + `fec` varchar(10) DEFAULT 'auto', + `polarity` char(1) DEFAULT NULL, + `modulation` varchar(10) DEFAULT 'auto', + `bandwidth` char(1) DEFAULT 'a', + `lp_code_rate` varchar(10) DEFAULT 'auto', + `transmission_mode` char(1) DEFAULT 'a', + `guard_interval` varchar(10) DEFAULT 'auto', + `visible` smallint(1) NOT NULL DEFAULT '0', + `constellation` varchar(10) DEFAULT 'auto', + `hierarchy` varchar(10) DEFAULT 'auto', + `hp_code_rate` varchar(10) DEFAULT 'auto', + `mod_sys` varchar(10) DEFAULT NULL, + `rolloff` varchar(4) DEFAULT NULL, + `sistandard` varchar(10) DEFAULT 'dvb', + `serviceversion` smallint(6) DEFAULT '33', + `updatetimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `default_authority` varchar(32) NOT NULL DEFAULT '', + PRIMARY KEY (`mplexid`) +) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `dtv_privatetypes` +-- + +DROP TABLE IF EXISTS `dtv_privatetypes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dtv_privatetypes` ( + `sitype` varchar(4) NOT NULL DEFAULT '', + `networkid` int(11) NOT NULL DEFAULT '0', + `private_type` varchar(20) NOT NULL DEFAULT '', + `private_value` varchar(100) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `dvdbookmark` +-- + +DROP TABLE IF EXISTS `dvdbookmark`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dvdbookmark` ( + `serialid` varchar(16) NOT NULL DEFAULT '', + `name` varchar(32) DEFAULT NULL, + `title` smallint(6) NOT NULL DEFAULT '0', + `audionum` tinyint(4) NOT NULL DEFAULT '-1', + `subtitlenum` tinyint(4) NOT NULL DEFAULT '-1', + `framenum` bigint(20) NOT NULL DEFAULT '0', + `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `dvdstate` varchar(1024) NOT NULL DEFAULT '', + PRIMARY KEY (`serialid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `dvdinput` +-- + +DROP TABLE IF EXISTS `dvdinput`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dvdinput` ( + `intid` int(10) unsigned NOT NULL DEFAULT '0', + `hsize` int(10) unsigned DEFAULT NULL, + `vsize` int(10) unsigned DEFAULT NULL, + `ar_num` int(10) unsigned DEFAULT NULL, + `ar_denom` int(10) unsigned DEFAULT NULL, + `fr_code` int(10) unsigned DEFAULT NULL, + `letterbox` tinyint(1) DEFAULT NULL, + `v_format` varchar(16) DEFAULT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `dvdtranscode` +-- + +DROP TABLE IF EXISTS `dvdtranscode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dvdtranscode` ( + `intid` int(11) NOT NULL AUTO_INCREMENT, + `input` int(10) unsigned DEFAULT NULL, + `name` varchar(128) NOT NULL, + `sync_mode` int(10) unsigned DEFAULT NULL, + `use_yv12` tinyint(1) DEFAULT NULL, + `cliptop` int(11) DEFAULT NULL, + `clipbottom` int(11) DEFAULT NULL, + `clipleft` int(11) DEFAULT NULL, + `clipright` int(11) DEFAULT NULL, + `f_resize_h` int(11) DEFAULT NULL, + `f_resize_w` int(11) DEFAULT NULL, + `hq_resize_h` int(11) DEFAULT NULL, + `hq_resize_w` int(11) DEFAULT NULL, + `grow_h` int(11) DEFAULT NULL, + `grow_w` int(11) DEFAULT NULL, + `clip2top` int(11) DEFAULT NULL, + `clip2bottom` int(11) DEFAULT NULL, + `clip2left` int(11) DEFAULT NULL, + `clip2right` int(11) DEFAULT NULL, + `codec` varchar(128) NOT NULL, + `codec_param` varchar(128) DEFAULT NULL, + `bitrate` int(11) DEFAULT NULL, + `a_sample_r` int(11) DEFAULT NULL, + `a_bitrate` int(11) DEFAULT NULL, + `two_pass` tinyint(1) DEFAULT NULL, + `tc_param` varchar(128) DEFAULT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `eit_cache` +-- + +DROP TABLE IF EXISTS `eit_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `eit_cache` ( + `chanid` int(10) NOT NULL DEFAULT '0', + `eventid` int(10) unsigned NOT NULL DEFAULT '0', + `tableid` tinyint(3) unsigned NOT NULL DEFAULT '0', + `version` tinyint(3) unsigned NOT NULL DEFAULT '0', + `endtime` int(10) unsigned NOT NULL DEFAULT '0', + `status` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`chanid`,`eventid`,`status`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `filemarkup` +-- + +DROP TABLE IF EXISTS `filemarkup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `filemarkup` ( + `filename` text NOT NULL, + `mark` mediumint(8) unsigned NOT NULL DEFAULT '0', + `offset` bigint(20) unsigned DEFAULT NULL, + `type` tinyint(4) NOT NULL DEFAULT '0', + KEY `filename` (`filename`(255)) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `housekeeping` +-- + +DROP TABLE IF EXISTS `housekeeping`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `housekeeping` ( + `tag` varchar(64) NOT NULL, + `hostname` varchar(64) DEFAULT NULL, + `lastrun` datetime DEFAULT NULL, + UNIQUE KEY `task` (`tag`,`hostname`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `inputgroup` +-- + +DROP TABLE IF EXISTS `inputgroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `inputgroup` ( + `cardinputid` int(10) unsigned NOT NULL, + `inputgroupid` int(10) unsigned NOT NULL, + `inputgroupname` varchar(32) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `internetcontent` +-- + +DROP TABLE IF EXISTS `internetcontent`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `internetcontent` ( + `name` varchar(255) NOT NULL, + `thumbnail` varchar(255) DEFAULT NULL, + `type` smallint(3) NOT NULL, + `author` varchar(128) NOT NULL, + `description` text NOT NULL, + `commandline` text NOT NULL, + `version` double NOT NULL, + `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `search` tinyint(1) NOT NULL, + `tree` tinyint(1) NOT NULL, + `podcast` tinyint(1) NOT NULL, + `download` tinyint(1) NOT NULL, + `host` varchar(128) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `internetcontentarticles` +-- + +DROP TABLE IF EXISTS `internetcontentarticles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `internetcontentarticles` ( + `feedtitle` varchar(255) NOT NULL, + `path` text NOT NULL, + `paththumb` text NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `season` smallint(5) NOT NULL DEFAULT '0', + `episode` smallint(5) NOT NULL DEFAULT '0', + `description` text NOT NULL, + `url` text NOT NULL, + `type` smallint(3) NOT NULL, + `thumbnail` text NOT NULL, + `mediaURL` text NOT NULL, + `author` varchar(255) NOT NULL, + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `time` int(11) NOT NULL, + `rating` varchar(255) NOT NULL, + `filesize` bigint(20) NOT NULL, + `player` varchar(255) NOT NULL, + `playerargs` text NOT NULL, + `download` varchar(255) NOT NULL, + `downloadargs` text NOT NULL, + `width` smallint(6) NOT NULL, + `height` smallint(6) NOT NULL, + `language` varchar(128) NOT NULL, + `podcast` tinyint(1) NOT NULL, + `downloadable` tinyint(1) NOT NULL, + `customhtml` tinyint(1) NOT NULL, + `countries` varchar(255) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `inuseprograms` +-- + +DROP TABLE IF EXISTS `inuseprograms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `inuseprograms` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `recusage` varchar(128) NOT NULL DEFAULT '', + `lastupdatetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `hostname` varchar(64) NOT NULL DEFAULT '', + `rechost` varchar(64) NOT NULL, + `recdir` varchar(255) NOT NULL DEFAULT '', + KEY `chanid` (`chanid`,`starttime`), + KEY `recusage` (`recusage`,`lastupdatetime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `iptv_channel` +-- + +DROP TABLE IF EXISTS `iptv_channel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `iptv_channel` ( + `iptvid` smallint(6) unsigned NOT NULL AUTO_INCREMENT, + `chanid` int(10) unsigned NOT NULL, + `url` text NOT NULL, + `type` set('data','rfc2733-1','rfc2733-2','rfc5109-1','rfc5109-2','smpte2022-1','smpte2022-2') DEFAULT NULL, + `bitrate` int(10) unsigned NOT NULL, + PRIMARY KEY (`iptvid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `jobqueue` +-- + +DROP TABLE IF EXISTS `jobqueue`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `jobqueue` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `chanid` int(10) NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `inserttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `type` int(11) NOT NULL DEFAULT '0', + `cmds` int(11) NOT NULL DEFAULT '0', + `flags` int(11) NOT NULL DEFAULT '0', + `status` int(11) NOT NULL DEFAULT '0', + `statustime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `hostname` varchar(64) NOT NULL DEFAULT '', + `args` blob NOT NULL, + `comment` varchar(128) NOT NULL DEFAULT '', + `schedruntime` datetime NOT NULL DEFAULT '2007-01-01 00:00:00', + PRIMARY KEY (`id`), + UNIQUE KEY `chanid` (`chanid`,`starttime`,`type`,`inserttime`) +) ENGINE=MyISAM AUTO_INCREMENT=3235 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `jumppoints` +-- + +DROP TABLE IF EXISTS `jumppoints`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `jumppoints` ( + `destination` varchar(128) NOT NULL DEFAULT '', + `description` varchar(255) DEFAULT NULL, + `keylist` varchar(128) DEFAULT NULL, + `hostname` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`destination`,`hostname`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `keybindings` +-- + +DROP TABLE IF EXISTS `keybindings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `keybindings` ( + `context` varchar(32) NOT NULL DEFAULT '', + `action` varchar(32) NOT NULL DEFAULT '', + `description` varchar(255) DEFAULT NULL, + `keylist` varchar(128) DEFAULT NULL, + `hostname` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`context`,`action`,`hostname`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `keyword` +-- + +DROP TABLE IF EXISTS `keyword`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `keyword` ( + `phrase` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `searchtype` int(10) unsigned NOT NULL DEFAULT '3', + UNIQUE KEY `phrase` (`phrase`,`searchtype`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `livestream` +-- + +DROP TABLE IF EXISTS `livestream`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `livestream` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `width` int(10) unsigned NOT NULL, + `height` int(10) unsigned NOT NULL, + `bitrate` int(10) unsigned NOT NULL, + `audiobitrate` int(10) unsigned NOT NULL, + `samplerate` int(10) unsigned NOT NULL, + `audioonlybitrate` int(10) unsigned NOT NULL, + `segmentsize` int(10) unsigned NOT NULL DEFAULT '10', + `maxsegments` int(10) unsigned NOT NULL DEFAULT '0', + `startsegment` int(10) unsigned NOT NULL DEFAULT '0', + `currentsegment` int(10) unsigned NOT NULL DEFAULT '0', + `segmentcount` int(10) unsigned NOT NULL DEFAULT '0', + `percentcomplete` int(10) unsigned NOT NULL DEFAULT '0', + `created` datetime NOT NULL, + `lastmodified` datetime NOT NULL, + `relativeurl` varchar(512) NOT NULL, + `fullurl` varchar(1024) NOT NULL, + `status` int(10) unsigned NOT NULL DEFAULT '0', + `statusmessage` varchar(256) NOT NULL, + `sourcefile` varchar(512) NOT NULL, + `sourcehost` varchar(64) NOT NULL, + `sourcewidth` int(10) unsigned NOT NULL DEFAULT '0', + `sourceheight` int(10) unsigned NOT NULL DEFAULT '0', + `outdir` varchar(256) NOT NULL, + `outbase` varchar(128) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `logging` +-- + +DROP TABLE IF EXISTS `logging`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `logging` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `host` varchar(64) NOT NULL DEFAULT '', + `application` varchar(64) NOT NULL DEFAULT '', + `pid` int(11) NOT NULL DEFAULT '0', + `tid` int(11) NOT NULL DEFAULT '0', + `thread` varchar(64) NOT NULL DEFAULT '', + `filename` varchar(255) NOT NULL DEFAULT '', + `line` int(11) NOT NULL DEFAULT '0', + `function` varchar(255) NOT NULL DEFAULT '', + `msgtime` datetime NOT NULL, + `level` int(11) NOT NULL DEFAULT '0', + `message` varchar(2048) NOT NULL, + PRIMARY KEY (`id`), + KEY `host` (`host`,`application`,`pid`,`msgtime`), + KEY `msgtime` (`msgtime`), + KEY `level` (`level`) +) ENGINE=MyISAM AUTO_INCREMENT=1125417 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_albumart` +-- + +DROP TABLE IF EXISTS `music_albumart`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_albumart` ( + `albumart_id` int(20) NOT NULL AUTO_INCREMENT, + `filename` varchar(255) NOT NULL DEFAULT '', + `directory_id` int(20) NOT NULL DEFAULT '0', + `imagetype` tinyint(3) NOT NULL DEFAULT '0', + `song_id` int(11) NOT NULL DEFAULT '0', + `embedded` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`albumart_id`) +) ENGINE=MyISAM AUTO_INCREMENT=40 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_albums` +-- + +DROP TABLE IF EXISTS `music_albums`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_albums` ( + `album_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `artist_id` int(11) unsigned NOT NULL DEFAULT '0', + `album_name` varchar(255) NOT NULL DEFAULT '', + `year` smallint(6) NOT NULL DEFAULT '0', + `compilation` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`album_id`), + KEY `idx_album_name` (`album_name`) +) ENGINE=MyISAM AUTO_INCREMENT=2720 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_artists` +-- + +DROP TABLE IF EXISTS `music_artists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_artists` ( + `artist_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `artist_name` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`artist_id`), + KEY `idx_artist_name` (`artist_name`) +) ENGINE=MyISAM AUTO_INCREMENT=1221 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_dir_old` +-- + +DROP TABLE IF EXISTS `music_dir_old`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_dir_old` ( + `directory_id` int(20) NOT NULL AUTO_INCREMENT, + `path` text CHARACTER SET latin1 NOT NULL, + `parent_id` int(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`directory_id`) +) ENGINE=MyISAM AUTO_INCREMENT=502 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_directories` +-- + +DROP TABLE IF EXISTS `music_directories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_directories` ( + `directory_id` int(20) NOT NULL AUTO_INCREMENT, + `path` text NOT NULL, + `parent_id` int(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`directory_id`) +) ENGINE=MyISAM AUTO_INCREMENT=814 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_genres` +-- + +DROP TABLE IF EXISTS `music_genres`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_genres` ( + `genre_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `genre` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`genre_id`), + KEY `idx_genre` (`genre`) +) ENGINE=MyISAM AUTO_INCREMENT=78 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_playlists` +-- + +DROP TABLE IF EXISTS `music_playlists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_playlists` ( + `playlist_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `playlist_name` varchar(255) NOT NULL DEFAULT '', + `playlist_songs` text NOT NULL, + `last_accessed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `length` int(11) unsigned NOT NULL DEFAULT '0', + `songcount` smallint(8) unsigned NOT NULL DEFAULT '0', + `hostname` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`playlist_id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_smartplaylist_categories` +-- + +DROP TABLE IF EXISTS `music_smartplaylist_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_smartplaylist_categories` ( + `categoryid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL, + PRIMARY KEY (`categoryid`), + KEY `name` (`name`) +) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_smartplaylist_items` +-- + +DROP TABLE IF EXISTS `music_smartplaylist_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_smartplaylist_items` ( + `smartplaylistitemid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `smartplaylistid` int(10) unsigned NOT NULL DEFAULT '0', + `field` varchar(50) NOT NULL, + `operator` varchar(20) NOT NULL, + `value1` varchar(255) NOT NULL, + `value2` varchar(255) NOT NULL, + PRIMARY KEY (`smartplaylistitemid`), + KEY `smartplaylistid` (`smartplaylistid`) +) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_smartplaylists` +-- + +DROP TABLE IF EXISTS `music_smartplaylists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_smartplaylists` ( + `smartplaylistid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL, + `categoryid` int(10) unsigned NOT NULL DEFAULT '0', + `matchtype` set('All','Any') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT 'All', + `orderby` varchar(128) NOT NULL DEFAULT '', + `limitto` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`smartplaylistid`), + KEY `name` (`name`), + KEY `categoryid` (`categoryid`) +) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_songs` +-- + +DROP TABLE IF EXISTS `music_songs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_songs` ( + `song_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `filename` text NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `track` smallint(6) unsigned NOT NULL DEFAULT '0', + `artist_id` int(11) unsigned NOT NULL DEFAULT '0', + `album_id` int(11) unsigned NOT NULL DEFAULT '0', + `genre_id` int(11) unsigned NOT NULL DEFAULT '0', + `year` smallint(6) NOT NULL DEFAULT '0', + `length` int(11) unsigned NOT NULL DEFAULT '0', + `numplays` int(11) unsigned NOT NULL DEFAULT '0', + `rating` tinyint(4) unsigned NOT NULL DEFAULT '0', + `lastplay` datetime DEFAULT NULL, + `date_entered` datetime DEFAULT NULL, + `date_modified` datetime DEFAULT NULL, + `format` varchar(4) NOT NULL DEFAULT '0', + `mythdigest` varchar(255) DEFAULT NULL, + `size` bigint(20) unsigned DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, + `disc_count` smallint(5) unsigned DEFAULT '0', + `disc_number` smallint(5) unsigned DEFAULT '0', + `track_count` smallint(5) unsigned DEFAULT '0', + `start_time` int(10) unsigned DEFAULT '0', + `stop_time` int(10) unsigned DEFAULT NULL, + `eq_preset` varchar(255) DEFAULT NULL, + `relative_volume` tinyint(4) DEFAULT '0', + `sample_rate` int(10) unsigned DEFAULT '0', + `bitrate` int(10) unsigned DEFAULT '0', + `bpm` smallint(5) unsigned DEFAULT NULL, + `directory_id` int(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`song_id`), + KEY `idx_name` (`name`), + KEY `idx_mythdigest` (`mythdigest`), + KEY `directory_id` (`directory_id`), + KEY `album_id` (`album_id`), + KEY `genre_id` (`genre_id`), + KEY `artist_id` (`artist_id`) +) ENGINE=MyISAM AUTO_INCREMENT=14096 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `music_stats` +-- + +DROP TABLE IF EXISTS `music_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `music_stats` ( + `num_artists` smallint(5) unsigned NOT NULL DEFAULT '0', + `num_albums` smallint(5) unsigned NOT NULL DEFAULT '0', + `num_songs` mediumint(8) unsigned NOT NULL DEFAULT '0', + `num_genres` tinyint(3) unsigned NOT NULL DEFAULT '0', + `total_time` varchar(12) NOT NULL DEFAULT '0', + `total_size` varchar(10) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mythlog` +-- + +DROP TABLE IF EXISTS `mythlog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mythlog` ( + `logid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(32) NOT NULL DEFAULT '', + `priority` int(11) NOT NULL DEFAULT '0', + `acknowledged` tinyint(1) DEFAULT '0', + `logdate` datetime DEFAULT NULL, + `host` varchar(128) DEFAULT NULL, + `message` varchar(255) NOT NULL DEFAULT '', + `details` varchar(16000) NOT NULL DEFAULT '', + PRIMARY KEY (`logid`), + KEY `module` (`module`) +) ENGINE=MyISAM AUTO_INCREMENT=564095 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mythweb_sessions` +-- + +DROP TABLE IF EXISTS `mythweb_sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mythweb_sessions` ( + `id` varchar(128) NOT NULL, + `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `data` blob NOT NULL, + PRIMARY KEY (`id`), + KEY `modified` (`modified`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `networkiconmap` +-- + +DROP TABLE IF EXISTS `networkiconmap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `networkiconmap` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `network` varchar(20) NOT NULL DEFAULT '', + `url` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `network` (`network`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oldfind` +-- + +DROP TABLE IF EXISTS `oldfind`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oldfind` ( + `recordid` int(11) NOT NULL DEFAULT '0', + `findid` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`recordid`,`findid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oldprogram` +-- + +DROP TABLE IF EXISTS `oldprogram`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oldprogram` ( + `oldtitle` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `airdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`oldtitle`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oldrecorded` +-- + +DROP TABLE IF EXISTS `oldrecorded`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oldrecorded` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `title` varchar(128) NOT NULL DEFAULT '', + `subtitle` varchar(128) NOT NULL DEFAULT '', + `description` varchar(16000) NOT NULL DEFAULT '', + `season` smallint(5) NOT NULL, + `episode` smallint(5) NOT NULL, + `category` varchar(64) NOT NULL DEFAULT '', + `seriesid` varchar(64) DEFAULT NULL, + `programid` varchar(64) DEFAULT NULL, + `inetref` varchar(40) NOT NULL, + `findid` int(11) NOT NULL DEFAULT '0', + `recordid` int(11) NOT NULL DEFAULT '0', + `station` varchar(20) NOT NULL DEFAULT '', + `rectype` int(10) unsigned NOT NULL DEFAULT '0', + `duplicate` tinyint(1) NOT NULL DEFAULT '0', + `recstatus` int(11) NOT NULL DEFAULT '0', + `reactivate` smallint(6) NOT NULL DEFAULT '0', + `generic` tinyint(1) NOT NULL, + `future` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`station`,`starttime`,`title`), + KEY `endtime` (`endtime`), + KEY `title` (`title`), + KEY `seriesid` (`seriesid`), + KEY `programid` (`programid`), + KEY `recordid` (`recordid`), + KEY `recstatus` (`recstatus`,`programid`,`seriesid`), + KEY `recstatus_2` (`recstatus`,`title`,`subtitle`), + KEY `future` (`future`), + KEY `chanid` (`chanid`,`starttime`), + KEY `subtitle` (`subtitle`), + KEY `description` (`description`(255)) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `people` +-- + +DROP TABLE IF EXISTS `people`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `people` ( + `person` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`person`), + UNIQUE KEY `name` (`name`(41)) +) ENGINE=MyISAM AUTO_INCREMENT=3781 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `pidcache` +-- + +DROP TABLE IF EXISTS `pidcache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pidcache` ( + `chanid` smallint(6) NOT NULL DEFAULT '0', + `pid` int(11) NOT NULL DEFAULT '-1', + `tableid` int(11) NOT NULL DEFAULT '-1', + KEY `chanid` (`chanid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `playgroup` +-- + +DROP TABLE IF EXISTS `playgroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `playgroup` ( + `name` varchar(32) NOT NULL DEFAULT '', + `titlematch` varchar(255) NOT NULL DEFAULT '', + `skipahead` int(11) NOT NULL DEFAULT '0', + `skipback` int(11) NOT NULL DEFAULT '0', + `timestretch` int(11) NOT NULL DEFAULT '0', + `jump` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `powerpriority` +-- + +DROP TABLE IF EXISTS `powerpriority`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `powerpriority` ( + `priorityname` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `recpriority` int(10) NOT NULL DEFAULT '0', + `selectclause` varchar(16000) NOT NULL DEFAULT '', + PRIMARY KEY (`priorityname`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profilegroups` +-- + +DROP TABLE IF EXISTS `profilegroups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profilegroups` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) DEFAULT NULL, + `cardtype` varchar(32) NOT NULL DEFAULT 'V4L', + `is_default` int(1) DEFAULT '0', + `hostname` varchar(64) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`,`hostname`), + KEY `cardtype` (`cardtype`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `program` +-- + +DROP TABLE IF EXISTS `program`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `program` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `title` varchar(128) NOT NULL DEFAULT '', + `subtitle` varchar(128) NOT NULL DEFAULT '', + `description` varchar(16000) NOT NULL DEFAULT '', + `category` varchar(64) NOT NULL DEFAULT '', + `category_type` varchar(64) NOT NULL DEFAULT '', + `airdate` year(4) NOT NULL DEFAULT '0000', + `stars` float NOT NULL DEFAULT '0', + `previouslyshown` tinyint(4) NOT NULL DEFAULT '0', + `title_pronounce` varchar(128) NOT NULL DEFAULT '', + `stereo` tinyint(1) NOT NULL DEFAULT '0', + `subtitled` tinyint(1) NOT NULL DEFAULT '0', + `hdtv` tinyint(1) NOT NULL DEFAULT '0', + `closecaptioned` tinyint(1) NOT NULL DEFAULT '0', + `partnumber` int(11) NOT NULL DEFAULT '0', + `parttotal` int(11) NOT NULL DEFAULT '0', + `seriesid` varchar(64) NOT NULL DEFAULT '', + `originalairdate` date DEFAULT NULL, + `showtype` varchar(30) NOT NULL DEFAULT '', + `colorcode` varchar(20) NOT NULL DEFAULT '', + `syndicatedepisodenumber` varchar(20) NOT NULL DEFAULT '', + `programid` varchar(64) NOT NULL DEFAULT '', + `manualid` int(10) unsigned NOT NULL DEFAULT '0', + `generic` tinyint(1) DEFAULT '0', + `listingsource` int(11) NOT NULL DEFAULT '0', + `first` tinyint(1) NOT NULL DEFAULT '0', + `last` tinyint(1) NOT NULL DEFAULT '0', + `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `videoprop` set('HDTV','WIDESCREEN','AVC') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + PRIMARY KEY (`chanid`,`starttime`,`manualid`), + KEY `endtime` (`endtime`), + KEY `title_pronounce` (`title_pronounce`), + KEY `seriesid` (`seriesid`), + KEY `id_start_end` (`chanid`,`starttime`,`endtime`), + KEY `program_manualid` (`manualid`), + KEY `previouslyshown` (`previouslyshown`), + KEY `programid` (`programid`,`starttime`), + KEY `starttime` (`starttime`), + KEY `idx_program_cattype` (`category_type`), + KEY `subtitle` (`subtitle`), + KEY `description` (`description`(255)), + KEY `title_subtitle_start` (`title`,`subtitle`,`starttime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `programgenres` +-- + +DROP TABLE IF EXISTS `programgenres`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `programgenres` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `relevance` char(1) NOT NULL DEFAULT '', + `genre` varchar(30) DEFAULT NULL, + PRIMARY KEY (`chanid`,`starttime`,`relevance`), + KEY `genre` (`genre`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `programrating` +-- + +DROP TABLE IF EXISTS `programrating`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `programrating` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `system` varchar(8) DEFAULT NULL, + `rating` varchar(16) DEFAULT NULL, + UNIQUE KEY `chanid` (`chanid`,`starttime`,`system`,`rating`), + KEY `starttime` (`starttime`,`system`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recgrouppassword` +-- + +DROP TABLE IF EXISTS `recgrouppassword`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recgrouppassword` ( + `recgroup` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `password` varchar(10) NOT NULL DEFAULT '', + PRIMARY KEY (`recgroup`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `record` +-- + +DROP TABLE IF EXISTS `record`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `record` ( + `recordid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` int(10) unsigned NOT NULL DEFAULT '0', + `chanid` int(10) unsigned DEFAULT NULL, + `starttime` time NOT NULL DEFAULT '00:00:00', + `startdate` date NOT NULL DEFAULT '0000-00-00', + `endtime` time NOT NULL DEFAULT '00:00:00', + `enddate` date NOT NULL DEFAULT '0000-00-00', + `title` varchar(128) NOT NULL DEFAULT '', + `subtitle` varchar(128) NOT NULL DEFAULT '', + `description` varchar(16000) NOT NULL DEFAULT '', + `season` smallint(5) NOT NULL, + `episode` smallint(5) NOT NULL, + `category` varchar(64) NOT NULL DEFAULT '', + `profile` varchar(128) NOT NULL DEFAULT 'Default', + `recpriority` int(10) NOT NULL DEFAULT '0', + `autoexpire` int(11) NOT NULL DEFAULT '0', + `maxepisodes` int(11) NOT NULL DEFAULT '0', + `maxnewest` int(11) NOT NULL DEFAULT '0', + `startoffset` int(11) NOT NULL DEFAULT '0', + `endoffset` int(11) NOT NULL DEFAULT '0', + `recgroup` varchar(32) NOT NULL DEFAULT 'Default', + `dupmethod` int(11) NOT NULL DEFAULT '6', + `dupin` int(11) NOT NULL DEFAULT '15', + `station` varchar(20) NOT NULL DEFAULT '', + `seriesid` varchar(64) DEFAULT NULL, + `programid` varchar(64) DEFAULT NULL, + `inetref` varchar(40) NOT NULL, + `search` int(10) unsigned NOT NULL DEFAULT '0', + `autotranscode` tinyint(1) NOT NULL DEFAULT '0', + `autocommflag` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob1` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob2` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob3` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob4` tinyint(1) NOT NULL DEFAULT '0', + `autometadata` tinyint(1) NOT NULL DEFAULT '0', + `findday` tinyint(4) NOT NULL DEFAULT '0', + `findtime` time NOT NULL DEFAULT '00:00:00', + `findid` int(11) NOT NULL DEFAULT '0', + `inactive` tinyint(1) NOT NULL DEFAULT '0', + `parentid` int(11) NOT NULL DEFAULT '0', + `transcoder` int(11) NOT NULL DEFAULT '0', + `playgroup` varchar(32) NOT NULL DEFAULT 'Default', + `prefinput` int(10) NOT NULL DEFAULT '0', + `next_record` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_record` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_delete` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', + `avg_delay` int(11) NOT NULL DEFAULT '100', + `filter` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`recordid`), + KEY `chanid` (`chanid`,`starttime`), + KEY `title` (`title`), + KEY `seriesid` (`seriesid`), + KEY `programid` (`programid`), + KEY `maxepisodes` (`maxepisodes`), + KEY `search` (`search`), + KEY `type` (`type`) +) ENGINE=MyISAM AUTO_INCREMENT=3482 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `record_tmp` +-- + +DROP TABLE IF EXISTS `record_tmp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `record_tmp` ( + `recordid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` int(10) unsigned NOT NULL DEFAULT '0', + `chanid` int(10) unsigned DEFAULT NULL, + `starttime` time NOT NULL DEFAULT '00:00:00', + `startdate` date NOT NULL DEFAULT '0000-00-00', + `endtime` time NOT NULL DEFAULT '00:00:00', + `enddate` date NOT NULL DEFAULT '0000-00-00', + `title` varchar(128) NOT NULL DEFAULT '', + `subtitle` varchar(128) NOT NULL DEFAULT '', + `description` text NOT NULL, + `category` varchar(64) NOT NULL DEFAULT '', + `profile` varchar(128) NOT NULL DEFAULT 'Default', + `recpriority` int(10) NOT NULL DEFAULT '0', + `autoexpire` int(11) NOT NULL DEFAULT '0', + `maxepisodes` int(11) NOT NULL DEFAULT '0', + `maxnewest` int(11) NOT NULL DEFAULT '0', + `startoffset` int(11) NOT NULL DEFAULT '0', + `endoffset` int(11) NOT NULL DEFAULT '0', + `recgroup` varchar(32) NOT NULL DEFAULT 'Default', + `dupmethod` int(11) NOT NULL DEFAULT '6', + `dupin` int(11) NOT NULL DEFAULT '15', + `station` varchar(20) NOT NULL DEFAULT '', + `seriesid` varchar(40) NOT NULL DEFAULT '', + `programid` varchar(40) NOT NULL DEFAULT '', + `search` int(10) unsigned NOT NULL DEFAULT '0', + `autotranscode` tinyint(1) NOT NULL DEFAULT '0', + `autocommflag` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob1` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob2` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob3` tinyint(1) NOT NULL DEFAULT '0', + `autouserjob4` tinyint(1) NOT NULL DEFAULT '0', + `findday` tinyint(4) NOT NULL DEFAULT '0', + `findtime` time NOT NULL DEFAULT '00:00:00', + `findid` int(11) NOT NULL DEFAULT '0', + `inactive` tinyint(1) NOT NULL DEFAULT '0', + `parentid` int(11) NOT NULL DEFAULT '0', + `transcoder` int(11) NOT NULL DEFAULT '0', + `tsdefault` float NOT NULL DEFAULT '1', + `playgroup` varchar(32) NOT NULL DEFAULT 'Default', + `prefinput` int(10) NOT NULL DEFAULT '0', + `next_record` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_record` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_delete` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', + `avg_delay` int(11) NOT NULL DEFAULT '100', + PRIMARY KEY (`recordid`) +) ENGINE=MyISAM AUTO_INCREMENT=1897 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recorded` +-- + +DROP TABLE IF EXISTS `recorded`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recorded` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `title` varchar(128) NOT NULL DEFAULT '', + `subtitle` varchar(128) NOT NULL DEFAULT '', + `description` varchar(16000) NOT NULL DEFAULT '', + `season` smallint(5) NOT NULL, + `episode` smallint(5) NOT NULL, + `category` varchar(64) NOT NULL DEFAULT '', + `hostname` varchar(64) NOT NULL DEFAULT '', + `bookmark` tinyint(1) NOT NULL DEFAULT '0', + `editing` int(10) unsigned NOT NULL DEFAULT '0', + `cutlist` tinyint(1) NOT NULL DEFAULT '0', + `autoexpire` int(11) NOT NULL DEFAULT '0', + `commflagged` int(10) unsigned NOT NULL DEFAULT '0', + `recgroup` varchar(32) NOT NULL DEFAULT 'Default', + `recordid` int(11) DEFAULT NULL, + `seriesid` varchar(64) DEFAULT NULL, + `programid` varchar(64) DEFAULT NULL, + `inetref` varchar(40) NOT NULL, + `lastmodified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `filesize` bigint(20) NOT NULL DEFAULT '0', + `stars` float NOT NULL DEFAULT '0', + `previouslyshown` tinyint(1) DEFAULT '0', + `originalairdate` date DEFAULT NULL, + `preserve` tinyint(1) NOT NULL DEFAULT '0', + `findid` int(11) NOT NULL DEFAULT '0', + `deletepending` tinyint(1) NOT NULL DEFAULT '0', + `transcoder` int(11) NOT NULL DEFAULT '0', + `timestretch` float NOT NULL DEFAULT '1', + `recpriority` int(11) NOT NULL DEFAULT '0', + `basename` varchar(255) NOT NULL, + `progstart` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `progend` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `playgroup` varchar(32) NOT NULL DEFAULT 'Default', + `profile` varchar(32) NOT NULL DEFAULT '', + `duplicate` tinyint(1) NOT NULL DEFAULT '0', + `transcoded` tinyint(1) NOT NULL DEFAULT '0', + `watched` tinyint(4) NOT NULL DEFAULT '0', + `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', + `bookmarkupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`chanid`,`starttime`), + UNIQUE KEY `uni_recorded_basename` (`basename`), + KEY `endtime` (`endtime`), + KEY `seriesid` (`seriesid`), + KEY `programid` (`programid`), + KEY `title` (`title`), + KEY `recordid` (`recordid`), + KEY `deletepending` (`deletepending`,`lastmodified`), + KEY `recgroup` (`recgroup`,`endtime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedartwork` +-- + +DROP TABLE IF EXISTS `recordedartwork`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedartwork` ( + `inetref` varchar(255) NOT NULL, + `season` smallint(5) NOT NULL, + `host` text NOT NULL, + `coverart` text NOT NULL, + `fanart` text NOT NULL, + `banner` text NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedcredits` +-- + +DROP TABLE IF EXISTS `recordedcredits`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedcredits` ( + `person` mediumint(8) unsigned NOT NULL DEFAULT '0', + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + UNIQUE KEY `chanid` (`chanid`,`starttime`,`person`,`role`), + KEY `person` (`person`,`role`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedfile` +-- + +DROP TABLE IF EXISTS `recordedfile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedfile` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `basename` varchar(128) NOT NULL DEFAULT '', + `filesize` bigint(20) NOT NULL DEFAULT '0', + `width` smallint(5) unsigned NOT NULL DEFAULT '0', + `height` smallint(5) unsigned NOT NULL DEFAULT '0', + `fps` float(6,3) NOT NULL DEFAULT '0.000', + `aspect` float(8,6) NOT NULL DEFAULT '0.000000', + `audio_sample_rate` smallint(5) unsigned NOT NULL DEFAULT '0', + `audio_bits_per_sample` smallint(5) unsigned NOT NULL DEFAULT '0', + `audio_channels` tinyint(3) unsigned NOT NULL DEFAULT '0', + `audio_type` varchar(255) NOT NULL DEFAULT '', + `video_type` varchar(255) NOT NULL DEFAULT '', + `comment` varchar(255) NOT NULL DEFAULT '', + `hostname` varchar(64) NOT NULL, + `storagegroup` varchar(32) NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`), + UNIQUE KEY `chanid` (`chanid`,`starttime`,`basename`), + KEY `basename` (`basename`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedmarkup` +-- + +DROP TABLE IF EXISTS `recordedmarkup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedmarkup` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `mark` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` tinyint(4) NOT NULL DEFAULT '0', + `data` int(11) unsigned DEFAULT NULL, + PRIMARY KEY (`chanid`,`starttime`,`type`,`mark`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedprogram` +-- + +DROP TABLE IF EXISTS `recordedprogram`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedprogram` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `title` varchar(128) NOT NULL DEFAULT '', + `subtitle` varchar(128) NOT NULL DEFAULT '', + `description` varchar(16000) NOT NULL DEFAULT '', + `category` varchar(64) NOT NULL DEFAULT '', + `category_type` varchar(64) NOT NULL DEFAULT '', + `airdate` year(4) NOT NULL DEFAULT '0000', + `stars` float unsigned NOT NULL DEFAULT '0', + `previouslyshown` tinyint(4) NOT NULL DEFAULT '0', + `title_pronounce` varchar(128) NOT NULL DEFAULT '', + `stereo` tinyint(1) NOT NULL DEFAULT '0', + `subtitled` tinyint(1) NOT NULL DEFAULT '0', + `hdtv` tinyint(1) NOT NULL DEFAULT '0', + `closecaptioned` tinyint(1) NOT NULL DEFAULT '0', + `partnumber` int(11) NOT NULL DEFAULT '0', + `parttotal` int(11) NOT NULL DEFAULT '0', + `seriesid` varchar(64) DEFAULT NULL, + `originalairdate` date DEFAULT NULL, + `showtype` varchar(30) NOT NULL DEFAULT '', + `colorcode` varchar(20) NOT NULL DEFAULT '', + `syndicatedepisodenumber` varchar(20) NOT NULL DEFAULT '', + `programid` varchar(64) DEFAULT NULL, + `manualid` int(10) unsigned NOT NULL DEFAULT '0', + `generic` tinyint(1) DEFAULT '0', + `listingsource` int(11) NOT NULL DEFAULT '0', + `first` tinyint(1) NOT NULL DEFAULT '0', + `last` tinyint(1) NOT NULL DEFAULT '0', + `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `videoprop` set('HDTV','WIDESCREEN','AVC','720','1080','DAMAGED') NOT NULL, + PRIMARY KEY (`chanid`,`starttime`,`manualid`), + KEY `endtime` (`endtime`), + KEY `title` (`title`), + KEY `title_pronounce` (`title_pronounce`), + KEY `seriesid` (`seriesid`), + KEY `programid` (`programid`), + KEY `id_start_end` (`chanid`,`starttime`,`endtime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedrating` +-- + +DROP TABLE IF EXISTS `recordedrating`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedrating` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `system` varchar(8) DEFAULT NULL, + `rating` varchar(16) DEFAULT NULL, + UNIQUE KEY `chanid` (`chanid`,`starttime`,`system`,`rating`), + KEY `starttime` (`starttime`,`system`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordedseek` +-- + +DROP TABLE IF EXISTS `recordedseek`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedseek` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `mark` mediumint(8) unsigned NOT NULL DEFAULT '0', + `offset` bigint(20) unsigned NOT NULL, + `type` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`chanid`,`starttime`,`type`,`mark`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordfilter` +-- + +DROP TABLE IF EXISTS `recordfilter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordfilter` ( + `filterid` int(10) unsigned NOT NULL, + `description` varchar(64) DEFAULT NULL, + `clause` varchar(256) DEFAULT NULL, + `newruledefault` tinyint(1) DEFAULT '0', + PRIMARY KEY (`filterid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordingprofiles` +-- + +DROP TABLE IF EXISTS `recordingprofiles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordingprofiles` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) DEFAULT NULL, + `videocodec` varchar(128) DEFAULT NULL, + `audiocodec` varchar(128) DEFAULT NULL, + `profilegroup` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `profilegroup` (`profilegroup`) +) ENGINE=MyISAM AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `recordmatch` +-- + +DROP TABLE IF EXISTS `recordmatch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordmatch` ( + `recordid` int(10) unsigned NOT NULL, + `chanid` int(10) unsigned NOT NULL, + `starttime` datetime NOT NULL, + `manualid` int(10) unsigned NOT NULL, + `oldrecduplicate` tinyint(1) DEFAULT NULL, + `recduplicate` tinyint(1) DEFAULT NULL, + `findduplicate` tinyint(1) DEFAULT NULL, + `oldrecstatus` int(11) DEFAULT NULL, + `findid` int(11) NOT NULL DEFAULT '0', + UNIQUE KEY `recordid` (`recordid`,`chanid`,`starttime`), + KEY `chanid` (`chanid`,`starttime`,`manualid`), + KEY `recordid_2` (`recordid`,`findid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `scannerfile` +-- + +DROP TABLE IF EXISTS `scannerfile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `scannerfile` ( + `fileid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `filesize` bigint(20) unsigned NOT NULL DEFAULT '0', + `filehash` varchar(64) NOT NULL DEFAULT '', + `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`fileid`), + UNIQUE KEY `filehash` (`filehash`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `scannerpath` +-- + +DROP TABLE IF EXISTS `scannerpath`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `scannerpath` ( + `fileid` bigint(20) unsigned NOT NULL, + `hostname` varchar(64) NOT NULL DEFAULT 'localhost', + `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', + `filename` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`fileid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `schemalock` +-- + +DROP TABLE IF EXISTS `schemalock`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `schemalock` ( + `schemalock` int(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `settings` +-- + +DROP TABLE IF EXISTS `settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `settings` ( + `value` varchar(128) NOT NULL DEFAULT '', + `data` varchar(16000) NOT NULL DEFAULT '', + `hostname` varchar(64) DEFAULT NULL, + KEY `value` (`value`,`hostname`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `storagegroup` +-- + +DROP TABLE IF EXISTS `storagegroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `storagegroup` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `groupname` varchar(32) NOT NULL, + `hostname` varchar(64) NOT NULL DEFAULT '', + `dirname` varchar(235) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `grouphostdir` (`groupname`,`hostname`,`dirname`), + KEY `hostname` (`hostname`) +) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `tvchain` +-- + +DROP TABLE IF EXISTS `tvchain`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tvchain` ( + `chanid` int(10) unsigned NOT NULL DEFAULT '0', + `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `chainid` varchar(128) NOT NULL DEFAULT '', + `chainpos` int(10) NOT NULL DEFAULT '0', + `discontinuity` tinyint(1) NOT NULL DEFAULT '0', + `watching` int(10) NOT NULL DEFAULT '0', + `hostprefix` varchar(128) NOT NULL DEFAULT '', + `cardtype` varchar(32) NOT NULL DEFAULT 'V4L', + `input` varchar(32) NOT NULL DEFAULT '', + `channame` varchar(32) NOT NULL DEFAULT '', + `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`chanid`,`starttime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `tvosdmenu` +-- + +DROP TABLE IF EXISTS `tvosdmenu`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tvosdmenu` ( + `osdcategory` varchar(32) NOT NULL, + `livetv` tinyint(4) NOT NULL DEFAULT '0', + `recorded` tinyint(4) NOT NULL DEFAULT '0', + `video` tinyint(4) NOT NULL DEFAULT '0', + `dvd` tinyint(4) NOT NULL DEFAULT '0', + `description` varchar(32) NOT NULL, + PRIMARY KEY (`osdcategory`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `upnpmedia` +-- + +DROP TABLE IF EXISTS `upnpmedia`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `upnpmedia` ( + `intid` int(10) unsigned NOT NULL DEFAULT '0', + `class` varchar(64) NOT NULL DEFAULT '', + `itemtype` varchar(128) NOT NULL DEFAULT '', + `parentid` int(10) unsigned NOT NULL DEFAULT '0', + `itemproperties` varchar(255) NOT NULL DEFAULT '', + `filepath` varchar(512) NOT NULL DEFAULT '', + `title` varchar(255) NOT NULL DEFAULT '', + `filename` varchar(512) NOT NULL DEFAULT '', + `coverart` varchar(512) NOT NULL DEFAULT '', + PRIMARY KEY (`intid`), + KEY `class` (`class`), + KEY `filepath` (`filepath`(255)), + KEY `parentid` (`parentid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videocast` +-- + +DROP TABLE IF EXISTS `videocast`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videocast` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cast` varchar(128) NOT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM AUTO_INCREMENT=574 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videocategory` +-- + +DROP TABLE IF EXISTS `videocategory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videocategory` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `category` varchar(128) NOT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videocollection` +-- + +DROP TABLE IF EXISTS `videocollection`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videocollection` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(256) NOT NULL, + `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '', + `plot` text, + `network` varchar(128) DEFAULT NULL, + `collectionref` varchar(128) NOT NULL, + `certification` varchar(128) DEFAULT NULL, + `genre` varchar(128) DEFAULT '', + `releasedate` date DEFAULT NULL, + `language` varchar(10) DEFAULT NULL, + `status` varchar(64) DEFAULT NULL, + `rating` float DEFAULT '0', + `ratingcount` int(10) DEFAULT '0', + `runtime` smallint(5) unsigned DEFAULT '0', + `banner` text, + `fanart` text, + `coverart` text, + PRIMARY KEY (`intid`), + KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videocountry` +-- + +DROP TABLE IF EXISTS `videocountry`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videocountry` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(128) NOT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videogenre` +-- + +DROP TABLE IF EXISTS `videogenre`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videogenre` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `genre` varchar(128) NOT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videometadata` +-- + +DROP TABLE IF EXISTS `videometadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videometadata` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(128) NOT NULL, + `subtitle` text NOT NULL, + `tagline` varchar(255) DEFAULT NULL, + `director` varchar(128) NOT NULL, + `studio` varchar(128) DEFAULT NULL, + `plot` text, + `rating` varchar(128) NOT NULL, + `inetref` varchar(255) NOT NULL, + `collectionref` int(10) NOT NULL DEFAULT '-1', + `homepage` text NOT NULL, + `year` int(10) unsigned NOT NULL DEFAULT '0', + `releasedate` date NOT NULL, + `userrating` float NOT NULL DEFAULT '0', + `length` int(10) unsigned NOT NULL DEFAULT '0', + `playcount` int(10) NOT NULL DEFAULT '0', + `season` smallint(5) unsigned NOT NULL DEFAULT '0', + `episode` smallint(5) unsigned NOT NULL DEFAULT '0', + `showlevel` int(10) unsigned NOT NULL DEFAULT '0', + `filename` text NOT NULL, + `hash` varchar(128) NOT NULL, + `coverfile` text NOT NULL, + `childid` int(11) NOT NULL DEFAULT '-1', + `browse` tinyint(1) NOT NULL DEFAULT '1', + `watched` tinyint(1) NOT NULL DEFAULT '0', + `processed` tinyint(1) NOT NULL DEFAULT '0', + `playcommand` varchar(255) DEFAULT NULL, + `category` int(10) unsigned NOT NULL DEFAULT '0', + `trailer` text, + `host` text NOT NULL, + `screenshot` text, + `banner` text, + `fanart` text, + `insertdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '', + PRIMARY KEY (`intid`), + KEY `director` (`director`), + KEY `title` (`title`) +) ENGINE=MyISAM AUTO_INCREMENT=9077 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videometadatacast` +-- + +DROP TABLE IF EXISTS `videometadatacast`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videometadatacast` ( + `idvideo` int(10) unsigned NOT NULL, + `idcast` int(10) unsigned NOT NULL, + UNIQUE KEY `idvideo` (`idvideo`,`idcast`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videometadatacountry` +-- + +DROP TABLE IF EXISTS `videometadatacountry`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videometadatacountry` ( + `idvideo` int(10) unsigned NOT NULL DEFAULT '0', + `idcountry` int(10) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `idvideo_2` (`idvideo`,`idcountry`), + KEY `idvideo` (`idvideo`), + KEY `idcountry` (`idcountry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videometadatagenre` +-- + +DROP TABLE IF EXISTS `videometadatagenre`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videometadatagenre` ( + `idvideo` int(10) unsigned NOT NULL DEFAULT '0', + `idgenre` int(10) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `idvideo_2` (`idvideo`,`idgenre`), + KEY `idvideo` (`idvideo`), + KEY `idgenre` (`idgenre`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videopart` +-- + +DROP TABLE IF EXISTS `videopart`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videopart` ( + `fileid` bigint(20) unsigned NOT NULL, + `videoid` int(10) unsigned NOT NULL, + `order` smallint(5) unsigned NOT NULL DEFAULT '1', + PRIMARY KEY (`videoid`,`order`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videopathinfo` +-- + +DROP TABLE IF EXISTS `videopathinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videopathinfo` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `path` text, + `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '', + `collectionref` int(10) DEFAULT '0', + `recurse` tinyint(1) DEFAULT '0', + PRIMARY KEY (`intid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videosource` +-- + +DROP TABLE IF EXISTS `videosource`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videosource` ( + `sourceid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL DEFAULT '', + `xmltvgrabber` varchar(128) DEFAULT NULL, + `userid` varchar(128) NOT NULL DEFAULT '', + `freqtable` varchar(16) NOT NULL DEFAULT 'default', + `lineupid` varchar(64) DEFAULT NULL, + `password` varchar(64) DEFAULT NULL, + `useeit` smallint(6) NOT NULL DEFAULT '0', + `configpath` varchar(4096) DEFAULT NULL, + `dvb_nit_id` int(6) DEFAULT '-1', + PRIMARY KEY (`sourceid`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `videotypes` +-- + +DROP TABLE IF EXISTS `videotypes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videotypes` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `extension` varchar(128) NOT NULL, + `playcommand` varchar(255) NOT NULL, + `f_ignore` tinyint(1) DEFAULT NULL, + `use_default` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`intid`) +) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2015-12-21 16:03:27 diff --git a/mythfs/unittests/mockDefs.cpp b/mythfs/unittests/mockDefs.cpp new file mode 100644 index 0000000..389ca3f --- /dev/null +++ b/mythfs/unittests/mockDefs.cpp @@ -0,0 +1,16 @@ +#include "mockDefs.h" +#include <definedDirs.h> + +Service::Service() : + MySQL::Mock("mythconverg", { + rootDir / "fixtures" / "schema.sql", + rootDir / "fixtures" / "data.sql" + }) +{ +} + +TestClient::TestClient() : + s(NetFS::ServicePrx::checkedCast(ic->stringToProxy("service:tcp -p 9002"))) +{ +} + diff --git a/mythfs/unittests/mockDefs.h b/mythfs/unittests/mockDefs.h new file mode 100644 index 0000000..05884c5 --- /dev/null +++ b/mythfs/unittests/mockDefs.h @@ -0,0 +1,24 @@ +#ifndef MOCKDEFS_H +#define MOCKDEFS_H + +#include <mock.h> +#include <visibility.h> +#include <dryice.h> +#include <service.h> + +class DLL_PUBLIC Service : public IceTray::DryIce, MySQL::Mock { + public: + Service(); +}; + +class DLL_PUBLIC TestClient : public IceTray::DryIceClient { + public: + TestClient(); + + NetFS::ServicePrx s; +}; + +#endif + + + diff --git a/mythfs/unittests/testMain.cpp b/mythfs/unittests/testMain.cpp new file mode 100644 index 0000000..067596f --- /dev/null +++ b/mythfs/unittests/testMain.cpp @@ -0,0 +1,33 @@ +#define BOOST_TEST_MODULE TestInit +#include <boost/test/unit_test.hpp> +#include <dlfcn.h> +#include <Ice/Ice.h> +#include <IceBox/IceBox.h> +#include <service.h> +#include "mockDefs.h" + +BOOST_GLOBAL_FIXTURE(Service); + +BOOST_FIXTURE_TEST_SUITE(tc, TestClient); + +BOOST_AUTO_TEST_CASE( init ) +{ + BOOST_REQUIRE(s); + s->ice_ping(); +} + +BOOST_AUTO_TEST_CASE( badVolume ) +{ + BOOST_REQUIRE_THROW(s->connect("bad", std::string()), Ice::ObjectNotExistException); +} + +BOOST_AUTO_TEST_CASE( recordingsVolume ) +{ + auto rv = s->connect("recordings", std::string()); + BOOST_REQUIRE(rv); + rv->ice_ping(); + rv->disconnect(); +} + +BOOST_AUTO_TEST_SUITE_END(); + |