Watched flag

Home Forums HTPC Software Developers Corner Watched flag

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26678

    Hi, I have made signifigant progress with the UI portion of TvBrowser – MCML is actually not that bad once you get used to the layout options.  My question is now concerning how to mark the shows “watched” in my DB.  Obviously, this is simple when the show is played through my app.  Does anyone have an idea on how to flag shows watched through WMC, but not through my app.  I tried to create a background app and handle the Media Transport obejct’s Property Changed event, but i cant get that to work.  I seem to get a null reference on the Media Experience object always.  Does anyone know if this is possible, or if i am wasting my time? 

    #32569
    mikinho

    You have a few options, I don’t suggest the background add-in route though (the least efficient method).  If you do want to go w/ that you’ll need use reflection to reset the MediaTransport cache. I can give some sample code.  Another option is Media Sink…which also has a whole set of caveats but better than the background add-in.

    #32584
    Nmarconi

    Yeah, i figured as much.  I’m wondering how important it is anyway.  Im not going to be able to mark shows that are watched live either – so it’s probably just more important to make the manual process of “marking watched” as simple as possible.  Also, once i have a version closer to complete, i am probably going to put the project on google code – which should make getting help easier.

    #32596
    Nmarconi

    Michael,

    How would you recommend scanning directories for file changes?  Use the FileWatcher object in system.IO?  Or is that too expensive?  Im not sure what the buffer limitations translate to in real life with that object (i havent used it much).  Create my own scanner on a timer?

    #32597
    mikinho

    Generally you’d need more than one method. Below is what I use:

    1- At “start up” do a manual scan for changes. This is needed if you are monitoring network shares that may have been changed when you are offline

    2- Periodic scans similar to above. This is needed for SMB shares that do not support change notifications

    3- FileWatcher. Easy to use and if done properly low resources (easy to do improperly too)

    4- NTFS Journaling. Using the USN Journal is more efficient than FileWatcher but obviously only works on NTFS.

    I recommend at least 1-3 to start with.  Media Center itself uses a combination of 1-3 though it uses the Win32 API versus FileWatcher.

    #32598
    Nmarconi

    Excellent, i am using 1-3 currently (exactly as you outline).  I will look into NTFS Journaling.  Thanks for the help, let me know if i get annoying.

    #32599
    mikinho

    [quote=Nmarconi]

    Thanks for the help, let me know if i get annoying.

    [/quote]

    You are welcome. And don’t worry, I really enjoy giving feedback and am looking forward to seeing what you release.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.