Saturday, February 21, 2009

MediaBrowser / VideoBrowser Hack for Multiple Entry Points

If you would like to have multiple entry points for Media Browser, each with a different starting folder, here are two methods to do it. Please read both carefully first and decide which one is better for you.

GOOD HACK

With the good hack, you will be able to do updates to media browser while keeping the hack. This is actually the "correct" way to hack open source code and if you have some experience in programming and a little patience, you will even be able to implement your own hacks!

All the instructions should be followed in a Windows Vista machine.

You will need to download:


1. Once you have installed Visual C# and TortoiseSVN, go to a directory where you will be keeping your code. Normally, it is User_Name\Documents\Visual Studio 8. Right click anywhere in the folder (but not over an icon) and the context menu for TortoiseSVN should be there



Select "SVN Checkout..." and fill out the window that pops up like this




Click "OK" and "Yes" to the question box that pops up. Then a new window will pop that shows what files of the source code are being downloaded. When it finishes the download, click OK. Now you have a working directory of the videobrowser source code that can be patched and updated.

2. Apply the patch that I provided and you already downloaded, right click on the videobrowser folder and select "TortoiseSVN"->"Apply Patch...".



Select the patch you downloaded and in the window that follows, right click and select the "Patch All" command as shown bellow.



3. Now you now need to compile the code. Double click on the videobrowser\MediaBrowser.sln file. This will open the project in Visual C#. Then open the Configuration Manager window by selecting the menu "Build"->"Configuration Manager...". In the window that appears, set the options as shown.



And build the project by selecting the menu "Build"->"Build MediaBrowser". This will create the file videobrowser\MediaBrowser\obj\Release\MediaBrowser.dll.

4. Finally, follow the steps for the easy hack, but substitute the dll file I provide, with the one you just created.

EASY HACK

The easy way to implement this hack consists of you just installing my own hacked version of the compiled media browser. The disadvantage of this is that you won't be able to update media browser without eliminating the hack, but you won't need to install as much extra software.

You will need to download:

  • MediaBrowser.dll. If you followed the "Good Hack" instructions, use your own MediaBrowser.dll instead.
  • My hacked Registration.xml file (look for it at the end of the post).
1. In order to work with the GAC directly (something that is not recommended by Microsoft), you will need to change the permissions in the "Assembly" directory. I am not responsible for any damages that you may cause to your computer as a result of following these instructions, so you do it at your own risk. To change the permissions, run the following in a command line window (Open the start menu, and in the Start Search text field, type cmd and press Enter)

icacls c:\windows\assembly /grant your_username:F /T /C

replace your_user name with your actual windows vista user name, which should have administrator privileges.

2. Go to the folder where the MediaBrowser.dll file is in windows explorer and leave it open. In another explorer window, go to C:\Windows\assembly and drag and drop the MediaBrowser.dll into the assembly folder. This will replace the MediaBrowser.dll that is currently installed.

3. Configure Media Browser to work with this hack. Open MediaBrowser and go to the options page. Change Initial Location from "MyVideos" (or whatever you had before) to "MultipleEntrypoints" (exactly, without the quotes). Also make sure that you uncheck "Automatic Updates" and "Beta Updates". Otherwise, the hack will be eliminated the next time MediaBrowser updates itself.



4. Edit Register.xml according to your needs. These are the fields that you should change:

title="browse movies" <- this is the name that the entry point will have in the menus

description
="Browse your media" <- small description for entry point

context
="C:\Users\Pako\Movies" <-IMPORTANT: This is the folder that this entry point will open. It can also be a virtual folder or a link. If it just says CONFIG, then the configuration page will be opened through this entry point. I highly recommend that you leave at least one entry point with the CONFIG context. Otherwise, you won't be able to change the configuration after this hack is enabled.

ImageUrl=".\Application.png" <-If you are good as graphics, you can change this for your own, just make sure that it has the exact same dimensions. This is the image that the entry point will display while selected in the vmc menu.

inactiveImageURL=".\ApplicationInactive.png" <- this image will be displayed while unselected.
If you decide to add more entry points that the ones I included with the Registration.xml file, make sure that you also increase by one, so the id of the entry point that you add after the last, would be .
5. To install Register.xml, open a command line window, cd to the the folder where you downloaded the Registration.xml file (type cd C:\path\to\folder) and run:


C:\Windows\ehome\registermceapp.exe Registration.xml


This will put 4 new entry points in vista media center (or more or less, depending on how you edited the Registration.xml file) which you can see either using MenuMender or in the vmc program library under tv+movies. You can now use menu mender to put them wherever you please.

And that's it. If you have questions, let me know. I might have skipped a step or two that I forgot or something. Just try to be as detailed as possible with your descriptions of the issues.

2 comments:

  1. Hi,

    I tried this hack with mb version 2.0.11.0 running windows 7. It did create one extra entry point under the extras tab and left the original shortcut. Could you tell me what to do to make this hack work with the setup i have? Moving the enty points from the extra library is an another problem to solve, maybe with the instructions on Hack7mc.com.

    Thanx inadvance

    Marc

    ReplyDelete
  2. Could you please post your patch and registration.xml in another site since savefile.com isn't working right now.


    Thanks

    Nabil

    ReplyDelete