mirror of
https://github.com/Maschell/fuse-wiiu.git
synced 2024-11-22 06:39:14 +01:00
Add support for .woomy files
This commit is contained in:
parent
bcf60a889f
commit
5e05c65efd
2
pom.xml
2
pom.xml
@ -92,7 +92,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.Maschell</groupId>
|
<groupId>com.github.Maschell</groupId>
|
||||||
<artifactId>JNUSLib</artifactId>
|
<artifactId>JNUSLib</artifactId>
|
||||||
<version>3eb299d</version>
|
<version>95802c7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import de.mas.wiiu.jnus.NUSTitleLoaderWoomy;
|
||||||
|
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||||
|
import de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle;
|
||||||
|
|
||||||
|
public class WoomyNUSTitleContainer extends GroupFuseContainer {
|
||||||
|
private final File file;
|
||||||
|
|
||||||
|
public WoomyNUSTitleContainer(Optional<FuseDirectory> parent, File file) {
|
||||||
|
super(parent);
|
||||||
|
this.file = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doInit() {
|
||||||
|
this.addFuseContainer(file.getName(), new FSTDataProviderContainer(Optional.of(this), () -> {
|
||||||
|
try {
|
||||||
|
return new FSTDataProviderNUSTitle(NUSTitleLoaderWoomy.loadNUSTitle(file.getAbsolutePath()));
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -11,6 +11,7 @@ import de.mas.wiiu.jnus.fuse_wiiu.implementation.LocalNUSTitleContainer;
|
|||||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDFuseContainer;
|
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDFuseContainer;
|
||||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDMountedFuseContainer;
|
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDMountedFuseContainer;
|
||||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDToWUDContainer;
|
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDToWUDContainer;
|
||||||
|
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WoomyNUSTitleContainer;
|
||||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||||
import de.mas.wiiu.jnus.implementations.wud.reader.WUDDiscReaderSplitted;
|
import de.mas.wiiu.jnus.implementations.wud.reader.WUDDiscReaderSplitted;
|
||||||
@ -41,6 +42,11 @@ public class FuseContainerWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c.exists() && c.getName().endsWith(".woomy")) {
|
||||||
|
result.put(prefix + c.getName(), new WoomyNUSTitleContainer(parent, c));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
if (checkWUD(result, parent, c)) {
|
if (checkWUD(result, parent, c)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user