Kodi Community Forum

Full Version: Export not working after Java 7 NIO refactor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Interestingly, the Files.isDirectory(templatePath) returns false, although it is pretty existent here?!?
Have to check...
thx for pointing that out Smile
You're welcome Wink
thanks for pointing that out. There were two other problems in the NIO refactor.
will be fixed in the next version
You're welcome.
That's a great news!

Thanks for your efforts :o)
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?
the fixed build is available tomorrow
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.