gameyfin
gameyfin copied to clipboard
Support custom Metadata
(Possibly a duplicate of #31) Hey there. Ticket #31 aims to add support for games from other platforms, I'd really like to see this taken a step further. I have many small programs and games flying around on my hard drives that I collected over the years. A combination of self-made games/tools, things from youtube(https://www.youtube.com/watch?v=GiAj9WW1OfQ https://www.youtube.com/watch?v=QZwneRb-zqA https://www.youtube.com/watch?v=Epk6NAI90Kc etc), forums and more. These things clearly have no entry in databases like IGDB, so being able to add custom metadata via the interface would be amazing. This way, gameyfin can also be used as a personal archive for homebrew games and software.
I can see this being of use. However, since I'm currently getting flooded with feature requests and this seems to be a rather complex feature (especially front-end wise) I think this will take some time until it is implemented. I hope you understand. But thanks for suggesting this feature!
Since the backend is Java, I might find some time to look into the backend parts of the logic. That reminds me, would be awesome to mark the repo for Hacktoberfest.
Great idea! Totally forgot Hacktoberfest existed.
Hm, not having any luck in compiling the project. Tried on Windows and Linux, in both cases the protoc generation fails:
Linux
[ERROR] Failed to execute goal com.github.os72:protoc-jar-maven-plugin:3.11.4:run (default) on project gameyfin-backend: Execution default of goal com.github.os72:protoc-jar-maven-plugin:3.11.4:run failed.: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.os72:protoc-jar-maven-plugin:3.11.4:run (default) on project gameyfin-backend: Execution default of goal com.github.os72:protoc-jar-maven-plugin:3.11.4:run failed.
[...]
Caused by: java.lang.NullPointerException
at com.github.os72.protocjar.Protoc.extractStdTypes (Protoc.java:372)
at com.github.os72.protocjar.maven.ProtocJarMojo.performProtoCompilation (ProtocJarMojo.java:397)
at com.github.os72.protocjar.maven.ProtocJarMojo.execute (ProtocJarMojo.java:370)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Windows
Caused by: java.lang.NullPointerException: Cannot read the array length because "<local6>" is null
at com.github.os72.protocjar.Protoc.extractStdTypes (Protoc.java:372)
at com.github.os72.protocjar.maven.ProtocJarMojo.performProtoCompilation (ProtocJarMojo.java:397)
at com.github.os72.protocjar.maven.ProtocJarMojo.execute (ProtocJarMojo.java:370)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:577)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Otherwise took a look at the code, as a first step it should be enough to add a bit more logic into the GameService class, and define a JSON? version of DetectedGame that can be placed next to the file/into the folder/into the zip.
I also had this error, you have to use Java 18+ for the compile to succeed.
I am using Java 18(had to update, was on 17 still due to Minecraft mod development).
PS ...\gameyfin> javac --version
javac 18.0.2.1
PS ...\gameyfin> java --version
openjdk 18.0.2.1 2022-08-18
OpenJDK Runtime Environment Temurin-18.0.2.1+1 (build 18.0.2.1+1)
OpenJDK 64-Bit Server VM Temurin-18.0.2.1+1 (build 18.0.2.1+1, mixed mode, sharing)
on Java 17 it does fail correctly before that, with an error asking for target 18.
Oh right, forgot my other changes.
I added <optimizeCodegen>false</optimizeCodegen>
in file https://github.com/grimsi/gameyfin/blob/main/backend/pom.xml between line 211 and 212, that fixed it.
No idea why it occurres or why grimsi's builds are working but whatever
That did the trick. Did see that solution while googling, but there it was that it works once, and then fails. Since it always failed in my case, didn't try that.
Interesting. I use the Adoptium JDK 18 builds and I built it under Windows and Linux. But if you guys are having problems, I will add the <optimizeCodegen>false</optimizeCodegen>
configuration.