--
-- Host: localhost    Database: vinhostm_vide129
-- ------------------------------------------------------


--
-- Table structure for table `vid_actors`
--

CREATE TABLE `vid_actors` (
  `name` varchar(255) NOT NULL,
  `actorid` varchar(15) NOT NULL DEFAULT '',
  `imgurl` varchar(255) NOT NULL DEFAULT '',
  `checked` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`name`),
  KEY `actorid` (`actorid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_actors`
--


--
-- Table structure for table `vid_cache`
--

CREATE TABLE `vid_cache` (
  `tag` varchar(45) NOT NULL,
  `value` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`tag`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_cache`
--


--
-- Table structure for table `vid_config`
--

CREATE TABLE `vid_config` (
  `opt` varchar(50) NOT NULL,
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`opt`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_config`
--

INSERT INTO `vid_config` (`opt`, `value`) VALUES ('language','en'),('mediadefault','4'),('langdefault','english'),('filterdefault','unseen'),('IMDBage','432000'),('thumbnail','1'),('castcolumns','4'),('template','modern::compact'),('languageflags','german::spanish::english::french'),('adultgenres','20'),('engineamazonaws','1'),('engineyoutube','1'),('imdbBrowser','1'),('actorpics','1'),('listcolumns','2'),('enginedefault','imdb'),('engineimdb','1'),('engineamazon','1'),('enginetvtome','1'),('enginegoogle','1'),('guestid','10000'),('adminid','1'),('denyguest','1'),('dbversion','36'),('multiuser','1');

--
-- Table structure for table `vid_genres`
--

CREATE TABLE `vid_genres` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_genres`
--

INSERT INTO `vid_genres` (`id`, `name`) VALUES (1,'Action'),(2,'Adventure'),(3,'Animation'),(4,'Comedy'),(5,'Crime'),(6,'Documentary'),(7,'Drama'),(8,'Family'),(9,'Fantasy'),(10,'Film-Noir'),(11,'Horror'),(12,'Musical'),(13,'Mystery'),(14,'Romance'),(15,'Sci-Fi'),(16,'Short'),(17,'Thriller'),(18,'War'),(19,'Western'),(20,'Adult'),(21,'Music'),(22,'Biography'),(23,'History'),(24,'Sport');

--
-- Table structure for table `vid_lent`
--

CREATE TABLE `vid_lent` (
  `diskid` varchar(15) NOT NULL,
  `who` varchar(255) NOT NULL,
  `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`diskid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_lent`
--


--
-- Table structure for table `vid_mediatypes`
--

CREATE TABLE `vid_mediatypes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(15) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_mediatypes`
--

INSERT INTO `vid_mediatypes` (`id`, `name`) VALUES (1,'DVD'),(2,'SVCD'),(3,'VCD'),(4,'CD-R'),(5,'CD-RW'),(6,'VHS'),(7,'DVD-R'),(8,'DVD-RW'),(9,'DVD+R'),(10,'DVD+RW'),(11,'DVD-DL'),(12,'DVD+DL'),(13,'LaserDisc'),(14,'HDD'),(15,'HD-DVD'),(16,'Blu-ray'),(17,'AVCHD'),(18,'CD'),(50,'wanted');

--
-- Table structure for table `vid_permissions`
--

CREATE TABLE `vid_permissions` (
  `from_uid` int(11) NOT NULL,
  `to_uid` int(11) NOT NULL,
  `permissions` int(10) unsigned DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`from_uid`,`to_uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_permissions`
--


--
-- Table structure for table `vid_userconfig`
--

CREATE TABLE `vid_userconfig` (
  `user_id` int(11) NOT NULL DEFAULT '0',
  `opt` varchar(50) NOT NULL DEFAULT '',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`user_id`,`opt`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_userconfig`
--


--
-- Table structure for table `vid_userseen`
--

CREATE TABLE `vid_userseen` (
  `video_id` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`video_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_userseen`
--


--
-- Table structure for table `vid_videodata`
--

CREATE TABLE `vid_videodata` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `md5` varchar(32) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `subtitle` varchar(255) DEFAULT NULL,
  `language` varchar(255) DEFAULT NULL,
  `diskid` varchar(15) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `disklabel` varchar(32) DEFAULT NULL,
  `imdbID` varchar(30) DEFAULT NULL,
  `year` int(4) unsigned NOT NULL DEFAULT '0',
  `imgurl` varchar(255) DEFAULT NULL,
  `director` varchar(255) DEFAULT NULL,
  `actors` text,
  `runtime` int(10) unsigned DEFAULT NULL,
  `country` varchar(255) DEFAULT NULL,
  `plot` text,
  `rating` varchar(15) DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `filesize` bigint(20) unsigned DEFAULT NULL,
  `filedate` datetime DEFAULT NULL,
  `audio_codec` varchar(255) DEFAULT NULL,
  `video_codec` varchar(255) DEFAULT NULL,
  `video_width` int(10) unsigned DEFAULT NULL,
  `video_height` int(10) unsigned DEFAULT NULL,
  `istv` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `mediatype` int(10) unsigned NOT NULL DEFAULT '0',
  `custom1` varchar(255) DEFAULT NULL,
  `custom2` varchar(255) DEFAULT NULL,
  `custom3` varchar(255) DEFAULT NULL,
  `custom4` varchar(255) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `owner_id` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `title_idx` (`title`),
  KEY `diskid_idx` (`diskid`),
  KEY `mediatype` (`mediatype`,`istv`),
  FULLTEXT KEY `plot_idx` (`plot`),
  FULLTEXT KEY `actors_idx` (`actors`),
  FULLTEXT KEY `comment` (`comment`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_videodata`
--


--
-- Table structure for table `vid_videogenre`
--

CREATE TABLE `vid_videogenre` (
  `video_id` int(10) unsigned NOT NULL,
  `genre_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`video_id`,`genre_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vid_videogenre`
--


--
-- Dumping events for database 'vinhostm_vide129'
--

--
-- Dumping routines for database 'vinhostm_vide129'
--


