twiddli / happypanda

A cross platform manga/doujinshi manager with namespace & tag support
http://pewpew.moe/project/happypanda
Other
168 stars 32 forks source link

Unloaded galleries added as duplicates #109

Closed shadeus closed 8 years ago

shadeus commented 8 years ago

First off, thanks for your work. The whole program, but especially the metadata fetcher is really great.

Found something new I think.

My Happypanda starts with 200/"total galleries" loaded when I launch it, and loads 200 more whenever I scroll to the bottom. If this is intentional it would be nice with an option to load all at launch.

1. Under 'Settings->Monitoring' I have checked ' Enable directory monitoring', but none of the others. Have one directory listed. So I just choose 'Scan for new galleries' whenever I want to add new galleries that I have put in that folder.

After launch HP loads 200 of 9999 galleries. If I scan for new galleries before scrolling to the bottom to load the rest, HP sees the unloaded galleries as new ones. If I then press 'add', I of course get a ton of duplicates. True duplicates, same name and folder location. I tested it a bit by scrolling to load 200/400/600 more galleries before searching. HP only sees the unloaded galleries as new. Same happens if I choose 'Populate from directory/archive' -> 'Directory'.

2. Search is not working until I load all the galleries. 'Search on return-key' not working at all. 'Regex' option selected, not autocomplete.


That was it. Can't get you a log file now, but I'll upload it in three days time if you need it. Using Win 7, hp v0.27, db v0.23 I'll be so bold as to end with an request.

An option to export the fetched metadata for each gallery and save it into each corresponding gallery folder. Some other applications saves something like a simple txt file just containing this:

TITLE: AUTHOR: ARTIST: TAGS: ns1:[tag1, tag2], ns2:[tag1, tag2], ns3:tag, tag4, tag5 etc.. DESCRIPTION:

And then the ability to read that offline file, and import the metadata back from such files. Maybe I'm asking a bit much, but that would really make the perfect library manager.

twiddli commented 8 years ago

My Happypanda starts with 200/"total galleries" loaded when I launch it, and loads 200 more whenever I scroll to the bottom. If this is intentional it would be nice with an option to load all at launch.

The lazy loading is intentional and galleries are loaded periodically in batches of 200. Though there should be no need to scroll to the bottom for it load more galleries. That should happen automatically. What happens if you open Happypanda and let it run for a while. Does it not load more than 200 galleries?

1

As you've already figured out, this happens because all galleries hasn't been loaded yet. The duplicate checking only checks for loaded galleries.

2

This was intentional but can easily be improved to allow searching before loading all galleries.

Happypanda already has limited support for files with metadata that I might improve later on. On gallery import, it looks for files named info.json and info.txt in the same folder/archive that are produced by Eze gallery downloader and HDoujin Downloader, respectively. Take a look at #53

shadeus commented 8 years ago

What happens if you open Happypanda and let it run for a while. Does it not load more than 200 galleries?

Tried it some more. Only loads 200.

Take a look at #53

How nice, didn't see that one.


Totally unrelated, but what kind of info gets saved when I export the database from Happypanda?

twiddli commented 8 years ago

Everything needed to restore you current data except gallery lists. That means.. gallery metadata and some page hashes to identify each galleries.

shadeus commented 8 years ago

Great, thanks.

twiddli commented 8 years ago

The limited gallery loading shouldn't happen anymore in v0.29.

shadeus commented 8 years ago

The limited gallery loading shouldn't happen anymore in v0.29.

Everything loads at launch now. Thanks.