Database: Refactor MP1 database for multi seat usage (1 Viewer)

Anthony Vaughan

MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    If necessary, I can make Jira, branch for PullRequest, and after merge, make test build ...
    Obviously, I don't know you handle to different sources that come to you.

    I have placed a zip file in the first post of this thread which can be used to install the refactor over the existing 1.29 release so that you can have a play with it.

    I have also created a list of files that I have changed to create this refactor and I also have a complete build that I can make available.

    I can provide whichever suits you best or all of them.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    To integrate the changes into the main branch, we need the source code on GitHub. Then we can push the changes into the release. The file list will not help much, because someone has to make all the changes, but except for the author, it is unlikely that anyone can do this without errors.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,974
    1,854
    Southampton
    Home Country
    United Kingdom United Kingdom
    I have placed a zip file in the first post of this thread which can be used to install the refactor over the existing 1.29 release so that you can have a play with it.
    I have just had a quick look at the BAT file, and I think that it won't work for people who are running a 32-bit version of Windows -- the "Program Files" folder has the wrong name. I think that it should be:
    • "C:\Program Files" on 32-bit Windows
    • "C:\Program File (x86)" on 64-bit Windows
    Using 32-bit Windows may not be as rare as one might think -- I myself moved from 32-bit Windows 7 to 64-bit Windows 7 only at the start of 2019 (I installed more RAM, going from 3 GB to 7 GB).

    Looking at the environment variables in Windows 10, it appears that the variable %ProgramFiles% probably has the required value. It is:
    • "C:\Program Files (x86)" on 64-bit Windows 10
    • "C:\Program Files" on 32-bit Windows (probably -- I cannot check at the moment).
    -- from CyberSimian in the UK
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    I have just had a quick look at the BAT file, and I think that it won't work for people who are running a 32-bit version of Windows -- the "Program Files" folder has the wrong name. I think that it should be:
    • "C:\Program Files" on 32-bit Windows
    • "C:\Program File (x86)" on 64-bit Windows
    Thank you for pointing that out. Sadly, for 64 bit machines this is not so simple because %ProgramFiles% points to C:\Program Files\.

    For the moment, as this is just a temporary test so that you can be certain that you want to go with this refactoring, can you just make the change in the bat file appropriate for your operating system :) ?

    The bat file is just a stopgap to get you going quickly.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    A single movie can consist of multiple DVDs, Blu-Rays, or files. Therefore, a mechanism for processing such information is made. There is only one movie in the database, but the file table contains all its files from 1 to H. And MP1 counts the duration and other data for these files. At the beginning of viewing there is a choice from which part to watch, etc.
    Many people use this, and it cannot be broken. You can experiment yourself by making 2 files for the movie.
    Certainly, if you can explain to me what to do. I really need to work with an example so I can test that everything is working properly but I don't do anything like that and don't know how to proceed.

    Also, it strikes me that it might be a good idea to add a column to the movie table, isStacked, so that the system knows for sure that a movie is stacked and knows not to delete the main record when someone deletes the main file from disk.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Looking at the environment variables in Windows 10, it appears that the variable %ProgramFiles% probably has the required value. It is:
    • "C:\Program Files (x86)" on 64-bit Windows 10
    • "C:\Program Files" on 32-bit Windows (probably -- I cannot check at the moment).
    AJS has sent me code to do what you want so I've changed the batch file.

    It's version 003. Would you please give that a go and let me know if that fixes the issue?

    Thanks.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    To integrate the changes into the main branch, we need the source code on GitHub. Then we can push the changes into the release. The file list will not help much, because someone has to make all the changes, but except for the author, it is unlikely that anyone can do this without errors.
    Sorry. I should have been more clear.

    I can send you the full solution or I can send you only the files I have changed (meaning that you can load them over an existing 1.29 solution - MediaPortal-1-master1.29 - safely). That's how I upgraded my stuff when I upgraded my stuff to 1.29 from 1.28 - I copied my changes over the full 1.29 GitHub release.

    There are so many changes in my code, throughout so many projects, that it may be safer to only send you the changed files - including the app.config, csprog and package files for the projects with changes in them.

    Anyway, I'll do whichever work best for you.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,656
    3,123
    Nuenen
    Home Country
    Netherlands Netherlands
    I think it's easiest if you just push your changes to your fork of mediaportal.
    That way everybody can easily see all the changes and optionally comment on that, and eventually merge it into master
    Too bad you didn't do this earlier because the only option right now is probably one large commit instead of a more granular itemized set of commits.
     

    Users who are viewing this thread

    Top Bottom