befora / Kuboo

Kotlin + Ubooquity = Kuboo
Apache License 2.0
83 stars 41 forks source link

Recently Viewed - Automatic Next Issue #60

Closed cesalo closed 5 years ago

cesalo commented 5 years ago

Not sure if this has been reviewed before but worth to mention: Generally you will read the last issue of a comic and leave there in the last page, this will remain in the Recently Viewed section until you read the next one. The issue I've been having lately (I started to follow a lot of different series of comics) is that a new comic will be added to the series but the Recently Viewed section will remain in the previous one. Is there a way to automate this process and try to go to the next issue automatically and also move this comic to the first place of this section?

befora commented 5 years ago

This is a reason I'm building my own server. There isn't even an official "next book" api pull, I had to implement an ineffecient workaround.

Kuboo server will support "next book" and "next series". Series will have to be in sequential order though, it sounds right in my head but haven't implemented it yet.

cesalo commented 5 years ago

Awesome. I assume that. I'm looking forward to see your implementation of the server. Based of what you've done with this app it would be great. Thanks.

befora commented 5 years ago

Alpha is in releases section of GitHub if you like to tinker.

cesalo commented 5 years ago

man I'm having bad luck with this:

java -jar kuboo-server-0.0.4-alpha.jar
2019-01-25 18:19:29.309 [main] DEBUG Application - Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64
2019-01-25 18:19:29.319 [main] DEBUG Application - Class Loader: sun.misc.Launcher$AppClassLoader@70dea4e: [/share/media/files_temp/kuboo-server-0.0.4-alpha.jar]
2019-01-25 18:19:29.323 [main] INFO  Application - No ktor.deployment.watch patterns match classpath entries, automatic reload is not active
2019-01-25 18:19:31.059 [main] INFO  Application - No ktor.deployment.watch patterns specified, automatic reload is not active
2019-01-25 18:19:31.060 [main] INFO  Application - Lifecycle - onStarting
2019-01-25 18:19:31.106 [main] ERROR Application - [Task_SecretJwtGet] [Failed] [1 ms] Jwt secret file is empty!
2019-01-25 18:19:31:109 (KOIN)::[e] Error while resolving instance for class 'web.user.auth.AuthService' - error: org.koin.error.BeanInstanceCreationException: Can't create definition for 'Single [name='AuthService',class='web.user.auth.AuthService']' due to error :
                The Secret cannot be null
                com.auth0.jwt.algorithms.HMACAlgorithm.getSecretBytes(HMACAlgorithm.java:38)
                com.auth0.jwt.algorithms.HMACAlgorithm.<init>(HMACAlgorithm.java:32)
                com.auth0.jwt.algorithms.Algorithm.HMAC512(Algorithm.java:164)
                web.user.auth.AuthService.<init>(AuthService.kt:33)
                ModuleKt$serviceModule$1$2.invoke(Module.kt:61)
                ModuleKt$serviceModule$1$2.invoke(Module.kt)
                org.koin.core.instance.InstanceHolder$DefaultImpls.create(InstanceHolder.kt:17)
                org.koin.core.instance.SingleInstanceHolder.create(SingleInstanceHolder.kt:10)
                org.koin.core.instance.SingleInstanceHolder.get(SingleInstanceHolder.kt:18)
                org.koin.core.instance.InstanceFactory.retrieveInstance(InstanceFactory.kt:55)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1$1.invoke(InstanceRegistry.kt:106)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1$1.invoke(InstanceRegistry.kt:36)
                org.koin.core.stack.ResolutionStack.resolve(ResolutionStack.kt:44)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1.invoke(InstanceRegistry.kt:105)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1.invoke(InstanceRegistry.kt:36)
                org.koin.core.time.DurationKt.measureDuration(Duration.kt:8)
                org.koin.core.instance.InstanceRegistry.proceedResolution(InstanceRegistry.kt:84)
                org.koin.core.instance.InstanceRegistry.resolve(InstanceRegistry.kt:63)
                org.koin.core.instance.InstanceRegistry.resolve$default(InstanceRegistry.kt:48)
                ModuleKt$module$1$$special$$inlined$inject$1.invoke(KtorApplicationExt.kt:139)
                kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
                ModuleKt$module$1.invoke(Module.kt:80)
                ModuleKt$module$1.invoke(Module.kt)
                io.ktor.auth.Authentication.configure(Authentication.kt:66)
                io.ktor.auth.Authentication$Feature.install(Authentication.kt:142)
                io.ktor.auth.Authentication$Feature.install(Authentication.kt:134)
                io.ktor.application.ApplicationFeatureKt.install(ApplicationFeature.kt:59)
                ModuleKt.module(Module.kt:78)
                MainKt$main$application$1$1.invoke(Main.kt:36)
                MainKt$main$application$1$1.invoke(Main.kt)
                io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:277)
                io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:126)
                io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:245)
                io.ktor.server.netty.NettyApplicationEngine.start(NettyApplicationEngine.kt:106)
                MainKt.main(Main.kt:62) 
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:71)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:80)
        at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:106)
        at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflect_api(KCallableImpl.kt:152)
        at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:110)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.callFunctionWithInjection(ApplicationEngineEnvironmentReloading.kt:347)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.executeModuleFunction(ApplicationEngineEnvironmentReloading.kt:297)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:273)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:126)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:245)
        at io.ktor.server.netty.NettyApplicationEngine.start(NettyApplicationEngine.kt:106)
        at io.ktor.server.netty.NettyApplicationEngine.start(NettyApplicationEngine.kt:18)
        at io.ktor.server.engine.ApplicationEngine$DefaultImpls.start$default(ApplicationEngine.kt:46)
        at io.ktor.server.netty.EngineMain.main(EngineMain.kt:17)
