home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Movie Database workflow - suggestions for improval.
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="HappyTalk" data-source="post: 74206" data-attributes="member: 22671"><p>Hmmm looking into the database schema for the movie database some things don't make sense. </p><p></p><p>Why does the movie database have an idpath field, given that the file(s) location must be keyed off the files table that already has an idpath field. </p><p></p><p>Given that movieinfo is unique for each movie, why is that table not just merged with the movie table. </p><p></p><p>The movie table contains the discid used to prompt which dvd to insert BUT what if a movie is spread over 2 different disks, surely this field needs to be in the files table? (same problem issue for idpath)</p><p></p><p>It all looks over complex to me and certainly makes manual editing nigh on impossible. Personally I would have one main movie table with the movie/movieinfo fields merged. I would keep the files table containing full paths to the files with the discid field from the 'movie' table and the 'cdlabel' field from the 'path' table and drop the path table. The other tables all seem ok. </p><p></p><p>I originally moved all my movie info over from mythtv, so ensured it was all correct. Having subsequently imported new ones and edited a few others using the tool in MP configuration I realise it is now ending up a mess. </p><p></p><p>As I ONLY use the video DB for an offline DVD based movie library, I have created a simple SQL script to tidy things up and ensure database integrity so there is only one path entry per DVD that matches the movie.discid and each file contains the full path offset eg: </p><p>path.strPath='M:' </p><p>files.strFilename="\Simpsons\Simpsons.1x01.Pilot.avi' </p><p></p><p>If you wanna do similar BACKUP YOUR DATABASE FIRST!!!, then run this SQL query from a file. Change from M: to YOUR DVD drive letter in last statement + ensure that you have properly set the discid's in the movie table like DVD#001,DVD#002 etc...</p><p>[code]</p><p>UPDATE files</p><p>SET strFilename = (SELECT SUBSTR(path.strPath,3,999) from path where files.idPath = path.idPath) || files.strFilename;</p><p></p><p>UPDATE movie SET idPath = SUBSTR(discid,5,3);</p><p></p><p>UPDATE files SET idPath = (SELECT movie.idPath FROM movie WHERE files.idMovie = movie.idMovie);</p><p></p><p>UPDATE path SET strPath = 'M:', cdlabel = 'nolabel' || idPath;</p><p>[/code]</p><p>Remember this is intended only for a DVD based library.</p></blockquote><p></p>
[QUOTE="HappyTalk, post: 74206, member: 22671"] Hmmm looking into the database schema for the movie database some things don't make sense. Why does the movie database have an idpath field, given that the file(s) location must be keyed off the files table that already has an idpath field. Given that movieinfo is unique for each movie, why is that table not just merged with the movie table. The movie table contains the discid used to prompt which dvd to insert BUT what if a movie is spread over 2 different disks, surely this field needs to be in the files table? (same problem issue for idpath) It all looks over complex to me and certainly makes manual editing nigh on impossible. Personally I would have one main movie table with the movie/movieinfo fields merged. I would keep the files table containing full paths to the files with the discid field from the 'movie' table and the 'cdlabel' field from the 'path' table and drop the path table. The other tables all seem ok. I originally moved all my movie info over from mythtv, so ensured it was all correct. Having subsequently imported new ones and edited a few others using the tool in MP configuration I realise it is now ending up a mess. As I ONLY use the video DB for an offline DVD based movie library, I have created a simple SQL script to tidy things up and ensure database integrity so there is only one path entry per DVD that matches the movie.discid and each file contains the full path offset eg: path.strPath='M:' files.strFilename="\Simpsons\Simpsons.1x01.Pilot.avi' If you wanna do similar BACKUP YOUR DATABASE FIRST!!!, then run this SQL query from a file. Change from M: to YOUR DVD drive letter in last statement + ensure that you have properly set the discid's in the movie table like DVD#001,DVD#002 etc... [code] UPDATE files SET strFilename = (SELECT SUBSTR(path.strPath,3,999) from path where files.idPath = path.idPath) || files.strFilename; UPDATE movie SET idPath = SUBSTR(discid,5,3); UPDATE files SET idPath = (SELECT movie.idPath FROM movie WHERE files.idMovie = movie.idMovie); UPDATE path SET strPath = 'M:', cdlabel = 'nolabel' || idPath; [/code] Remember this is intended only for a DVD based library. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Movie Database workflow - suggestions for improval.
Contact us
RSS
Top
Bottom