Quote:
But then the Mac doesn't have file filters? Is that a big problem in your opinion?
Sorry, I wasn't clear. Only Windows with the AWT FileDialog doesn't support filters. Windows with the Swing FileChooser does support filters. The mac supports file filters on both. Not sure where Linux stands.
So, on the mac we need to use AWT, and on Windows (and probably Linux) we need to use Swing.
Quote:
Quote:
We should probably abstract this out into another class so that we can use it in other places easily (i.e. import/export).
How do you mean?
I mean have a set of functions to choose files/directorys in a delegate class (maybe TedIO) that return file paths as strings. e.g. directoryPath = TedIO.chooseDirectory()
This way we have our AWT/Swing/whatever dialog logic in a centralized location.
Quote:
It would Smile How do you envision this? Is this a global setting or a setting per show? Would you let the user define some kind of path or do this yourself?
So I actually have this working already. I followed the comments in the bug as a guideline (which I generally agree with) and made the option global to all shows. In the general preference pane there's a "download to show folder" option and a suboption for "use season folders". Depending on what the user chooses you could end up with <base download dir>/file.torrent, <base download dir>/30 Rock/file.torrent or <base download dir>/30 Rock/Season 4/file.torrent
The format is fixed to be <show name>/Season <season num>. I suppose we could make that customizable, but personally I think that'll just make the interface too cluttered.
It wouldn't be too difficult to make this a show specific option. I think we'd still want a general option in the general pref pane, in addition to an option in the edit show dialog to override the general pref. Again, though, I'm inclined to go with a simpler, cleaner interface.
Oh, and for daily shows I just ignore the season option. So daily shows will either go in <base download dir>/<show name> or just <base download dir> if the option is off completely.
I also ended up refactoring the downloadTorrent function a bit so that it takes a URL, TedSerie, and a StandardStructure and from those it creates the proper file name, etc.
Anyway, I can send you a patch for this a little later. I am having some problems running the code in general right now though. I can run it straight from eclipse, but running it as a jar gives me a ClassNotFoundException for org/jdom/Document. I think it has to do with checkin 870 as I reverted back to 869 and was able to run it fine.
This is stopping me from testing on Windows, but it looks good on the mac.