grabberslasher Posted March 30, 2007 Share Posted March 30, 2007 Ok I've been working with the sample code released beforehand, and I created myself a little plugin that lists all my movies from my iMac's internal drive (where I store my movies) as I boot the AppleTV stuff from an external drive. It seems to work recursively, and the path is hardcoded, but have a go and try editing it. The plugin will show up as "File Browser" in the main menu, and has an icon ripped from Front Row. If you use and/or extend this code, please post here with anything you discover! The project folder must be in the same folder as BackRow and iPhotoAccess, so you can symlink them in if you like. samplecode.zip Link to comment Share on other sites More sharing options...
Alex76 Posted March 30, 2007 Share Posted March 30, 2007 Hi, It's possible to use this sample plugin to create QuitPlugin ? Like Killall ...... Link to comment Share on other sites More sharing options...
amok Posted March 30, 2007 Share Posted March 30, 2007 I've just built it and everything works fine, thanks a lot! "Amazing...!" Edit1: How can I change the "CFBundleName"-menu entry? Simply changing "${PRODUCT_NAME}"-string in info.plist to "My Local Films" doesn't work! Edit2: Ok, I've found a solution. Had to add a localization for my system language. I'm now figuring out how to change the order of menu items Link to comment Share on other sites More sharing options...
grabberslasher Posted March 30, 2007 Author Share Posted March 30, 2007 Well I've managed to add a menu item to quit the AppleTV shell, for those people who are running it as a standalone application and not as their Finder. All you do is paste the following bits of code between the comment block dividers into their stated places below: In FilezMenu.m: - (void)itemSelected:(long)fp8 { /* Add the following to top of said function */ if (fp8 == 0) { [[NSApplication sharedApplication] terminate:self]; return; } /* end of addition */ .... This will make the topmost item in the Files list quit the AppleTV UI when selected. Now to actually make said item say "shut down" or something: In TestMenuList.m: -(TestMenuList *)initWithScene:(id)scene { <... previous code here ...> // build objects id currentMenuItem; /* Reboot Option addition here, under currentMenuItem and before NSDirectoryEnumerator *movieDirectoryEnumerator ... etc */ [_fileListArray addObject:@" - Reboot Apple TV UI"]; currentMenuItem = [BRTextMenuItemLayer menuItemWithScene:_scene]; [currentMenuItem setTitle:@" - Reboot Apple TV UI"]; [_items addObject:currentMenuItem]; /* end of addition */ ... Link to comment Share on other sites More sharing options...
Alex76 Posted March 30, 2007 Share Posted March 30, 2007 Hi, i use mac at home. i my job is a developer " Windows " ... What i do download to compile the code attach ?? Link to comment Share on other sites More sharing options...
grabberslasher Posted March 30, 2007 Author Share Posted March 30, 2007 Hi, i use mac at home. i my job is a developer " Windows " ... What i do download to compile the code attach ?? You need to install Xcode from the discs that came with your Mac, or download it from developer.apple.com Link to comment Share on other sites More sharing options...
lessew Posted March 30, 2007 Share Posted March 30, 2007 Works like a beauty, except for the fact that my system resolution stays at 1280x800 when I exit, rather than returning to 1440x900 Link to comment Share on other sites More sharing options...
erica Posted March 30, 2007 Share Posted March 30, 2007 It works fine with m4v files, but when I try to play an AVI it crashes. I've installed perian into /Library/QuickTime and rebooted, but no luck. Link to comment Share on other sites More sharing options...
grabberslasher Posted March 30, 2007 Author Share Posted March 30, 2007 Interesting, it works for my avi files, half my collection is divx or xvid. Link to comment Share on other sites More sharing options...
Alex76 Posted March 30, 2007 Share Posted March 30, 2007 You need to install Xcode from the discs that came with your Mac, or download it from developer.apple.com Tnk's GREAT.. !! I mod the sample code.. Now i CAN quit from ATV with remote control. Byz Link to comment Share on other sites More sharing options...
ElBob Posted March 30, 2007 Share Posted March 30, 2007 Tnk's GREAT.. !!I mod the sample code.. Now i CAN quit from ATV with remote control. Byz Could you post your compiled version please? Link to comment Share on other sites More sharing options...
Alex76 Posted March 30, 2007 Share Posted March 30, 2007 Could you post your compiled version please? I have Tested on Apple Installer. 1. RightClick Appletv Application 2. dir Plugin Enter on frist voice and press Play to quit AppleTV_Closer.frappliance.zip Link to comment Share on other sites More sharing options...
ElBob Posted March 30, 2007 Share Posted March 30, 2007 Would you take mine? (Didn't test it, hope it works) Edit: Successfully tested, but perhaps partly german. Tell me, if I've to change the localization. Sweet dude, works like a charm. Link to comment Share on other sites More sharing options...
erica Posted March 30, 2007 Share Posted March 30, 2007 I'm going to keep trying with other media files (and I can't wait to try the closer app) BUT...my Apple TV reset itself (by itself, darn it) and is doing a factory update and I don't want to stop the thing while it's doing that. Just FYI I'm on an NTSC system and the item that was messing up playback was a PAL DIVX file (30 fps vs 29.97 fps). I'm not sure if that's what caused the crash problem. Or the factory reset problem. Or whether I just have earned the bad karma. Link to comment Share on other sites More sharing options...
Jlentz823 Posted March 30, 2007 Share Posted March 30, 2007 after i closed it it diable the keyboard link to volume. is there a quick plugin that would allow keyboard accsess. if there is anybody have a link Link to comment Share on other sites More sharing options...
ibcrootbeer Posted March 31, 2007 Share Posted March 31, 2007 The plugin will show up as "File Browser" in the main menu, and has an icon ripped from Front Row. If you use and/or extend this code, please post here with anything you discover! The project folder must be in the same folder as BackRow and iPhotoAccess, so you can symlink them in if you like. please excuse my ignorance, where exactly does the project folder "Sample Movie Lister" go? into "system/library/privateframeworks"? do i need to rename the project folder or no? (I have the ATV setup and running through the "new user" method found here: http://forum.insanelymac.com/index.php?showtopic=46680 ) Link to comment Share on other sites More sharing options...
grabberslasher Posted March 31, 2007 Author Share Posted March 31, 2007 please excuse my ignorance, where exactly does the project folder "Sample Movie Lister" go? into "system/library/privateframeworks"? do i need to rename the project folder or no? (I have the ATV setup and running through the "new user" method found here: http://forum.insanelymac.com/index.php?showtopic=46680 ) No the project folder includes an Xcode project which must be compiled. The compiled frappliance must then be copied into the PlugIns folder inside the AppleTV's Finder.app Link to comment Share on other sites More sharing options...
RevoX Posted March 31, 2007 Share Posted March 31, 2007 Great work Grabber Link to comment Share on other sites More sharing options...
Jlentz823 Posted March 31, 2007 Share Posted March 31, 2007 awesome u guys should get a plugin that allows you to minimize ATV or switchwindows. that would be awesome Link to comment Share on other sites More sharing options...
ibcrootbeer Posted March 31, 2007 Share Posted March 31, 2007 Would you take mine? (Didn't test it, hope it works) Edit: Successfully tested, but perhaps partly german. Tell me, if I've to change the localization. No the project folder includes an Xcode project which must be compiled. The compiled frappliance must then be copied into the PlugIns folder inside the AppleTV's Finder.app i just used amok's compiled film theater frapp and put it inside the plugins folder. when i ran ATV again it showed up in the menu looking great, however when i selected it, the option it gave me was to close appletv??? am i missing something? i already have the exit frapp installed which is working fine. is this an error on my part, has anyone else gotten the film theater frapp (file browser) seeing their media files on their computer? Link to comment Share on other sites More sharing options...
grabberslasher Posted March 31, 2007 Author Share Posted March 31, 2007 You must not have movies in the same folder as amok's compiled version is pointing to. The code has the path editable before compilation, so you use that and compile it if you need to change the path. Link to comment Share on other sites More sharing options...
ibcrootbeer Posted March 31, 2007 Share Posted March 31, 2007 You must not have movies in the same folder as amok's compiled version is pointing to. The code has the path editable before compilation, so you use that and compile it if you need to change the path. im sorry i keep getting stuck... i opened the code in xcode and saw the line to change to point to the directory where your movies are kept, so i changed it to "Users/myusername/Movies" and compiled it. placed the frapp into the plugins folder and the same thing happened... it just gave me the option to close ATV. the menu is there the icon is there and it compiled with no errors, all my movies are in the Movies folder on my HD... am i still doing something wrong? Link to comment Share on other sites More sharing options...
grabberslasher Posted March 31, 2007 Author Share Posted March 31, 2007 im sorry i keep getting stuck... i opened the code in xcode and saw the line to change to point to the directory where your movies are kept, so i changed it to "Users/myusername/Movies" and compiled it. placed the frapp into the plugins folder and the same thing happened... it just gave me the option to close ATV. the menu is there the icon is there and it compiled with no errors, all my movies are in the Movies folder on my HD... am i still doing something wrong? Do you have a forwardslash at the start of that path? "/Users/myusername/Movies/" ? Link to comment Share on other sites More sharing options...
ibcrootbeer Posted March 31, 2007 Share Posted March 31, 2007 Do you have a forwardslash at the start of that path? "/Users/myusername/Movies/" ? yeah... it reads: .... = @"/Users/myusername/Movies"; should there not be one? Link to comment Share on other sites More sharing options...
Ai Haibara Posted March 31, 2007 Share Posted March 31, 2007 It works like magic, but it's making some troubles with the Exit plugin, mostly because it turned out that they both use the same Info.plist file. How can we make working both of them? Sherry Haibara Link to comment Share on other sites More sharing options...
Recommended Posts