MP 1.8, MyFilms 6.1, aMPed 3.6.2: MyFilms not updating data from movie catalog on resume

Discussion in 'My Films' started by tano_grasa, July 21, 2014.

  1. tano_grasa

    tano_grasa Portal Pro

    Joined:
    December 31, 2011
    Messages:
    107
    Likes Received:
    4
    Ratings:
    +10 / 0
    This is an old unsolved problem (see https://forum.team-mediaportal.com/threads/updating-custom-view-entries-strange-behaviour.121489/).
    In few words: I never shut down my HTPC, I hibernate it. On resume, MyFilms does not update data from the catalog (xml). I have to close Mediaportal and then reopen it in order to get new data shown. I had this problem for over a year with previous versions of MP and MF. Last saturday I made a clean install from scratch (I mean, I even formatted my HTPC). It has been working fine until yesterday, when the same problem popped up again.
    Yesterday I made two changes: I installed an antivirus program (NOD32) and I changed the color for watched movies as per Dadeo's instructions (https://forum.team-mediaportal.com/...d-3-6-2-changing-watched-movies-color.126884/). I uninstalled NOD32 to see what happens but it did not help. And I really don't think that changing the color of movies titles could be the problem.
    I have a Silverstone case with a Soundgraph minidisplay. The only way to prevent the minidisplay to light up again when the PC is hibernating (which it does randomly after minutes or hours) is by disabling two options in the Realtek network card: "Wake on Magic Packet" and "Wake on pattern match". I wonder if this could be the cause of the issue.
    I attach the complete logs.
    For a better understanding of the problem: I use a custom view called "Nuevas" (new movies) based on the MediaLabel field in AMC: for movies I haven't seen yet I write the word "nuovi" on the MediaLabel field. After watching the movie, I simply remove that word and the movie shows no more in the custom view "Nuevas". Today I created a new catalog entry called "dummy" and it did not show at first in the custom view "Nuevas". I had to restart MP to get the new entry shown. All this should be in the logs.
    I hope you guys can help me to definitely solve this issue.


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Guzzi
    • Premium Supporter

    Guzzi Retired Team Member

    Joined:
    August 20, 2007
    Messages:
    2,161
    Likes Received:
    704
    Ratings:
    +922 / 0
    First of all: I did my own test - and can confirm, that for whatever reason, MyFilms seems not to receive anymore the messages for standby/resume.
    Actually, MyFilms is designed to receive signaling for standby/resume and reload the catalog on resume.
    That is really strange, but interesting to find out what change happened.
    Skin changes for sure are independant. Not sure, if av intercepts anything like messages - but don't think so.
    No, this only affects if the pc will wake on those events and should not be related - but as MyFIlms listens to os powermanagement changes, revert the change and see, if that brings it back - just to be sure.
    I see a lot of errors in the logs about problems loading the database, which are hints about corruption or invalid xml format. Those are not directly related to the standby problem, but could cause other problems, so I would check the reason anyway.
    After looking in the code, I see, that the standby handler register in the activation phase - so any resume actions only work, if you ever had at least once entered MyFilms once (so the handlers are initialized). One test would then be to once enter MyFilms and do standby/resume after that and see, iof it works then as expected. You should find something like "PowerModeChanged() - MyFilms is resuming from standby" in the logs - which means MF has received the message and this will kick the reload.
    If you can confirm, this is working, then I think we have to move the powermanagement handlers to the init phase, as with introduction of precaching, MF indeed can miss DB updates with current approach.
     
  4. tano_grasa

    tano_grasa Portal Pro

    Joined:
    December 31, 2011
    Messages:
    107
    Likes Received:
    4
    Ratings:
    +10 / 0
    I made several attempts to find out a pattern in this strange behavior. It doesn't seem to be related with entering MyFilms or not but with the amount of time the HTPC has been hibernating. I tried the following schemes:
    1. Entering MyFilms, putting the HTPC on hibernate, then adding a new database entry or deleting an old one
    2. Not entering MyFilms, i.e. putting the HTPC on hibernate from the Home screen, then adding/deleting a database entry
    In both cases changes in the databse are shown in MF only if the HTPC has been hibernating for, say, not more than half an hour. When it has been hibernating for more time, MF won't reflect database changes, no matter from which screen I put the HTPC on hibernate. This is REALLY strange.
     
  5. tano_grasa

    tano_grasa Portal Pro

    Joined:
    December 31, 2011
    Messages:
    107
    Likes Received:
    4
    Ratings:
    +10 / 0
    Sorry, I forgot to say that the database resides on a server and I make changes on it from another PC.
     
  6. tano_grasa

    tano_grasa Portal Pro

    Joined:
    December 31, 2011
    Messages:
    107
    Likes Received:
    4
    Ratings:
    +10 / 0
    There is definitely no pattern for this behavior. Sometimes the handlers work as intended and views are updated on resume, but mostly they don't. Since I have two more problems with MyFilms, namely movie thumbs not always showing (see https://forum.team-mediaportal.com/...-thumbs-not-always-shown.126885/#post-1092532) and a limited fanart cycling in the main view (menu view) (see https://forum.team-mediaportal.com/...d-amped-fanarts-handling.126903/#post-1092531), and since I didn't see any more complaints of these kinds by users in the forums, I must conclude that all this is somehow related with my configuration. Now, as I stated in a previous post, my configuration is a brand new one, I made a clean install a few days ago, after formatting the HTPC. The only "old" piece in this configuration is the xml database, wich is several years old and went corrupted a few times in the past. So I suspect that all my problems with MyFilms could be related with this database.
    As Guzzi said after taking a look at my logs:


    So my question is, how can I repair my database? Is there any application which I could use? I really don't know where to start from.
     
    Last edited: July 24, 2014
  7. Guzzi
    • Premium Supporter

    Guzzi Retired Team Member

    Joined:
    August 20, 2007
    Messages:
    2,161
    Likes Received:
    704
    Ratings:
    +922 / 0
    There is two possible errors - one is a currupted file - if you open it with an xml editor, that should easily be visible; the other is invalid characters somewhere in value fields.
    However, the errors you had in the logs state it is at the very beginning of the loading. Try opening and saving e.g. in AMC4.1 or with an XML Editor.
    But you do have several other errors in the log file - e.g. regarding mini display, a GUIWindow dispose exception and a mixer exception - thus errors also can lead to code not being processed properly - maybe even the wakeup/sleep code.
    You could try disabling minidisplay and maybe other plugins and check, if that brings the sleep/wake to a more "consitant" state.
    Then readding one by one to get to the problem. Maybe using a test catalog with only 3 movies to make verification a bit easier.
    Beside that, I moved the powerevent handler to the Init() phase in MyFilms, so at least that issue should be fixed for the next version.
     
  8. tano_grasa

    tano_grasa Portal Pro

    Joined:
    December 31, 2011
    Messages:
    107
    Likes Received:
    4
    Ratings:
    +10 / 0
    Given that I still can't find the problem after doing a series of tests by disabling minidisplay, switching to a previous database version and hibernating my HTPC after entering MF, is there any way to somehow 'force' the handler to do his job on resume? Switching views does not work, I'm thinking of a way to 'reload' the plugin without having to close and reopen MP.
     
  9. Dadeo
    • Premium Supporter

    Dadeo Docs Group Manager

    Joined:
    November 26, 2006
    Messages:
    5,340
    Likes Received:
    2,802
    Location:
    Himalayas, India
    Ratings:
    +3,053 / 0
    Home Country:
    Canada Canada
    Show System Specs
    Did you try the test version Guzzi posted here that has the change mentioned above? You didn't mention if you had or not. (you must be logged into wiki to get it)

    The next thing I would try is what Guzzi suggested:
    Just use the Setup Wizard to create a new catalog and AMC Updater to import a few unwatched movies - easiest is to copy those to a Test folder. I know you said you created a dummy catalog at one point, maybe post the config xml - e.g. dummy.xml so we can see your settings or try to reproduce the issue?

    I'm curious, why don't you use MyFilms Update to auto update watched movies? You could select the Media Label field and value "nuovi" for unwatched and it should auto update it when movie is watched. If you import new movies via AMC Updater you can set it to auto enter "nuovi" in MediaLabel field handling.on the Database fields tab. That way you can use the Global Filter to display only unwatched movies in MyFilms.
     
    Last edited: July 28, 2014
  10. tano_grasa

    tano_grasa Portal Pro

    Joined:
    December 31, 2011
    Messages:
    107
    Likes Received:
    4
    Ratings:
    +10 / 0
    Hi Dadeo,

    yes, I tried the test version Guzzi posted, but to no avail. I don't use MF update to auto-update watched movies because I'm just used to manage new movies through my custom view. Anyway, your hint about AMCU brought me to a workaround which apparently solved the issue, for which I'm very grateful ;)
    Here is how I did it: I created an AMCU configuration in which just the field "MediaLabel" is scanned and updated. Then, after adding a new movie to my custom view for unwatched movies, or after removing a movie from that view, the next time a wake up my HTPC I perform a global DB update from within MP. And that does it: new movies appear in the custom view and watched movies disappear from it :)
    I know this is just a workaround and that the main issue remains unknown and unsolved. But since I'm apparently the only one who has this problem, I guess it has to do with my database or configuration or whatever.
     
    • Great Idea! Great Idea! x 1
  11. Dadeo
    • Premium Supporter

    Dadeo Docs Group Manager

    Joined:
    November 26, 2006
    Messages:
    5,340
    Likes Received:
    2,802
    Location:
    Himalayas, India
    Ratings:
    +3,053 / 0
    Home Country:
    Canada Canada
    Show System Specs
    Great you figured out a workaround! It's also useful info re the issue - because it sounds like manual updates to data don't take effect immediately, while global updates do (update and reload catalog). That was why I was asking about the auto update of watched status - because it updates and reloads your catalog.
    We were assuming the issue arises due to hibernation, however I think it may be related to how manually updating a field works. IIRC that is very 'old' code, whereas Guzzi has updated and improved a lot about global and watched status updates. There are a number of things in MyFIlms that cause it to update and reload catalog. So it is possible that in some cases (as you reported it worked sometimes) other actions, even in the background, take effect.

    BTW, if you don't want to run global update manually, you could also try the option to update a field when player finishes - set on Update tab.
    I'd be interested to know if my intuition is right and the issue only applies to manual update of field data - especially in your use case where database resides on a server and you make changes to it from another PC.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!