PDA

View Full Version : Definable filetype actions [WINDOWS] [LINUX?]


digitalhigh
2009-01-26, 16:16
I did a lot of poking around in the Wiki, Trac, and here on the forums. Searching for "file types" "filetypes", "extension handling", "extensions", "custom extensions" and varying combinations of these phrases yielded nothing useful in regards to the subject.

So, I hope that I'm not asking a question that's already been asked several times over.

I've been watching the discussions regarding the Video Game Library, Launcher Plugin, and externalplayer patch for a while now, and it seems to me that all three of these are approaching a similar subject in similar ways. The treatment of files in ways that XBMC isn't natively set up to support.

I already use the Launcher Plugin as a means to run all of my emulators, and this works well 99% of the time after I figured out how to get PJ64 working without errors.

Similarily, I just started messing with the externalplayer plugin, which is a fairly reasonable workaround for playing .264 content.

The problem with externalplayer is that it's either all-or-nothing, and that there's no way to tell it to only open .mkv's with the external link. The context menu isn't bad, but ideally, XBMC should just know.

Same goes for the launcher plugin. There, you have a great way of associating it with games, but like Gamester has pointed out, not the greatest library support, nor is it really for the novice user.

So what would be really nice would be a way to address all of these issues with one solution. My initial thought would be to just have an xml file where you could define a file extension, a program to handle that extension, and then some other flags to pass information to XBMC or the external program.

A tag as I pictured it in my head would look something like this:


<extensionhandlers>
<extension>
<type>.MKV</type>
<desc>Matroska Video</desc>
<sections>Videos</sections>
<launcherpath>"C:\MPCHC\MPC.exe"</launcherpath>
<launcherargs>"/fullscreen"<launcherargs>
<library>VideoDB</library>
<wait>TRUE</wait>
</extension>
<extension>
<type>.Z64</type>
<desc>Nintendo 64 ROM</desc>
<sections>Games, Arcade</sections>
<launcherpath>"C:\EMULATION\PJ64\Project64.exe"</launcherpath>
<launcherargs></launcherargs>
<library>Games</library>
<wait>TRUE</wait>
</extension>
</extensionhandlers>



The stuff is pretty self-explanitory. Adding a library flag to tell it which library to scan the information into. I don't know how this would work with the .mkv as it's already recognized by XBMC, especially since all of this is just a hypothetical.

And obviously, the idea is not just to enable games and movies, but whatever the user wants to add. HTML files to be launched by Firefox. Tell it to open my XML files with my default editor so I don't have to go do it on another computer. Open .pdf's with whatever.

Basically, make it so XBMC is as close to a full shell program as possible.

And I believe that with the xml setup, it would be fairly flexible for other OS's. Include a set of default emulators for an OS and one XML file to tell XBMC how to treat the related filetypes.

I dunno. Hopefully I'm not asking for something that's already implemented or in the works as I have a tendency of doing. :O