Win "TV Shows" item keeps dropping off the Home Window!
#1
Sad 
I am using the latest released (not nightly) XBMC on Win7. Skin is Confluence. My media is on a Windows Home Server. Both machines are asleep most of the time. When I wake the Win7\XBMC machine via remote control, it wakes up the WHS machine via the LightOut WHS client add-in installed on the XBMC machine. The XBMC scans the WHS for new media, does a 'cleanonupdate', then I start using it.

Because the media is not there until the WHS wakes up, XBMC will often get into a non-responsive state if I leave it up all the time (through sleep\resume cycles). As a result I have devised a method that kills XBMC on PC sleep, and starts XBMC on PC wake.

This is all really just background provided as it might be contributing to the real problem: the "TV Shows" item keeps dropping off the Home Window! Sometimes when I turn on the XBMC the TV Shows item is just gone. I can go into Videos and it is still added there, but its content type is not set. To restore it to the Home Window I have to set the content type to TV Shows and do a full scan again (which takes ~40 minutes) and then it shows up on Home Window... until the next time it drops. Music and Movies have never shown this issue - only TV Shows.

No debug log yet - will provide if you think it'll be helpful. I can't really repro at will, so it's hard to capture. I guess I can just turn it on and let it log until it happens again.

Thoughts?


Reply
#2
If you do a clean on update while a network share is "off" it will clean all "missing" items from the DB. With no items in your DB, the TVShows menu item is no longer available.

I have created some special builds that enable a WOA (wake on access) support with a patch from T4_Ravenbird. These build will send a WOL packet to a sleeping server to wake it before running an update or playing media. It will also wake a server that hosts a mySQL db if you use one of those.
Reply
#3
Hunh, that could explain it, but I also have it "Update library on startup", which runs for quite a while (1 min sometimes) *before* the cleanup. I like your idea, but am not sure that's it. I'll try delay-starting XBMC to make sure the WHS back-end is up before XBMC starts and the update\cleanup runs.

Any other thoughts?
Reply
#4
XBMC will do an update and skip over the "missing" shares, then clean the files out of the DB for the "missing" shares. This clean can take a while if there are a lot of missing items. I can be almost 100% positive that is what is happening to you. The TVShows menu item only disappears from the menu when there are not items in the Video DB that are Tv shows or you turn it off in the skin settings.
Reply
#5
OK, makes sense. Given that, why does this not happen to the Movies item too?
Reply
#6
That I am not sure, because if they are on the same server it should happen as well, unless the server makes it online before all the movie items are scanned and cleaned.
Reply
#7
Yeah, maybe that's it. Delay-start should prove\disprove your theory (not that I doubt you). :-)

Thanks very much. I'll loop back with results for community benefit.
Reply
#8
Your log would also tell you what is going on Wink
Reply
#9
Actually, I am thinking about this comment of yours a bit more:

"The TVShows menu item only disappears from the menu when there are not items in the Video DB that are Tv shows or you turn it off in the skin settings."

In my problem, the TV Shows item is *still* in the videos section - it's just that its "This directory contains" content type has been set to NONE somehow. Would the DB cleanup be doing that (changing that setting) when it sees the missing share?
Reply
#10
(2012-10-18, 17:24)UberNewf Wrote: ...the "TV Shows" item keeps dropping off the Home Window! Sometimes when I turn on the XBMC the TV Shows item is just gone....
This is the result of what I stated earlier. The content of your sources does not matter. It only matter if there are TVshows in the database or not. You will still see your source listed in videos/files.

The fact that your source is being set to none is odd. If you set it to none manually, it will ask if you want to remove all those items from the database. It sounds as if this is somehow happening automatically. Running a cleanup should not do this. I run manual cleanups a lot and this does not happen.



Reply
#11
So far - so good. The C# app I wrote to hook into Windows PowerModeChangedEventHandler(OnPowerModeChanged) seems to be doing the trick. It kills XBMC on PC sleep (not as gracefully as I'd like, but still - see this thread) and delay-starts XBMC on PC wake (30 seconds - more than enough time for the media-holding WHS to wake up). So far the TV Shows item remains. :-)
Reply
#12
Why not just send XBMC the quit command? You should be able to send it through JSON. XBMC also has a built in parameter to delay its startup.
Reply
#13
Because I didn't know about them. :-) My startup tosses up a nice big window with a countdown so the wife knows what's going on, so while the -d is just as good functionally, it doesn't have the WAF I need. On the QUIT though, that's a nicer way for sure. I've never done any JSON so I'll need to research how to accomplish that suggestion... as long as there's no delay. I don't want it to do any "are you sure?" BS when I am sleeping the PC - I want XBMC shut down without delay, not matter what it's doing. clsProcess.Kill(); certainly does that.
Reply
#14
Quit should do that. If you send that built in command from an addon, There is no delay. It just quits. The only delay may be XBMC finishing up any task it may have been running.
Reply
#15
Unless I am doing something wrong the performance of this QUIT call via JSON is not great. I used the code from the .Net JSON-RPC Client Generator and when I am playing an MP3 with visualization (for example), it takes 19 seconds for XBMC to exit. That's awful. I hope I'm doing it wrong. Seems like a huge set of libraries and code just to call var quitXBMC = await xbmc.Application.Quit(); from a C# app.
Reply

Logout Mark Read Team Forum Stats Members Help
"TV Shows" item keeps dropping off the Home Window!0