Modify Database Location (1 Viewer)

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
Well, you have to think about what are the options. Assuming SQLLite does not allow for concurrent acess, the only other option seem to be "real" database servers such as mySQL/msSQL. It is really a strech to ask users to install such a system for a simple plugin.

Hi,

Just throwing this out there but you could switch to System.Data.SQLite (http://sqlite.phxsoftware.com)
It has better .Net support and is under active development.
Also is should not have problems with concurrent access (provided each creates their own connection).
It is also a drop in replacement for the sqlite dll and has support for triggers and parameterized queries.


HTH,
patrick
 

NickName

MP Donator
  • Premium Supporter
  • June 23, 2006
    359
    12
    Gold Coast
    Home Country
    This may help you all.
    I had Windows decide to corrupt it's partition (during school holidays!) taking my MP off air for a day whilst I did a complete rebuild of XP, MP etc...
    Needless to say WAF & KAF (kid appreciation factor) reached an all time low... :-(

    I now use Linux to manage my boot partition (Grub boot loader). When the PC boots, I choose either linux (MythTV is a work in progress), or I choose XP. When I choose the XP option I am then offered 2 different XPs to run. Both XPs are identical except on different physical drives. They both run MediaPortal and both use the one version of the TV database. Please understand, they both have there own TV database but I keep them synched through a script.
    The script runs when the PC boots (but before MP starts), it checks if the TV Database on the other drive is newer, and if so, copies it over the current drives copy. That way my future recordings always happen and my TV recordings are always accessible in either copy of MP.
    NOTE: My recordings, DVDs, etc. are stored on a seperate raid array.

    You may say 'running two XPs and two MPs is a pain'. Well yes and no. If XP corrupts a drive again, I just boot the other XP. My aim is have MythTV or LinuxMCE as a third option.
    I really, really, really need to have TV, DVDs, etc. available regardless of an OS chucking it in as my wife is starting to say "Can't we just a have a TV, set top box and DVD player"... sigh...

    Anyway, you guys could just copy over the TV database as I have and if you map the remote recordings drive to the same drive letter locally then your copied TV database would be correct too! NOTE: you may need to map the drive on EVERY boot (use a script) as MP doesn't work well with mapped drives otherwise.

    hope that all helps,

    Nick Name
     

    cool3r

    Portal Member
    September 21, 2006
    14
    0
    Home Country
    Slovakia Slovakia
    Hello all.

    Is there any progress with this issue? I'm using MyTV-Series on 3 different HTPC in my house using the same storage, so some king of client/server workaround will be more than appreciated. I'd try to do something myself, but it really isn't my area.

    BTW, this plug-in is really great, thank you all for your work so far.
     

    gamejester

    Retired Team Member
  • Premium Supporter
  • May 13, 2007
    418
    37
    Home Country
    United Kingdom United Kingdom
    Having multiple MP clients and 1 TV engine server (that also holds all the tv series episodes) I am also looking for a solution here.

    My goals are:

    1. central source for database and episode imgaes/banners/etc...
    I think a properly indexed SQL db on the tv engine server could be a good option here, but for speed of loading images I would expect them to be pulled from a local disc and mirrored to each machine. If you could specify the location of the banners then that gives people the option to either store local (and mirror) for speed or store on a central server using UNC to save disk space.

    2. watched TV episodes. I would like this information stored in a seperate db or xml file with a configurable location. I could then have 3 of the clients maintain their own list of which shows have been watched and another 2 clients point to a shared UNC location (say kitchen and lounge) reflecting the same viewing.


    The size of my TV database makes some of the views unusable. The machines are all good cor2duo based, but when switching from All list to Recent takes a good few seconds. I suspect a properly indexed SQL instance would sort this out.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    The size of my TV database makes some of the views unusable. The machines are all good cor2duo based, but when switching from All list to Recent takes a good few seconds. I suspect a properly indexed SQL instance would sort this out.

    Your the first person that I hear this from, you must have a really large collection because for me with about (I think) 1000 eps its almost instant. Maybe 0.5 s delay going to latest view.

    But you can do indizes in sqllite also, doesn't require mssql or mysql. I might try this to see if it speeds things up.

    Regarding, the db sharing, as I said I'll make it an option after the (next) stable build is out (should be really soon). BUT I cannot really test this myself and I almost expect it to not work properly. We'll just have to try.

    If it doesn't work, then the only option is to build a second db layer into it to allow the plugin to use mysql or mssql. I'm sorry, but I won't do it, so unless somebody volunteers it's not going to happen anytime soon. I just don't have the time, and frankly the motivation to do something I expect only a very small percentage of people, me excluding, would use. It's open source, so any coders get the source and start building!

    Inker
     

    seven5

    Portal Pro
    April 23, 2007
    72
    0
    45
    gamejester, great suggestions.. i agree with all of them and would love to see this.

    Inker, i have the same issue, going between all the views are fine, but once i hit LATEST, it stutters for probably at lease 1.5 seconds.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    @inker, i have the same issue, going between all the views are fine, but once i hit LATEST, it stutters for probably at lease 1.5 seconds.

    Are both of you using Logos? I've just done some profiling and I really don't think its because of SQL. I tried with and withou an index on the firstaired field and the time difference was really neglitatable (sometimes without an index was even faster...go figure). I think the reason might be logos.

    For me SQL took 240ms, logo engine took 400 ms and getting the series name extra (technical reason because latest is a flat view so hierarchy up elements arent in memory and have to be loaded, same reason logo building took so long in this view) took 120 ms. That adds up to about .75 secs or so.

    Now I just introduced some more aggresive caching for the logo engine, which on first view causes the logo time to drop to about half, and on further views (until a database update occurs such as an online refresh) down to below 40 ms. So total time for me is now about .5 secs for first view, and about .3 secs for views after that.

    After I cleaned up the debug msg and profiling code I'll update a new svn tomorrow. If you guys could try that and tell me if it improved things.

    Thnx
     

    gamejester

    Retired Team Member
  • Premium Supporter
  • May 13, 2007
    418
    37
    Home Country
    United Kingdom United Kingdom
    Ok I will give it a go and yes my TV series valt is vast, collection over about 8 years requires about 3tb of storage!

    I use all the bells and whistles, spinsafe revolve skin with glass icons and shadows with muliple logos defined for everything possible, TV stations, size, codec, etc...

    What is your feeling about splitting the viewed info into a seperate db or xml file for those of us that what that additional flexibility?

    Will be happy to test moving of db to central network and concurrent access thing as well. I guess with this configuration it would be best to have only 1 master media portal box do the on-line update and folder watching, so there is only 1 write source, the others just read. I guess the viewed info is the only other thing written to the db, but if we extract that out then I dont see any other contention issues.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Ok, regarding performance, please try with todays build. If you notice no real improvement it'll need to wait until after the stable release (and I'll need a copy of your database because mine just doesn't have enough items to troubleshoot against).

    Inker
     

    gamejester

    Retired Team Member
  • Premium Supporter
  • May 13, 2007
    418
    37
    Home Country
    United Kingdom United Kingdom
    Great, that made a difference for me.
    I can now switch the latest view and it is practically instant.
    Thanks.
     

    Users who are viewing this thread

    Top Bottom