Caused by: org.koin.error.BeanInstanceCreationException: Can't create definition for 'Single [name='AuthService',class='web.user.auth.AuthService']' due to error :
                The Secret cannot be null
                com.auth0.jwt.algorithms.HMACAlgorithm.getSecretBytes(HMACAlgorithm.java:38)
                com.auth0.jwt.algorithms.HMACAlgorithm.<init>(HMACAlgorithm.java:32)
                com.auth0.jwt.algorithms.Algorithm.HMAC512(Algorithm.java:164)
                web.user.auth.AuthService.<init>(AuthService.kt:33)
                ModuleKt$serviceModule$1$2.invoke(Module.kt:61)
                ModuleKt$serviceModule$1$2.invoke(Module.kt)
                org.koin.core.instance.InstanceHolder$DefaultImpls.create(InstanceHolder.kt:17)
                org.koin.core.instance.SingleInstanceHolder.create(SingleInstanceHolder.kt:10)
                org.koin.core.instance.SingleInstanceHolder.get(SingleInstanceHolder.kt:18)
                org.koin.core.instance.InstanceFactory.retrieveInstance(InstanceFactory.kt:55)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1$1.invoke(InstanceRegistry.kt:106)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1$1.invoke(InstanceRegistry.kt:36)
                org.koin.core.stack.ResolutionStack.resolve(ResolutionStack.kt:44)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1.invoke(InstanceRegistry.kt:105)
                org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1.invoke(InstanceRegistry.kt:36)
                org.koin.core.time.DurationKt.measureDuration(Duration.kt:8)
                org.koin.core.instance.InstanceRegistry.proceedResolution(InstanceRegistry.kt:84)
                org.koin.core.instance.InstanceRegistry.resolve(InstanceRegistry.kt:63)
                org.koin.core.instance.InstanceRegistry.resolve$default(InstanceRegistry.kt:48)
                ModuleKt$module$1$$special$$inlined$inject$1.invoke(KtorApplicationExt.kt:139)
                kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
                ModuleKt$module$1.invoke(Module.kt:80)
                ModuleKt$module$1.invoke(Module.kt)
                io.ktor.auth.Authentication.configure(Authentication.kt:66)
                io.ktor.auth.Authentication$Feature.install(Authentication.kt:142)
                io.ktor.auth.Authentication$Feature.install(Authentication.kt:134)
                io.ktor.application.ApplicationFeatureKt.install(ApplicationFeature.kt:59)
                ModuleKt.module(Module.kt:78)
                MainKt$main$application$1$1.invoke(Main.kt:36)
               MainKt$main$application$1$1.invoke(Main.kt)
                io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:277)
                io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:126)
                io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:245)
                io.ktor.server.netty.NettyApplicationEngine.start(NettyApplicationEngine.kt:106)
                MainKt.main(Main.kt:62)
        at org.koin.core.instance.InstanceHolder$DefaultImpls.create(InstanceHolder.kt:23)
        at org.koin.core.instance.SingleInstanceHolder.create(SingleInstanceHolder.kt:10)
        at org.koin.core.instance.SingleInstanceHolder.get(SingleInstanceHolder.kt:18)
        at org.koin.core.instance.InstanceFactory.retrieveInstance(InstanceFactory.kt:55)
        at org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1$1.invoke(InstanceRegistry.kt:106)
        at org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1$1.invoke(InstanceRegistry.kt:36)
        at org.koin.core.stack.ResolutionStack.resolve(ResolutionStack.kt:44)
        at org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1.invoke(InstanceRegistry.kt:105)
        at org.koin.core.instance.InstanceRegistry$proceedResolution$$inlined$synchronized$lambda$1.invoke(InstanceRegistry.kt:36)
        at org.koin.core.time.DurationKt.measureDuration(Duration.kt:8)
        at org.koin.core.instance.InstanceRegistry.proceedResolution(InstanceRegistry.kt:84)
        at org.koin.core.instance.InstanceRegistry.resolve(InstanceRegistry.kt:63)
        at org.koin.core.instance.InstanceRegistry.resolve$default(InstanceRegistry.kt:48)
        at ModuleKt$module$1$$special$$inlined$inject$1.invoke(KtorApplicationExt.kt:139)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at ModuleKt$module$1.invoke(Module.kt:80)
        at ModuleKt$module$1.invoke(Module.kt)
        at io.ktor.auth.Authentication.configure(Authentication.kt:66)
        at io.ktor.auth.Authentication$Feature.install(Authentication.kt:142)
        at io.ktor.auth.Authentication$Feature.install(Authentication.kt:134)
        at io.ktor.application.ApplicationFeatureKt.install(ApplicationFeature.kt:59)
        at ModuleKt.module(Module.kt:78)
        at MainKt$main$application$1$1.invoke(Main.kt:36)
        at MainKt$main$application$1$1.invoke(Main.kt)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:277)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:126)
        at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:245)
        at io.ktor.server.netty.NettyApplicationEngine.start(NettyApplicationEngine.kt:106)
        at MainKt.main(Main.kt:62)
        ... 18 more
befora commented 5 years ago

Did it create folders and files outside the jar? Try to delete them all and try again. I just downloaded and tested and it works fine. If no folders or files were created, maybe it doesn't have permission to write the files.

cesalo commented 5 years ago

Gotcha .. yeah that solved the issue. Now .. what is the login/password? I tried to put what is indicated but didn't work.

befora commented 5 years ago

admin: username: 1 password: 1 non-admin: username: 2 password: 2

cesalo commented 5 years ago

Thanks.

befora commented 5 years ago

I wrote in an error log so it will notify user if missing write permission. Thanks for feedback.