Modify Database Location (1 Viewer)

gamejester

Retired Team Member
  • Premium Supporter
  • May 13, 2007
    418
    37
    Home Country
    United Kingdom United Kingdom
    As for database location I had another thought whilst trying some sutff on the weekend. Basically I want to have a master MP install that I controls all the download of program info and does the scanning, etc...
    I then use some scripts to mirror this info out to the other MP machines; this seems as good a solution as a central DB for Tvseries info + adds a bit of DR :)

    My problem here is that all the info for the plugin is stored in the same database (correct me if I am wrong). What would like to see is:

    1. A TVSeriesConfig.xml file locally on each machine that holds all the plugin setting, ie, lanuage, auto scan folder, down settings, etc....

    2. A TVSeries database that holds just info that has been collected from a scan, ie, episde guides, file location, file tyrpe, etc... all the stuff ont he first screen.

    3. A TVwatched.xml or DB. This holds a flag to say if a show has been viewed. Maybe you could do this by replacing the watched field in the current DB to a link to a new db that just has a primary key index based on the show unique key and a watched field (don't know how this will effect speed).

    Waht this will give is:

    TVSeriesConfig.xml = NOT copied around. Left unique on each machine.

    TVSeries.db = COPIED from Master to all slaves using a directory watcher for file change, or view a scedulled task every x minutes.

    TVwatched.xml = Conditionally copied. So mayeb the Lounge, kitchen and Master bedroom are kept in sync. but the other bedrooms have a unique watched file.

    Disk space is not an issue on the local machines, but speed is, so maybe this posses a simpler soltution than trying to do a central DB solution.
     

    gamejester

    Retired Team Member
  • Premium Supporter
  • May 13, 2007
    418
    37
    Home Country
    United Kingdom United Kingdom
    Another thought on the watched info.
    What I really want to achieve here is each user having their own set of watched info.

    So perhaps a better way to achieve this is having a concept of users within either media portal or this series plugin; then when you start watching on any TV you simply switch it to your user mode. This could be done with the MCE replacement plugin using a key assigned to a SetUserMethod that also switched the keymappings for that user (as this pops up a brief overlay on the screen which you could name after the user).

    Then the tvseries plugin could write user watched data to the DB and filter on this.
     

    captainspanky

    Portal Pro
    December 8, 2005
    51
    0
    Just added a 2nd computer to my house running MP and finding not having the viewed information consistent to be an annoyance. Having read the thread it seems there's no simple solution code wise. Wish I could program so I could try to take a look.

    I'll have a go at setting something up to copy the db file around. If I get something half sensible figured out I'll post a procedure back here.
     

    captainspanky

    Portal Pro
    December 8, 2005
    51
    0
    Fooled around with directory backup programs and have been unable to get something going that works nicely. I guess there might be something out there, but its beyond my level of attention to figure it out.

    Makes having 2 computers a real annoyance.
     

    randell

    Portal Member
    February 27, 2007
    19
    6
    Ft Worth, Texas
    Home Country
    United States of America United States of America
    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

    Sorry for dragging up this thread, but I've recently discovered this plugin and combined with FanArt and the XFace skin and I absolutely love it.

    I need to look more at the code this evening, but I may (note, I'm not certain) volunteer to abstract the data access into more of a provider type implementation which would allow us to have a .dll that implements SQLite and another that implements MSSQL (and if someone wanted, they could do a MYSQL).

    In my mind, I'm thinking a set of base classes that define the object and provide methods that each implementation would override to actually load the data into and out of the data store. Via a config file entry, would you be able to specify which .dll you want.

    Maybe we can exchange some email and I could provide a skeleton of what I'm thinking and if you approve, I'll go ahead and do it. Not to sound like an *ss, but I don't really want to spend a lot of time writing something that won't be added. (I'd prefer to use the same code everyone else is using, that way when a bug is fixed, I don't have to try and merge the fix in the "special" version I'm running.)

    Thoughts?
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    I've just started trying to get this up and running and noticed that I can specify the database location in the configuration dialog, but it doesn't "stick". I enter in \\path\path\path\TVSeriesDatabase4.db3, hit the "X" button to close (which stresses me each time because standard Windows behaviour it that this will lose all changes made, but there's no "OK" button so what choice do I have?:confused: )
    When I re-enter the importer, it takes several extra seconds as if it's reading the database from my server location, but then shows 0 series/episodes/seasons, and the path has reverted to c:\program files\etc....

    I know there's more fundamental issues with this but I just wanted to add my voice. I have 103 series, 800 seasons, and 6228 episodes on my server. So using a high school database from 1960 that doesn't handle concurrent locking is really going to kill MP's future. It's great to see that's there's a growing realisation that things need to get a bit more 21st century and hopefully things will migrate to a better database system.

    I'm happy to be a tester/guinea pig/debugger which may be appealing because of my large-ish system. I have several database systems installed or nearby.

    Cheers

    Dir
     

    Zasurus

    Portal Pro
    November 14, 2006
    79
    2
    42
    Home Country
    United Kingdom United Kingdom
    I need to look more at the code this evening, but I may (note, I'm not certain) volunteer to abstract the data access into more of a provider type implementation which would allow us to have a .dll that implements SQLite and another that implements MSSQL (and if someone wanted, they could do a MYSQL).

    In my mind, I'm thinking a set of base classes that define the object and provide methods that each implementation would override to actually load the data into and out of the data store. Via a config file entry, would you be able to specify which .dll you want.

    Maybe we can exchange some email and I could provide a skeleton of what I'm thinking and if you approve, I'll go ahead and do it. Not to sound like an *ss, but I don't really want to spend a lot of time writing something that won't be added. (I'd prefer to use the same code everyone else is using, that way when a bug is fixed, I don't have to try and merge the fix in the "special" version I'm running.)

    Thoughts?

    I am writing a quick vb.net app to monitor and download new eppisodes for the shows I specify but would love to be able to have access the tv series db to see if I already have the episodes etc but can't currently due to the db not allowing both programmes to access the db at once.

    SO... I am very interested in this... also I wanted to move an old PC into another room and set it up with TV Series but no good if its going to be out of date...

    Any luck on this? :D
     

    Users who are viewing this thread

    Top Bottom