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

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,900
    10,935
    Kyiv
    Home Country
    Ukraine Ukraine

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    Hmmm... MP1 has never deleted database movie records, or any images, for me. I'm just installing MP1 in the standard way: i.e. without making any changes to anything else.

    I was expecting that deletion of movie records and related images would have been the standard behavior. I'm making sure, in the code I'm working on, that MP1 will do that. I'll also make sure it handles Fanart data and images as well.

    All is going really well. I've quite a bit of testing to do and will start to look at extensions shortly.

    Tony
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,900
    10,935
    Kyiv
    Home Country
    Ukraine Ukraine
    MP1 has never deleted database movie records, or any images, for me
    For me always delete movie record with all data and pictures like Cover, Internal fanart and separate files like external audio, subtitles etc...
    I'm just installing MP1 in the standard way: i.e. without making any changes to anything else.
    The some ...
    I was expecting that deletion of movie records and related images would have been the standard behavior. I'm making sure, in the code I'm working on, that MP1 will do that.
    This is already there, what MP1 loads, it also deletes. All that loads a third-party plugin, it does not remove ...
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    What I mean by 'the standard way' is that I am not using any extension bar the LAV filters. I am also using the central configuration (MediaPortalDirs.xml) so that all of my clients are getting their configurations from the same place.

    When I delete a movie using MP1, the movie file is deleted but the associated data and images have never been deleted as well.

    I am wondering whether experts in MP don't encounter the issues I experience because they know the workarounds :) .

    BTW, I have been using my central database system as a production system for over six weeks and have experienced no locking issues whatever (so far). I am also attempting to get MP1 to do everything that I've mentioned doesn't work (for me) to work straight out of the box.

    For example, I find that times watched didn't seem to be incremented each time a video is watched - now it is.

    I've recompiled the FanartHandler against the new setup and it is working seamlessly. I will need to move onto the other extensions to ensure that they all work as well.

    Tony
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,900
    10,935
    Kyiv
    Home Country
    Ukraine Ukraine
    When I delete a movie using MP1, the movie file is deleted but the associated data and images have never been deleted as well.
    I have and always have deleted, if I delete a movie from MP1, both in file mode and in database mode...
    I am wondering whether experts in MP don't encounter the issues I experience because they know the workarounds :) .
    No workarounds, everything is normal.
    For example, I find that times watched didn't seem to be incremented each time a video is watched - now it is.
    The viewing time shows the viewing progress, why increase it more than the duration of the movie?
    I've recompiled the FanartHandler against the new setup and it is working seamlessly. I will need to move onto the other extensions to ensure that they all work as well.
    Are the movie scans going well? Is updating the movie database the same way?
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    Well, all I can say is that those things aren't working for me.

    When I am talking about times watched, I am talking about the number of times a video has been watched; i.e. the timeswatched field. Isn't this the number of times a video has been watched? I am not talking about the duration of a movie.

    To me, the way this should work is that the times watched should be incremented each time someone watches the video, whether partly or all the way through. This gets reset to zero when the reset option is selected. For me, in version 1.29, the times watched field is never incremented.

    When I recompile the FanartHandler against the new setup, it works as normal. I assume that this will be the procedure for the other extensions.

    Tony
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,900
    10,935
    Kyiv
    Home Country
    Ukraine Ukraine
    To me, the way this should work is that the times watched should be incremented each time someone watches the video, whether partly or all the way through. This gets reset to zero when the reset option is selected. For me, in version 1.29, the times watched field is never incremented.
    You have to be careful with this too, because the status of the viewed movie can be compared to 1, i.e. if the status == 1, the movie is viewed, otherwise not ... It is necessary to analyze code of MP1 and plugins. :)
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    I understand that.

    There is a bool field called 'watched' that indicates whether or not the video has been watched.

    The 'timeswatched' field indicates how many times the video has been watched. There is also a field that holds the percentage of the video that has been watched.

    These are three different fields and I am treating them separately.

    To my mind, the current release, and all previous versions, have never handled 'timeswatched' correctly.

    I believe that the way I am doing it in my code is what anyone using MP would expect:
    a) Someone watches a video > watched set to true, times watched set to 1, percentage set to the ((duration / stoptime) * 100);
    b) Someone continues to watch the video later > times watched = 2, percentage reset;
    c) Any further viewings increment timeswatched and set the percentage.

    Is this not what you think should happen?

    Tony

    Correction: percentage should be ((stoptime / duration) * 100);
     
    Last edited:

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,900
    10,935
    Kyiv
    Home Country
    Ukraine Ukraine
    Someone watches a video > watched set to true, times watched set to 1, percentage set to the ((duration / stoptime) * 100);
    This does not make sense to me, we have a setting when to count video watched, and by default it is either 80% or 90%
    - Someone watched video > watched set to true only after 80% of film watched (from settings), times the some, percentage - Ok!
    Someone continues to watch the video later > times watched = 2, percentage reset;
    The some way, increase values only after 80% (from setting) watched...
     

    Users who are viewing this thread

    Top Bottom