YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

KODI NFO file set problem #2787

Closed Omertron closed 8 years ago

Omertron commented 8 years ago

NFO files with KODI set format are not read correctly

<set>
    <name>Mission: Impossible Collection</name>
</set>

Causes an issue when the set file is written:

[01:32:49 - Thread-50] ERROR com.moviejukebox.tools.DOMHelper - Error writing the document to W:\yamj\temp\Jukebox\Set_
Mission$3A Impossible Collection
_1.xml
[01:32:49 - Thread-50] ERROR com.moviejukebox.tools.DOMHelper - Message: Failed to create output file file:/W:/yamj/temp/Jukebox/Set_%0A%20%20%20%20%20%20%20%20Mission$3A%20Impossible%20Collection%0A%20%20%20%​20_1.xml
[01:32:50 - main ] ERROR com.moviejukebox.tools.GraphicTools - Failed Saving thumbnail file: W:\yamj\temp\Jukebox\Set_
Mission$3A Impossible Collection
_1_large.jpg
[01:32:50 - main ] ERROR com.moviejukebox.tools.GraphicTools - java.io.FileNotFoundException: W:\yamj\temp\Jukebox\Set_
Mission$3A Impossible Collection
_1_large.jpg (The filename, directory name, or volume label syntax is incorrect)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(Unknown Source)
at javax.imageio.stream.FileImageOutputStream.<init>(Unknown Source)
at com.moviejukebox.tools.GraphicTools.saveImageAsJpeg(GraphicTools.java:119)
at com.moviejukebox.tools.GraphicTools.saveImageToDisk(GraphicTools.java:163)
at com.moviejukebox.MovieJukebox.createPoster(MovieJukebox.java:2417)
at com.moviejukebox.MovieJukebox.generateLibrary(MovieJukebox.java:1457)
at com.moviejukebox.MovieJukebox.main(MovieJukebox.java:484)

The NFO reader just needs to either check for the <name> tag and strip it out or remove all <*> tags from the set name.