Hi there,
I fixed a bug for Linux users.
The problem was that the plugin both mymovies.xml and movie.nfo could not find/load.
@Developer's:
The files could not be found because the pathnames was written for Windows systems, Linux use '\' in stead of '\' like Windows do it. To solve this problem I had only to make some changes in the FileInfoVirtualFolder.java (Method: getFileInfoFile). The changed source code is also include in the MovieInfo.jar
- Code: Select all
import com.sun.jna.Platform;
...
private BufferedReader getFileInfoFile(FileReaderPlugin plugin) throws FileNotFoundException
{
File f;
// Added:
String strDirSep = "\\";
if (Platform.isLinux( ))
strDirSep = "/";
DLNAResource item = parent;
// the movie info file may be deeper nested so try a few parents
for (int i = 0; i < 4; i++) {
// Changed:
f = new File(item.getSystemName() + strDirSep + plugin.getFileName());
if (f.exists()) {
return new BufferedReader(new FileReader(f));
} else {
if (item.getParent() != null) {
item = item.getParent();
} else {
break;
}
}
}
// Changed:
throw new FileNotFoundException(parent.getParent().getSystemName()
+ strDirSep + plugin.getFileName());
}