Solved Export not working after Java 7 NIO refactor
#1
Hello,

It's now not possible to export movies.
After checking code source, I've find at least one issue in MediaEntityExporter:
Code:
protected MediaEntityExporter(Path templatePath, TemplateType type) throws Exception {
    // check if template exists and is valid
    if (Files.isDirectory(templatePath)) {
      throw new Exception("illegal template");
    }

    Path configFile = templatePath.resolve("template.conf");
    if (Files.exists(configFile)) {
      throw new Exception("illegal template");
    }

instead of

Code:
protected MediaEntityExporter(String pathToTemplate, TemplateType type) throws Exception {
    // check if template exists and is valid
    templateDir = new File(pathToTemplate);
    if (!templateDir.exists() || !templateDir.isDirectory()) {
      throw new Exception("illegal template");
    }

    File configFile = new File(pathToTemplate, "template.conf");
    if (!configFile.exists() || !configFile.isFile()) {
      throw new Exception("illegal template");
    }

My 2 cents.
Have a nice day

Alain
#2
Interestingly, the Files.isDirectory(templatePath) returns false, although it is pretty existent here?!?
Have to check...
thx for pointing that out Smile
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#3
You're welcome Wink
#4
thanks for pointing that out. There were two other problems in the NIO refactor.
will be fixed in the next version
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#5
You're welcome.
That's a great news!

Thanks for your efforts :o)
#6
Well,

I've tried tmm_2.8.1-SNAPSHOT_c402cd4, but i've still errors (o.t.u.movies.dialogs.MovieExporterDialog:181 - Error exporting movies: null), with standard templates (for example DetailExample2Html).

Moreover, the "copyArtwork" function seems to be disabled (http://www.tinymediamanager.org/blog/exp...-exporter/), because no images are created when I use it....

Maybe 2.8.1-SNAPSHOT_c402cd4 doesn't contain these fixes?
#7
the fixed build is available tomorrow
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#8
Ok thanks, it works now.
Seems that templates have changed for exporting images, but there are working examples.

Thanks a lot.
Have a nice week-end.

Logout Mark Read Team Forum Stats Members Help
Export not working after Java 7 NIO refactor0