Wednesday, November 11, 2009

New Site

Just FYI, I really haven't posted much or kept up with updates. Going forward all my projects and updates will be available at www.mikinho.com

Monday, September 14, 2009

W7ToggleDisplay

This is a quick cmd line app for toggling between monitors.

Download: http://www.mikinho.com/wmc/toggle-display/W7ToggleDisplay.exe

Per request of a tgb member, see http://thegreenbutton.com/forums/p/78513/389041.aspx, I wrote this as a quick method of toggling display outputs.

It uses the new W7 APIs and works like below:

1- If multiple active (extended or clone) displays are found it will disable all but the highest ranked

2- If a single active display is found it will disable it and enable the next inactive display.

Hope it helps. If it does and you'll like more options please let me know and I'll add switches.

Friday, May 22, 2009

Hide Media Center Menu Strips

A while ago I posted a blog about hiding Media Center Menu Stripes using registry keys. I've had more questions on this and its compatibility with MC7 lately so I went ahead and made a helper app for hiding the menu strips. This does NOT do any resource editing, it is registry based only.

For All Users setting you will need to run the application with administrative rights.

Download: http://www.mikinho.com/wmc/menustrips/HideMediaCenterStrips.exe



Note: In WM7 you can use the native interface for adding or removing custom start menu tiles.

For VMC you can do it via registry keys or use Advent's MC Menu Mender. MC Menu Mender is a resource editor and has many options for customizing VMC but is not MC7 compatible yet.

Tuesday, May 12, 2009

Yammm - Yet Another Media Meta Manager

Yet Another Media Meta Manager (Yammm)

YammmSetup.msi

Not that we need another meta manager but none of the ones available that I've tried (quite a few) really suited my needs so I developed Yet Another Media Meta Manager (Yammm). Please leave feedback and\or feature requests.

Yammm runs as a Windows Service and will download meta data, artwork, rename folders, rename files and\or create playlists. Metadata can be any combination of dvdid.xml, mymovies.xml and\or XBMC nfo file. All meta information and artwork is provided via either themoviedb.org or thetvdb.com. If you haven't checked them out please do so and contribute where possible.

I created Yammm because I haven't used any meta manager that runs "headless" without ANY user interaction and used folder.jpg instead of custom artwork locations. This is important to me as I use various htpc software depending on the situation and development. I also found that most did not match well. Yammm uses various checks other than the provider's score value.

Movie Posters

Yammm can optionally resize movie posters. This was added per request to help reduce lag opening your Movie Library. My recommended size is Medium with a quality of 92. The visual different between 100 and 92 is minimal but the file size is significant. You can play with different resolutions to see what you find is acceptable. As long as you have Yammm create a backup of the original (enabled by default) it will not have to redownload the artwork if you choose to increase or decrease the image size as it will use the original image for resizing.

Folder Structure

Yammm currently only looks as movie folders (TV support is currently being tested). This means as a folder is checked the name will be used for matching. A folder name is broken into three parts. The title, year and "tags". i.e. For "Cidade de Deus (2002) [City of God] [Director's Cut]" the year is 2002, the tags are City of God and Director's Cut and the title is "Cidade de Deus". Yammm will ignore any tags when searching for a matching movie but will preserve them when renaming the folder.

Folder Rename

Yammm will optionally rename matching movie folders to "Title (Year) [Tags]". If the movie is a foreign film Yammm will also attempt to append the local title as a tag. i.e. "City of God" will be renamed to "Cidade de Deus (2002) [City of God]".

File Rename

Yammm determines the "primary" movie in a folder by grouping similar named files togethor. The largest combined size is considered the primary movie. This is to prevent trailers and samples files from being touch.

If it a single file then it renames it to "Title (Year)". If there are multiple files then they are renamed to "Title (Year) [# of ##]". All associated files are also renamed.

To give an example:

Seven Swords (2005) [1 of 2].avi
Seven Swords (2005) [1 of 2].idx
Seven Swords (2005) [1 of 2].sub
Seven Swords (2005) [2 of 2].avi
Seven Swords (2005) [2 of 2].idx
Seven Swords (2005) [2 of 2].sub
Seven Swords (2005).dvdid.xml
Seven Swords (2005).wvx

The files were renamed and the playlist created for it. Thoughts?

Playlist Create

Yammm will optionally create playlists for movies spanning over several files. It can also optionally hide the actual files so only the playlist is shown and not the individual files.

Media Center DVD ID Metadata

If enabled Yammm can create dvdid.xml files for matching movies. When possible it will use the real ID (CRC64) otherwise it will create one. When enabled you must specifiy which accounts to create the corresponding cache files. This allows you to keep your HTPC and media center extenders Movie Library metadata in sync. If present Windows 7 (RC1) Movie Library will display the metadata as well.












In the works....

The below items are currently being tested

  • Renaming files Done
  • TV Series support
  • Custom folder\file renames
  • Media Center plugin (MCML) for selecting artwork
  • Better DVR-MS support, it will check DVR-MS for meta data prior to checking provider
  • Optional embed metadata into artwork and\or dvr-mr
  • Option to add a layer on the top of artwork before saving

