Page 1 of 1
Accessing name scheme history on a Mac
Posted: 24 Oct 2012, 03:38
by koplersky
Hello there,
I'm using Filebot on a Macbook Pro with OS X 10.8.2, and I can't access my previously used naming scheme, pressing DOWN just won't work.
Is this a known bug or am I doing something wrong?
I appreciate any advice.
Regards,
koplersky
Re: Accessing name scheme history on a Mac
Posted: 24 Oct 2012, 04:52
by rednoah
Has it worked before? Last week I just found out Mac doesn't have a DELETE button, or rather the Mac DELETE button is Win BACKSPACE. Maybe Mac DOWN is different from Win DOWN?
Can you play with this and tell me what KeyCode it shows when you press DOWN? It's 40 here.
http://lawrence.ecorp.net/inet/samples/keycodes.shtml
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 00:35
by koplersky
Thanks for the answer, rednoah.
No, it has never worked before, it's the first time I'm trying.
Yes, you are right about the DELETE thing, on a Macbook you need to hold FN and then hit DELETE in order to get the common DELETE key. But I tried to hold FN, OPTION, ALT, COMMAND and SHIFT before hitting DOWN but none of them worked for me.
I did what you asked and I'm attaching a screenshot of what I got.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 03:22
by rednoah
Not sure what to make of this, keyCode should be the same. Maybe the event is different?
Can you run this code with filebot -script ... type DOWN and see what happens?
Code: Select all
import groovy.swing.SwingBuilder
import javax.swing.JFrame
count = 0
new SwingBuilder().edt {
frame(title:'Test', size:[300,300], show: true, defaultCloseOperation: JFrame.EXIT_ON_CLOSE) {
borderLayout()
scrollPane{
textlabel = textArea(text:'Press Keys!\n', constraints:"North")
}
button(text:'Focus',
constraints:"South",
keyPressed: { textlabel.append("Pressed: $it\n") },
keyReleased: { textlabel.append("Released: $it\n") },
keyTyped: { textlabel.append("Typed: $it\n") }
)
}
}
System.in.read()
When I hit DOWN once this is what I get on Windows:
Code: Select all
Pressed: java.awt.event.KeyEvent[KEY_PRESSED,keyCode=40,keyText=Down,keyChar=Undefined keyChar,keyLocation=KEY_LOCATION_STANDARD,rawCode=40,primaryLevelUnicode=0,scancode=80,extendedKeyCode=0x28] ...
Released: java.awt.event.KeyEvent[KEY_RELEASED,keyCode=40,keyText=Down,keyChar=Undefined keyChar,keyLocation=KEY_LOCATION_STANDARD,rawCode=40,primaryLevelUnicode=0,scancode=80,extendedKeyCode=0x28] ...
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 03:31
by rednoah
:: UPDATE ::
Can you try r1271 and see if it works? Just guessing things, might work, might not.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 03:44
by koplersky
Sure, I'll try and post back.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 03:47
by koplersky
Hmmm wait, is r1271 another version? If so, where can I find it?
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 03:49
by rednoah
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 03:59
by koplersky
No, same thing.
Maybe I should try running the script? I don't know how to do that, though.
So I saw you were looking for someone to help fixing things for Mac, so I'll try to post about any strange behavior I might find.
One thing I noticed is that this screen to edit the naming scheme always pops up too small, so I need to resize it in order to see all the buttons.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 04:20
by rednoah
First grab the .app bundle and then replace the jar inside the appfolder with the latest revision. Then open console and run ./Applications/Filebot.app/Contents/MacOS/install.sh, after that you should be able to use the "filebot" right way, e.g. filebot -version, if that works you can run filebot -script myscript.groovy, where myscript.groovy would be a text-file with the script I posted.
EDIT:
Also a screenshot of the inital dialog size would be nice so I know what WxH it needs. Right now it's set to 540x395
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 04:51
by koplersky
I got:
-bash: filebot: command not found
And if I cd into /usr/bin/ and run ./filebot I get:
-bash: ./filebot: Too many levels of symbolic links
The screenshot is attached.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 05:03
by rednoah
Maybe try with full path to the executable:
Code: Select all
./Applications/Filebot.app/Contents/MacOS/filebot -version
Also can you resize the windows so it fits and then send me another screenshots or the dimensions? I still don't know to what size I should set it.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 05:30
by koplersky
I cd into that dir and entered ./filebot -version.
It worked and gave me lots of exceptions:
Code: Select all
FileBot 3.0 (r1271) / Java(TM) SE Runtime Environment 1.6.0_37 (headless)
Exception in thread "Thread-1" net.sf.ehcache.CacheException: java.lang.ExceptionInInitializerError
at net.sf.ehcache.CacheManager.init(CacheManager.java:393)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1029)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:810)
at net.sf.ehcache.CacheManager.create(CacheManager.java:791)
at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:825)
at net.sourceforge.filebot.Main$6.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at java.io.File.deleteOnExit(File.java:939)
at net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:318)
at net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:145)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
at net.sf.ehcache.store.disk.DiskStorageFactory.<init>(DiskStorageFactory.java:125)
at net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:156)
at net.sf.ehcache.store.DiskBackedMemoryStore.createDiskStore(DiskBackedMemoryStore.java:61)
at net.sf.ehcache.store.DiskBackedMemoryStore.create(DiskBackedMemoryStore.java:49)
at net.sf.ehcache.Cache.initialise(Cache.java:1097)
at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1298)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1329)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:750)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:451)
at net.sf.ehcache.CacheManager.init(CacheManager.java:374)
... 6 more
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.lang.Shutdown.add(Shutdown.java:62)
at java.lang.System$2.registerShutdownHook(System.java:1163)
at java.io.DeleteOnExitHook.<clinit>(DeleteOnExitHook.java:20)
... 21 more
I attached the new screenshot.
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 06:37
by rednoah
ok, fixed some of these problems, anyway, for calling scripts it doesn't make a difference.
Since we're gonna show a GUI via scripting you have to turn off headless-mode in the filebot bash startup script:
Then run the script I posted above:
Re: Accessing name scheme history on a Mac
Posted: 27 Oct 2012, 20:19
by koplersky
Now I got this:
Code: Select all
$ ./filebot -version
FileBot 3.0 (r1271) / Java(TM) SE Runtime Environment 1.6.0_37
Exception in thread "Thread-1" net.sf.ehcache.CacheException: java.lang.ExceptionInInitializerError
at net.sf.ehcache.CacheManager.init(CacheManager.java:393)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1029)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:810)
at net.sf.ehcache.CacheManager.create(CacheManager.java:791)
at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:825)
at net.sourceforge.filebot.Main$6.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at java.io.File.deleteOnExit(File.java:939)
at net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:318)
at net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:145)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
at net.sf.ehcache.store.disk.DiskStorageFactory.<init>(DiskStorageFactory.java:125)
at net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:156)
at net.sf.ehcache.store.DiskBackedMemoryStore.createDiskStore(DiskBackedMemoryStore.java:61)
at net.sf.ehcache.store.DiskBackedMemoryStore.create(DiskBackedMemoryStore.java:49)
at net.sf.ehcache.Cache.initialise(Cache.java:1097)
at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1298)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1329)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:750)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:451)
at net.sf.ehcache.CacheManager.init(CacheManager.java:374)
... 6 more
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.lang.Shutdown.add(Shutdown.java:62)
at java.lang.System$2.registerShutdownHook(System.java:1163)
at java.io.DeleteOnExitHook.<clinit>(DeleteOnExitHook.java:20)
... 21 more
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 02:34
by rednoah
That doesn't matter, it's working, printing version and stuff right? Think I fixed that, only happens because of some race-condition, oddly enough never on Windows.
Anyway, I need to know the keyCodes on Mac DOWN otherwise I can't fix that original problem.
Run an play with it:
Code: Select all
./filebot -script http://pastebin.com/raw.php?i=m0sFL24t -trust-script
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 02:37
by koplersky
Ok, here's what I got:
Code: Select all
Press Keys!
Pressed: java.awt.event.KeyEvent[KEY_PRESSED,keyCode=40,keyText=Abaixo,keyChar=Indefinido keyChar,keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0] on javax.swing.JButton[,0,249,300x29,alignmentX=0.0,alignmentY=0.5,border=com.apple.laf.AquaButtonBorder$Dynamic@235be31e,flags=288,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=0,left=2,bottom=0,right=2],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Focus,defaultCapable=true]
Released: java.awt.event.KeyEvent[KEY_RELEASED,keyCode=40,keyText=Abaixo,keyChar=Indefinido keyChar,keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0] on javax.swing.JButton[,0,249,300x29,alignmentX=0.0,alignmentY=0.5,border=com.apple.laf.AquaButtonBorder$Dynamic@235be31e,flags=288,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=0,left=2,bottom=0,right=2],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Focus,defaultCapable=true]
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 03:09
by rednoah
What if you press DELETE/BACKSPACE? Does that work in the FileBot UI? e.g. download episode list and then delete individual items?
Maybe Java doesn't recognize Abaixo as Down, wierd, but it's the only difference I see.
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 03:42
by rednoah
Maybe it's worth a try to force Java into English?
1. Open .app/Info.plist
2. Find <dict>...</dict> section
3. Add these key/string mappings:
user.country=US
user.country.format=US
user.language=en
user.language.format=en
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 03:58
by rednoah
:: r1279 ::
This is annoying, so key events don't work. With the latest revision I added a context menu. That should work on all platforms.
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 04:22
by koplersky
Yes, DELETE works, I can remove episodes with it.
Which one of the <dict>? There are 3 I guess.
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 06:31
by rednoah
I mean add new entries:
<key>user.language</key>
<string>en</string>
...
Anyway, you can try if you can make DOWN work that way. In anycase this is fixed with r1279. You can use Right-Click instead of DOWN to access previous expressions.
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 16:51
by koplersky
DOWN still won't work after editing the plist file.
The new version worked like a charm, and the popup window is with the correct size.
I also tried ./filebot -version with headless set to true and false, no more error messages.
Many thanks, I really appreciate it!
Is there anything else I could check?
Re: Accessing name scheme history on a Mac
Posted: 28 Oct 2012, 17:05
by rednoah
Not sure, looks like random things might be broken on Mac because I've never tested on Mac. Just let me know if you find anything that's odd.