Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

One last push, can you add JPEG support? #183

Open
YukiSakuma opened this issue Feb 14, 2017 · 9 comments
Open

One last push, can you add JPEG support? #183

YukiSakuma opened this issue Feb 14, 2017 · 9 comments

Comments

@YukiSakuma
Copy link

YukiSakuma commented Feb 14, 2017

This is an excellent application for managing my local collection and a big thank you for this so I am trying to add a gallery but the images are in JPEG format but it always says "Unsupported file" so can you please add support for JPEG? I have another request too like adding Nhentai support but it's okay if you don't do the latter.

@rachmadaniHaryono
Copy link
Contributor

Note: Work on this program has been halted in favor of its successor HappypandaX (bugs and such won't be fixed)

Unfortunately that is the current state. In not quite sure with @pewpews, but You may contact @Evolution0 who have another latest fork version of happypanda,and he may provide another patch for your issue . (or ask someone on gitter.im, but that has the least possibility to succeed)

At the current state happypanda only support certain archive and image in folder. Another alternative you can use is to put your image in a folder, and let happypanda scan it.

@YukiSakuma
Copy link
Author

I did try adding the path in order for Happypanda to scan it but sadly it still can't add JPEG images

@twiddli
Copy link
Owner

twiddli commented Feb 14, 2017

@YukiSakuma .jpeg files are already supported.
Your files might've been mistagged. Try going through your log.
Also, for nhentai support, you'd have to wait for happypandax

@YukiSakuma
Copy link
Author

YukiSakuma commented Feb 15, 2017

15-02 07:59 INFO gallerydb Recevied gallery: b'J:/COMIC EROS'
15-02 07:59 INFO gallerydialog Sent gallery to model
15-02 07:59 INFO executors Generating thumbnail
15-02 07:59 INFO executors Generating thumbnail
15-02 07:59 INFO utils Getting image from folder
15-02 07:59 INFO app Populating DB from directory/archive
15-02 07:59 INFO fetch Gallery folder is not empty
15-02 07:59 INFO fetch Received 6 paths
15-02 07:59 INFO fetch Treating each subfolder as gallery
15-02 07:59 WARNING fetch Unsupported file: b'J:/COMIC EROS\0002_002.jpg'
15-02 07:59 WARNING fetch Unsupported file: b'J:/COMIC EROS\0003_003.jpg'
15-02 07:59 WARNING fetch Unsupported file: b'J:/COMIC EROS\0004_004.jpg'
15-02 07:59 WARNING fetch Unsupported file: b'J:/COMIC EROS\0005_005.jpg'
15-02 07:59 WARNING fetch Unsupported file: b'J:/COMIC EROS\0006_006.jpg'
15-02 07:59 INFO fetch Local search: OK
15-02 07:59 INFO fetch Created 0 items
15-02 07:59 ERROR app Populating DB from gallery folder: Nothing was added!
This is the log
I am using Happypanda v1.0

@twiddli
Copy link
Owner

twiddli commented Feb 15, 2017

shrug
here's a couple things you can do:

  • test if the files are corrupted
  • test if the files really are .jpg and not mistagged .png's or something else (though I'm sure this shouldn't be an issue for HP)

@YukiSakuma
Copy link
Author

YukiSakuma commented Feb 15, 2017

I downloaded the archive from panda.chaika.moe (I could send you the archive link if you want to test) and the images in the archive are in JPEG format but it finally worked when I changed the file extension to PNG but TRID says the image files (even the renamed to PNG) are still JPEG
I have another folder which contains JPEG images and Happypanda is able to add them though
I also downloaded from Nhentai but Happypanda couldn't add all of them that folder is a mix of PNG (but TRID says JPEG) and JPEG files
Update: Apparently the problem was Happypanda couldn't add the downloaded archive if using the Populate from directory option. Add a new gallery option works. It now added the Nhentai folder too
Is populate from directory a bug?

@Evolution0
Copy link
Contributor

Evolution0 commented Feb 15, 2017

Hm.. after some testing I am finding the populate function to be strangely inconsistent, Took a random manga archive, extracted it, and attempted to add it with the populate function; Unsupported file. Tried the archive itself and.. worked perfectly fine. Tried this with a few others and got the same result, populating from a directory is broken.

Seems create_gallery in fetch.py might be a bit wonky, I'll see if I can figure out why. Must be something before except NotADirectoryError: as archive handling seems to work fine.

Edit: On further examination the problem might just be in local, populating using a directory as a source is treating every individual file as a separate path. Sticking some logs in the try/except at the top seems to confirm this, it generates a list of "directories" (but its actually filenames) rather than simply using the chosen populate directory name as the path. If the populate function isn't meant to be used to create a gallery from a single folder some checks are probably in order to prevent accidentally doing so

Edit 2: Putting the extracted folder into another folder seems to fix this, which makes sense as its meant to populate the db with multiple galleries (folders with images) correct? Definitely some checks needed as it can be misleading (possibly check to see if there is at least one subdirectory?)

@YukiSakuma Can you be more clear on what you did? Did you attempt to populate from the archive? Was the archive in a folder? Was the archive extracted?

Also send me the link either on Gitter or email (On my profile)

@YukiSakuma
Copy link
Author

@Evolution0 Sorry, I meant the archive was already extracted to a folder when I tried to use the Populate from directory option. I messaged the download link on Gitter

@Evolution0
Copy link
Contributor

Evolution0 commented Feb 16, 2017

Yeah looks like the same issue I ran into, the function does not seem to be meant to be used on a single directory like that but multiple subdirectories. A quick check and redirection to the add new function would be best In this case I think.

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

No branches or pull requests

4 participants