Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Movie Repo question
#1
My system has over 1000 movies in the movie repo, and I am adding movies frequently. I am using the My Movies driver to get the repo populated, and after I add movies I always refresh the database.
There are three computers in the loop here. A PC running as the CQC server, a client PC running My Movies, and a Windows tablet client.
I have noticed a strange behavior. Often after several database refreshes the artwork is messed up on the tablet. Some movies have the wrong cover art as I browse my collection, but have the proper cover art when I select the title. Others have the wrong cover art in both places.
If I quit and restart the tablet, everything works fine and all the correct artwork is in the correct places.
Would executing a database refresh I sometimes hit the command button more than once. Could it be that this somehow confuses CQC since it is already in the process of refreshing the database when I send a command to do it again?
Or could it be something else?
Thx
Reply
#2
In theory it could I guess. When the clients see that the repo has changed, they will start a download. The metadata should never be a problem since it's in memory and they download it as a single chunk. But, once they start downloading images, if the repo started another download, it could in theory be changing the images while the client is downloading. Still a chunk of each images is hashed and used to uniquely identify the images, so even then it shouldn't cause too much of a problem.

Given that it only happens on the tablet, perhaps it's going to sleep while the download is happening and only gets partially updated sometimes? I guess the client service (which does the download) could force it to stay awake until the download completes.

Could you try it a few times, being sure to start a single load, and making sure the tablet stays awake for a couple minutes until the download completes (you can watch the log monitor to see the client service saying it's reloading the data for a repo and when it's completed), that it comes out ok?

If that's it, I guess the client service could force the tablet to stay awake long enough to complete the download or something.
Dean Roddey
Explorans limites defectum
Reply
#3
The tablet isn't going to sleep during the process, so we can eliminate that as an issue. I'll do some experiments. Hopefully I can make the symptom happen without having to add new movies since that doesn't happen very often.
I have a feeling this will be a tough one to replicate reliably.
Thanks
Mike
Reply
#4
At least try to insure that, if you start it once, that the issues doesn't happen. Maybe use one of the other machines to reliably start the reload, and watch the tablet to see if it's completed it's update, then see if you see a problem.

If not, then purposefully try to start a second reload, as soon as you see the client service on the tablet say it's starting a download.

The repo driver definitely won't let you start more than one load at a time, or should not. If you try to do that, you should see a message logged from the repo driver saying it's already doing a load.
Dean Roddey
Explorans limites defectum
Reply
#5
OK, more media repo questions.

First, I am getting a different result in two places with what appear to me to be identical Media Repo Text Widgets. I am trying to display the movie title.
In the DefaultCABLayout I have a Media Repo Image, using MediaRepo and CoverArt (Small), and a Media Repo Text Widget, using MediaRepo and Title. What I get is just the movie title. For example, "MadMax"
In the movie description popup I have a Media Repo Image, using MediaRepo and CoverArt (Large), and a Media Repo Text Widget, using MediaRepo and Title, What I get is both the movie title and the movie name. For example, "Mad Max - Disk1: Blu Ray". There are a bunch of other Media Repo Text Widgets that work fine in this popup.
What I want in both cases is just the title, in this case, "Mad Max".
Is it possible to do this? The only difference I can see in the two cases is the size of the cover art selected, but I set both to small cover art I get the same result.

Second, I am having trouble setting up boolean GVar:3D that is true if 3D is in the title of the movie, and false if not. I am trying to use the Find command to achieve this. Here is the command I am trying to execute, which is obviously wrong, but I can't figure out why.

GlobalVars::SetVariable(GVar:3D,Find(MediaRepo:Title,GVar:3DIndex,3D,))

Help on these would be appreciated.
Thanks
Mike
Reply
#6
The difference in the repo text widget is that it's not really a repo text widget when it's used in the layout template. Those are just providing information that the browser uses to display the data, and it's apparently doing it differently in some cases than the actual repo text widget I guess. I'll look at this tomorrow, my brain is too fried tonight.

On the other thing, I'm not completely sure what you are doing there. Where is the Find() command coming from? If it's the one on the variables target, then what it does is return a true/false value, so you'd do something like this if you want to find the value 3D in something, and set the variable accordingly.

Code:
If GlobalVars::Find([tosearch], GVar:3DIndex, 3D, False)
    GlobalVars::SetVariable(GVar:3D, True);
Else
   GlobalVars::SetVariable(GVar:3D, False);
EndIf

Where [tosearch] is the value to search. I'm not sure where you are getting the value to search. Is this being run in the context of an OnSelect in the CAB or something? If so, you'd pass in the value of the title runtime value, otherwise we'd have to figure out what it is you want to search.
Dean Roddey
Explorans limites defectum
Reply
#7
No rush. Go to bed.

I am trying to display in a Variable Boolean Text button the text "Yes" if GVal:3D is true and "No" if false. However, I always am getting a false return to the If/Else Find test shown below.

In OnLoad (Also tried doing it in On PreLoad, with same result), I am using

BrowseTitle::GetText(GVar:MovieTitle)

This seems to work properly.

I then test for the embedded text "3D" in GVar:MovieTitle using

If GlobalVariables::Find(GVar:MovieTitle,GVar:MovieTitleIndex,3D,False)
And then finish the If/Else exactly as you describe.
I have also tried using the value of GVar:MovieTitle in sourceval for the Find function instead of the variable name. Same result.

Let me know your thoughts.
Thx.
Reply
#8
So you would replace [tosearch] in my example above with %(GVar:MovieTitle), which would search the value contained in the movie title variable. You'd likely want to put that in the OnLoad, not OnPreload.

Of course, if this is a static thing, i.e. you just want to display it in this popup and it won't change until you close the popup and display it again later, you could just use a static text, and just set the text in the OnLoad, based on the result of the above search. That would be lower overhead.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SSL Certificate Question gReatAutomation 1 947 10-26-2020, 07:48 AM
Last Post: gReatAutomation
  V2 Question - OpenWeatherMap Using their New JSON Data Feed kblagron 7 2,116 05-07-2020, 01:40 PM
Last Post: Dean Roddey
  Dynamic Overlay Question bryanb 4 1,362 04-17-2020, 03:48 AM
Last Post: bryanb
  Triggered Event on Timer Question znelbok 7 3,411 12-09-2019, 02:10 PM
Last Post: znelbok
  Question on CQC Driver Pack Install kblagron 1 1,301 11-26-2019, 06:38 PM
Last Post: Dean Roddey
  SONOS Driver Question gReatAutomation 13 5,661 08-23-2019, 12:37 PM
Last Post: Dean Roddey
  Insteon V2 Driver Question kblagron 1 1,268 08-01-2019, 10:51 AM
Last Post: kblagron
  Question on Parsing a String in a CML Macro kblagron 2 1,632 06-18-2019, 06:21 PM
Last Post: Dean Roddey
  ELK M1 Client Interface question lleo 1 1,329 06-12-2019, 08:15 AM
Last Post: Dean Roddey
  Question on Socket Error kblagron 4 2,257 04-07-2019, 09:19 PM
Last Post: kblagron

Forum Jump:


Users browsing this thread: 1 Guest(s)