Wednesday, November 11, 2009
Monday, September 14, 2009
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
For All Users setting you will need to run the application with administrative rights.
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
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.
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.
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.
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 RenameYammm 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?
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
- 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
- Required .NET Fx 3.5 SP1
- Rename and image overwrite is disabled by default.
- Requires admin rights to the movie folders and admin rights to run Yammm Config.
- Currently only detects movies (TV series is in testing
- Currently only supports a single rename format: "Title (Year) [Tags]
- Run the Yammm Config application to Add\Remove Watched Folders
- 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, ...
- 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")
Thursday, April 9, 2009
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?
// 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 ) )
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;