Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to run stand alone? #27

Open
Kussie opened this issue Feb 11, 2021 · 8 comments
Open

Is it possible to run stand alone? #27

Kussie opened this issue Feb 11, 2021 · 8 comments

Comments

@Kussie
Copy link

Kussie commented Feb 11, 2021

Just a quick question is possible to run this easily without FMD? Because personally i use a different downloader that actually creates a ComicInfo.xml when it downloads manga (https://doujindownloader.com/ is the app i use). However some of the sites where i source manga from have pretty crappy data compared to that from MAL or AniList, so it would be nice to be able to upgrade the quality of some of my metadata.

However it appears on quick glance that this requires you to use FMD.

@Banh-Canh
Copy link

I managed to run FMD2 through Wine in a docker container but since Manga-Tagger doesn't work as well in Wine, I ran it directly in the container (using the MangaTagger.py). Thing is, it is tied to FMD2 exe's path and it ask for it each time because, I believe, in Wine the path looks like "Z:\manga" while in the container (and the path MangaTagger is using) it should looks like "/manga". For now, settings MangaTagger to /manga, once asked, work and it then watch this folder.

I managed to make my docker image (FMD2 + mangatagger) work but it require some input and isn't fully automated yet (gotta set up MangaTagger each time the container start). I also noticed a relatively high cpu usage of MangaTagger when both are idle (i believe MangaTagger is still watching the folder though).

You can see how it behave at the beginning of the log, and how it works well once set up.

MangaTagger.log

Now I'm unsure if it's related to MangaTagger, but I also get folders full of png (so duplicate with the cbz files).
Screenshot_1

Other than that, it worked pretty well I think but in the end, if MangaTagger could just watch the folder without relying on FMD.exe path I think wouldn't get those issues?

@Ablex222
Copy link

I think where he was going with tying them together was to eliminate the problem that if you opened them out of order, everything didn't work. At the same time the program edits the settings of FMD to ensure everything comes out in the right formats. It sounds like though that because the software and FMD are hosted on different systems, that it may not have the permissions to delete the files created when its adding the .XML for repack. May be worth checking your Linux permissions.
You could also try joining the discord and asking him, but results may vary. Links on his twitch about page.
https://www.twitch.tv/inpacchi_of_mom/about

@Banh-Canh
Copy link

I agree, I don't expect too much support on this since my setup is a bit weird but I was pretty close to get it running so I thought it might be interesting and possible to make MangaTagger fully independent. Thanks

@Ablex222
Copy link

If you do get the dockerized container to work let me know. You can probably fork/pull the repo and try and remove the FMD reliant code and leave the part that watches a folder. At that point all that would be required would be to make sure the naming conventions are already setup. Looking at the edit history on github should give a idea as to what code was added to make FMD essential.

@Banh-Canh
Copy link

Banh-Canh commented Feb 25, 2021

I managed to make it work without FMD2 (edit the settings.json then just run MangaTagger.py and it will watch the folder).

But it seems it is having trouble if, in a container, the download directory and the library are mounted in two different volume on the host (but accessible from the MangaTagger container as "/manga" and "/downloads")
I get "OSError: [Errno 18] Invalid cross-device link:"
(see log.txt)

log.txt

Not sure what is happening.. in any case, I made it so it watch a folder without FMD2. Still have to correctly name the folder/files (configure it manually in FMD2).

EDIT: nevermind, got it working by using shutil.move() instead of os.rename() which it seems doesn't support differents files systems.
https://stackoverflow.com/questions/42392600/oserror-errno-18-invalid-cross-device-link

@Ablex222
Copy link

So does that mean that the core functionality now exists within docker? If so then this could be a major step forward in getting this similar to a handbrake auto transcoding situation.

@Banh-Canh
Copy link

Yes, my intended use is letting it run headless and watch a folder for any new item.
I'm pretty new to all this, I never even learnt Python to begin with but if you still want to take a look, here is the docker image I made and using : https://hub.docker.com/r/banhcanh/manga-tagger
Hope it helps

@Ablex222
Copy link

It may be interesting to try and incorporate this into the docker image.
https://github.com/manga-download/hakuneko/tree/v6.1.7
This runs in Linux and is generally equivalent to FMD. I have seen docker images like this one:
https://github.com/shlagevuk/docker-hakuneko
If both the containers could be merged, then essentially its near a complete all in one package. Only things missing would be the volume creation and photo pull which hopefully would come soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants