Code Monkey home page Code Monkey logo

Comments (9)

hkalexling avatar hkalexling commented on May 18, 2024 2

Thanks a lot for investigating this!

Archive error: Parsing filters is unsupported.

This is due to an old bug in libarchive (see libarchive/libarchive#373), and LANraragi has the same issue (Difegue/LANraragi#165). Unfortunately, there's nothing much we can do :(

Regarding multiple instances, I have been thinking about it, and I think there's no harm in doing it. We just need to change a few lines, and it's a good workaround for #13. Supporting #13 would involve a lot of work and I am not ready to do it :P Will probably include it in v0.5.0 as well.

from mango.

hkalexling avatar hkalexling commented on May 18, 2024 1

The challenging part about RAR is that it's a proprietary format so (unlike zip) there's no RAR reader/writer in the Crystal standard library. I couldn't find any shards for it either.

A conversion script would indeed be nice to have! Let me test it a bit and then include it in the wiki.

I didn't know about unar and it looks promising 👍 . It supports other formats like 7zip, so with it Mango can have cb7 support as well. I don't think the unar binary is statically linked by default, so including it in the Mango binary might not work, but since it's open-source I can try to compile it statically. I will keep you updated!

from mango.

hkalexling avatar hkalexling commented on May 18, 2024 1

I have tested the conversion script and it works great! It's now in the Wiki.

Unfortunately, I couldn't get unar to link statically, but I agree we should make the binary self-contained if possible. Instead of including a third party binary in the Mango binary, I think it makes more sense if we could wrap a C-based RAR extraction library (e.g., libarchive) as a Crystal shard and use it in Mango. I will try to work on it when I have the time.

I am closing this issue, but feel free to reopen it.

from mango.

hkalexling avatar hkalexling commented on May 18, 2024 1

@jaredlt Just to keep you updated, I have added RAR/CBR support in the dev branch (thanks to the libarchive project).

Since you mentioned that you have a lot of CBR files, it would be great if you could help to test it out! If you want, you can use the mango binary compiled by the GitHub Action (see the "Artifacts" section).

from mango.

jaredlt avatar jaredlt commented on May 18, 2024

@hkalexling happy to help!

I get the following error when I run Mango:

Unhandled exception in spawn: RAR solid archive support unavailable. (Archive::Error)
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???

I can access the web interface but it shows 0 titles in the library.

As a side note, is there a way to run multiple instances of Mango with separate configs and dbs? It's not a big deal, but just wondered.

from mango.

hkalexling avatar hkalexling commented on May 18, 2024

Thanks for testing it 👍. It looks like libarchive does not support solid RAR archives, and that's why you got the error. Where did you get your CBR files? Is it common for them to be solid?

is there a way to run multiple instances of Mango with separate configs and dbs?

Yes, see #21 . However, if you are serving the instances under the same domain/IP, the two instances will overwrite each other's login token in the browser cookies.

Currently, the login token is always stored in the browser cookies under the key token (see https://github.com/hkalexling/Mango/blob/master/src/routes/main.cr#L27-L29). Perhaps we can include the port number in the key (say token-9000) so tokens from different ports will be stored separately.

from mango.

hkalexling avatar hkalexling commented on May 18, 2024

Could you please set the log level to debug and test with this build? I've made it so that when it fails to read an archive, it logs the archive path and the detailed error message. You should be able to see how many of your CBR files are solid. Thanks!

from mango.

hkalexling avatar hkalexling commented on May 18, 2024

I checked some similar projects. komga doesn't support solid RAR either (source), and LANraragi is using libarchive as well (source). I guess we can leave it like this and make it clear in the README or Wiki that solid RAR files are not supported.

from mango.

jaredlt avatar jaredlt commented on May 18, 2024

Where did you get your CBR files? Is it common for them to be solid?

Scattered across the internet :) It seems solid is not very common at all (only 3 archives were solid) and I agree that a clear message somewhere should suffice. The majority of errors were actually Parsing filters is unsupported. Admittedly most of the archives with errors are for comics, not manga, and all of them are quite old.

  • Archive error: Prefix found: 3
  • Archive error: RAR solid archive support unavailable.: 3
  • Archive error: Parsing filters is unsupported.: 67
  • Archive error: Couldn't find directory end signature in the last 65KB: 1

Attached full debug.log

I was going to say that the info level logging isn't super clear as it says File /path/file.cbr is corrupted or is not a valid archive. Ignoring it. (you don't know exactly what the problem is). But I see in #49 you are looking to be more specific with the error messages regarding permissions. Will you also do the same regarding solid support etc?

You also mention displaying corrupted archives in the web interface. I think this will be really useful. Will this apply for all errors or unsupported archives? Basically, anything where the logger says ignoring it?

RE: multiple instances - thanks, I'm happy enough with how it is. It hasn't become painful to switch around so no need to prioritise the cookie token fix on my account.

from mango.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.