[KPhotoAlbum] Fwd: Re: Checking image file readability by MIME type, rather than file name

Martin Jost lists at majo.name
Mon May 14 08:47:42 BST 2007


Martin Hoeller schrieb:
> On Saturday, 12. Mai 2007 20:13 Martin Jost wrote:
>
>   
>> While you are at it, would it be possible please to store the md5
>> checksum for ignored photos and use them on scan ?
>>     
>
> That would be very expensive! KPA would have to read every single image on 
> the ignore list to calculate it's checksum!
>   
Hello,

maybe we are talking of different things here. (Or my text was simply
too short to explain well) As I just realized, there are at least two
ignore lists in KPA.
a.
One for photos KPA had scanned and shown, but the user decided to not
have them shown. Those are listed in the DB and marked explicitely as
ignored. At the moment no md5 sum is roceded for these in the DB.
b.
One listing file extensions.

I was thinking about the first case (a). And when thinking again now,
checking against MD5-sums would probably only be needed in the case
where new photos (path and/or file name unknown to KPA up until the
scan) are found.

Let me explain the use case:
[Sorry if I miss some point of the inner workings of KPA here. I'm
talking about my understanding, without being familiar with the source
code, but just with the UI and my experience with it. Please correct me
if needed]
1.
I have photos in the KPA database, some of them are explicitly ignored
by me. (Case a above)
2.
I rearrange the layout of the directory structure of the photos outside
KPA. This means the filename and md5 sum stay the same, but the path
changes.
3. When I now start KPA again, all photos with changed pathnames are
found by the scan for new images. If the file isn't ignored due to case
b KPA checks the new photos against the stored md5 sums and changes the
path name in the DB, when it finds a match. (This means that the check
is already done for all "known and shown" photos - the great majority of
all photos stored in the DB)
4. Because no md5 sums of the ignored photos (case a) are stored in the
DB, the ignored photos aren't recognized as "known and ignored". They
end up as new photos and the entries in the DB marking them as ignored,
still list the old pathname. So I have to either mark them as ignored
from the GUI once again or I have to hand edit the XML-DB file.

Note that in the case I'm talking about, "new images" are found, due to
the changed path, but KPA recognizes them as already known, due to the
stored md5 sum. What I would like to see is that, as soon as KPA finds
"new" photos, it should not only compare them to the known and shown
photos, but also to the known and ignored. (this will need stored md5
sums of the ignored photos in the DB) Because the ignored photos are in
most cases a (very) small fraction of all the photos, this shouldn't
hurt the performance much. At the same time the whole check is only
needed if  new photos are found at startup.

Do I miss something here ? (E.g. are there use cases there the count of
ignored photos (case a) is in the order of known and shown photos in the
DB ?)
Are we talking about different things  ?

Martin






More information about the Kphotoalbum mailing list