Note:

  1. Required .NET Fx 3.5 SP1
  2. Rename and image overwrite is disabled by default.
  3. Requires admin rights to the movie folders and admin rights to run Yammm Config.
  4. Currently only detects movies (TV series is in testing
  5. Currently only supports a single rename format: "Title (Year) [Tags]
  6. Run the Yammm Config application to Add\Remove Watched Folders
  7. Meta XML files will not be overwritten, I will update soon with an option to update missing information for existing meta files (i.e. dvdid.xml, mymovies.xml, ...
  8. I purposely did not include a way to manually edit the meta data. Please help the community and contribute to The Movie DB.

If you currently have all your movies in a single file you can use the below command to create a subfolder for each movie and move the file into it.

FOR %i IN (*.*) DO (IF NOT EXIST "%~ni" MD "%~ni") & (MOVE "%i" "%~ni")

Mikinhosoft

Thursday, April 9, 2009

Detect if the current session is a media extender session from unmanaged code.

I never remember I have a blog...so I thought I'd post some code I helped a tgb member with. The question was "Is there a way for my C++ app to detect if current session is an extender session?". From managed code or host apps this is straight forward using the SDK however I did not know how to do it from unmanaged code. Here is what I came up with (Note: I only spent ~30 minutes on this in between other projects.) Does anyone know of a better way?


BOOL IsMediaCenterExtender()

{

 // Note: GetSystemMetrics is not needed; however, I believe it is faster than WTSQuerySessionInformation. If your primary usage will be via RDP consider removing

if ( !GetSystemMetrics( SM_REMOTESESSION ) )

return FALSE;
BOOL mcx = FALSE;

 LPTSTR pData = NULL;

DWORD bytesReturned = 0;
// Note: Either link wtsapi32.lib or dynamically load wtsapi32.dll w/ LoadLibrary

if ( WTSQuerySessionInformation( WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSWinStationName, &pData, &bytesReturned ) && ( 6 * sizeof( TCHAR ) < bytesReturned ) && ( 0 == _tcsncmp( _T( "EH-Tcp" ), pData, 6 ) ) )

{

mcx = TRUE;

}
WTSFreeMemory(pData);
return mcx;

}

Thursday, July 31, 2008

Media Center Launcher

I know there are various utilities to launch PowerDVD from Media Center; however, none of them quite did what I wanted so I wrote my own.

Media Center Launcher has three primary functions:

  1. It can launch any application from within Media Center

  2. It will monitor when the application exits and will restore Media Center to it's previous state

  3. It will monitor for the BACK remote command and will close the application if pressed



The application it launches is configurable via the ini file. By default it will run PowerDVD. Edit the INI file if you want it to open another application.

I've created a simple installer for it. It will register the application to be run when a Blu-ray or HD DVD is inserted and be listed under the Program Library. I noticed that I forgot to remove the dependency on .NET Framework 3.5 for the setup application, sorry.

Saturday, July 19, 2008

Registry Based Vista MCE Start Menu Customization

Below are the registry keys. You can also download the registry file (Save As) with the same information to make it easier. Things to note:

  1. With the exception of HideTV, change the value of OnStartMenu to False to remove the ENTIRE strip.

  2. Change the value of HideTV to 1 to remove TV related tiles.

  3. When removing the Online Services tile you lose the ability to access your program library. For me this isn't an issue as I've written all my own plug-ins that I place on custom strips.

  4. I do not know what functions two of the values hide. I'm assuming they are for Discovery Packages (i.e. MCESpotlight\Sports Strip) that are either not available in my region or reserved for OEM. More than likely the later as there are two tiles reserved for OEM Discovery Packages.

  5. The values below are per user. You can change them to be Local Machine if you want everyone to have the same start menu. I use it at the Per User level so I can customize the "kid's extender" to have different settings than my extender. To configure your extender accounts you can import the settings into their registry branch by loading their registry file or what I do is use command prompt through an extender to import it.

  6. You must restart Media Center for the changes to apply.

  7. At least one default strip must be visible. Setting all OnStartMenu values to False will crash Media Center (Microsoft, care to fix this?).

  8. I've collected all this information myself, afaik except for LiveTV it is not published anywhere else.




Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{2f72fb52-e1c4-46a5-be32-54205db0ffc4}]
"OnStartMenu"="True"
@="Music"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{47ecf759-4ec8-4b10-ae36-d262fee6fa04}]
"OnStartMenu"="True"
@="Sports"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{49f9b475-6d2c-4f27-9bbd-120b942d89d8}]
"OnStartMenu"="True"
@="Pictures + Videos"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{a8add452-1d1a-4775-acf2-565796306789}]
"OnStartMenu"="True"
@="Online Media"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{cde6651e-56e3-48a0-bdca-9a3151f0e67c}]
"OnStartMenu"="True"
@="Tasks"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{d30ea221-143f-47b7-9123-983d6813a759}]
"OnStartMenu"="True"
@="Unknown #1"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{dde82191-ea23-4606-9d63-b92c809c31bb}]
"OnStartMenu"="True"
@="TV + Movies"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\Internal\{f646f46d-cb98-4a32-bded-23c64a586b66}]
"OnStartMenu"="True"
@="Unknown #2"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Start Menu]
"HideTV"=dword:00000000