A Bag of Random Menus

From time to time we receive requests that are easy to implement but don’t really fit in with the programs because they seem very specific to one user’s needs.

But maybe we’re wrong to think that others wouldn’t enjoy these little fixes too. So I have started a new plugin that is a repository of several commands created for specific users to share them with all. You can install the plugin automatically by clicking here or download it and double-click to install. The installer is specific to DVDpedia, but the plugin will work in the other programs as well. Just download the file and change the ending from “.pediaextra_d” to “.pediaextra_b” (Bookpedia), “.pediaextra_c” (CDpedia) or “.pediaextra_g” (Gamepedia) and double-click the file to install.

The plugin is called Title Case after the command that initially started it all and the commands will appear under the menu Movie (Book, Album, Game) > Fixes / Links as well as in the contextual menu for an entry.

Title Case: Will replace the current title on the selection with the properly capitalized version based on the John Gruber algorithm. I used the Objective-C port kindly created by Marshall Elfstrand (I couldn’t resist a website with such a great name).

Languages and Subtitles Alphabetically: Places the languages and subtitles in DVDpedia in alphabetical order.

Fix Spaces: Turns dashes into spaces and removes double spaces from the title.

Duration to Hours: Changes duration from 123 to 2:03.

Rename Linked File to Title: Updates the name of the linked file to reflect the title. So a file called AAA-1023.mp4 linked to a DVDpedia entry Star Wars: Episode III -Revenge of the Sith will become Star Wars: Episode III -Revenge of the Sith

Show in Finder: Reveals the linked file in a Finder window.

Create Cover from File: Replaces the cover image with a screen grab 10 seconds into the linked film.

The source code is clean and if you’re looking to add a new command to the Pedias this might be the plugin to start from as it will facilitate a lot of the boiler code by simply copy pasting one of the existing menu commands.

It might also be useful to rebuild the plugin if you find yourself using a command frequently as this would allow you to add a keyboard shortcut to the command. For example to make command-shift-L the keyboard shortcut you would add:

[renameFile setKeyEquivalent:@"L"];
[renameFile setKeyEquivalentModifierMask:NSCommandKeyMask];

Currently the source code is available as a zip format, in the future it will be up on a version control system so that we can all update it. In the meantime do send any useful improvements for inclusion.

Update: New menu command under Links that creates cover images from linked files that QuickTime can understand. This new command make the plugin 10.7+ only as it requires the AVFoundation.framework included in Lion.

Tags: ,

3 Responses to “A Bag of Random Menus”

  1. Kozo Says:

    thank you so much for these new commands. they are very useful.

  2. sjk Says:

    Nice! Wish I had “Rename Linked File to Title” and “Show in Finder” a few months ago but I’ll still make use of them, and maybe “Duration to Hours”, in the future.

    Btw, in the “Rename Linked File to Title” example the renamed file probably becomes “Star Wars- Episode III -Revenge of the Sith.mp4” because I think the ‘:’ (colon) character is changed to a ‘-‘ (hyphen). I wouldn’t mind if the Name field (under the Links tab of an entry’s Edit… window) was also renamed to the title. And (untested) it might only rename the first of multiple links for an entry because (tested) “Show in Finder” works that way. Multi-link handling entry would be ideal, if possible.

    Thanks for this much so far!

  3. Nora Says:

    The plugin has been updated with the changes. anybody using the plugin should download it again.