Bookmarks in WMC

A place for App developers to hang out / post
Post Reply
th3luk3st3r

Posts: 24
Joined: Fri Jun 12, 2020 11:23 am
Location:

HTPC Specs: Show details

Bookmarks in WMC

#1

Post by th3luk3st3r » Mon Jan 25, 2021 4:31 am

For a while now I've been creating a tool to synchronise recording resume positions across multiple WMC machines (I have 4 WMC machines all sharing TV across the network and wanted to be able to pause a programme in one room and then resume in another, much like extenders offer). For the life of me, I couldn't figure out how to access the recording resume bookmark location, and it stumped me for weeks! I finally found it though and thought I should add it here for posterity's sake! :D

WMC stores the resume location within a "Bookmark" object, directly linked to the "Recording" object (within mcepg.dll). There are two methods exposed to the user, those being GetBookmark and SetBookmark. The bookmark methods only require a name string to retrieve the bookmart, with the exception of SetBookmark which requires a TimeSpan object representing the point-in-time to resume.

My struggle was trying to figure out the 'name' of the resume bookmark. I tried heaps of variations, from 'resume' to 'lastplayed' and nothing worked. Eventually with the discovery of .Net Reflector I was able to use the debug tool and discover the proper name! While it seems that there is a 'RESUME' bookmark name, it's not populated and gives back an empty time. The correct name is actually "MCE_shell", and when the GetBookmark method is provided with this name it returns the actual resume time.

Just throwing this on here for anyone else who may in the future need a nudge in the right direction ;)

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#2

Post by Space » Mon Jan 25, 2021 7:05 am

Pretty cool, I guess this means you can have multiple bookmarks for the same recording? Is this stored in the WMC database or in the video file itself?

th3luk3st3r

Posts: 24
Joined: Fri Jun 12, 2020 11:23 am
Location:

HTPC Specs: Show details

#3

Post by th3luk3st3r » Tue Jan 26, 2021 4:53 am

Space wrote: Mon Jan 25, 2021 7:05 am Pretty cool, I guess this means you can have multiple bookmarks for the same recording? Is this stored in the WMC database or in the video file itself?
It appears that you can have multiple bookmarks, though WMC only seems to care about the one (but I guess that opens the possibility for a plugin of some sort for manual bookmarking). They're stored in the WMC database (which explains why they don't roam between machines), and though I don't have a Ceton extender, there are also a heap of "CETON" marked bookmarks in mine, likely added by Ceton MMC in preparation for a Ceton extender perhaps? :)

Post Reply