getmango / Mango

Mango is a self-hosted manga server and web reader
https://getmango.app
MIT License
1.69k stars 120 forks source link

is it neccesary to have all manga in "library" folder ? #273

Closed myfairx closed 2 years ago

myfairx commented 2 years ago

Hi first of all, thank you for this awesome project I use mango with docker on top of OMV nas however, is it necessary to have all manga in "library" folder?

In config I set my sources as /srv/mergerfs/all/media/manga instead it will create a folder library in that dir as /srv/mergerfs/all/media/manga/library

I mean its not really an issue I could just move all my media into that dir instead but I also share my media to other apps and possibly do not want to change my folder structure

did I miss something? TQIA

alethiophile commented 2 years ago

You can put symlinks to folders under your library folder, so that Mango can see them but you don't have to move anything.

E.g., set your sources config to some arbitrary directory, (~/mango/library is the default), then go to that directory on the command line and execute ln -s /srv/mergerfs/all/media/manga .. This will create a symlink ~/mango/library/manga that points to the directory containing your existing files, allowing Mango to see all of them.

Leeingnyo commented 2 years ago

@alethiophile was right!

I would say a one more thing. with symlinks, don't forget to set volume paths to a docker container for their real paths. If not, the container can't follow symlinks

Here are my config.yml and docker-compose.yml (on WSL2)

# in config.yml
library_path: /root/mango/library
# in docker-compose.yml
    volumes:
      - /home/some-path/mango/mango:/root/mango
      - /home/some-path/mango/config:/root/.config/mango
      - /mnt/d:/mnt/d # make volume path whole drive
      - /mnt/k:/mnt/k
      - /mnt/c/Users/some-path/Downloads:/mnt/c/Users/some-path/Downloads
# in /home/some-path/mango/mango/library
lrwxrwxrwx 1 REDACTED REDACTED      24 May 28  2021 REDACTED-A -> /mnt/d/ARCHIVE/HDD04/REDACTED-A/
lrwxrwxrwx 1 REDACTED REDACTED      25 Jan 12 10:18 TEMPTEMP -> /mnt/c/Users/some-path/Downloads/
lrwxrwxrwx 1 REDACTED REDACTED      28 May 28  2021 REDACTED-B -> /mnt/d/ARCHIVE/HDD04/REDACTED-B/
lrwxrwxrwx 1 REDACTED REDACTED      28 Apr 13  2021 REDACTED-C -> /mnt/d/ARCHIVE/HDD04/REDACTED-C/
hkalexling commented 2 years ago

Thanks guys! I think the explanations are clear enough. Closing this.