Verification des médias - Générer sans effet (Media Verify tool - Generate has no effect)

Bonjour,

Peut être ai je mal compris l’utilisation de l’outil “Vérification des médias” et notamment l’usage du bouton Générer?

J’ai 1886 médias dans la catégorie “Médias”
Un filtre permet de constater que 712 n’ont pas l’attribut md5 initialisés
Je pensais qu’en utilisant l’outil avec l’option “Générer” j’aurais fait en sorte que tous mes médias est un attribut md5

C’est pas le cas ???

J’utilise Gramps 5.2.3 sur une distribution KDE Neon 6

Google Translate

Hello,

Maybe I misunderstood the use of the “Media Check” tool and in particular the use of the
Generate ?

I have 1886 media in the “Media” category
A filter allows to see that 712 do not have the md5 attribute initialized
I thought that by using the tool with the “Generate” option I would have made sure that all my media has an md5 attribute

Isn’t that the case???

I am using Gramps 5.2.3 on a KDE Neon 6 distribution

The Generate option updates the checksum in the Media Verify addon. The tool has always worked for me to update checksums after editing an image after it has already been added to Gramps.

Gramps stores the 32 digit code in the field checksum

I am unaware of any filter that finds missing information in this field. Are you using the isotammi filtering tool? if so, please provide your filter rules.

The Tools → Utilities → Media Verify… tool did not add any “MD5” attribute (nor add a 128-bit hash value for said attributes) when testing the Generate with the media of the Example.gramps sample tree. It that where Media MD5 checksums are supposed to be visible in the GUI?

Since I do not have any Media objects with such an Attribute, I cannot validate the following custom filter. (And it might need to use RegEx parameters to find any value):

To be clear. When the Generate option is selected, the Progress Bar will display that it is working. Once completed, the PB disappears but no report or any other display is generated.

@bjc49
Ces 712 fichiers multimédias utilisent-ils le chemin Media Base ?

[en Anglais: Do those 712 media files use the Media Base Path?]

The Media Verify Tool tool assumes that you store all your media files under a media directory. You can specify this directory by setting the Base path for relative media paths in the General tab, under the Edit → Preferences menu option.

Oui
Tous ces médias sont bien sous le répertoire de base (chemin définis en relatif)
Sinon je pense qu’ils n’apparaîtraient pas dans la vue “Mèdias” ?
Mon filtre sur l’attribut sur la non existence d’un attribut md5=xxxxxx n’était pas correct dans mon premier message
Ci joint le filtre que j’utilise avec regex
Si je le relance après l’action “Genérer” rien n’évolue ??

Non, ce n’est pas vrai. La vue de la catégorie Média s’en fiche. Un chemin de fichier valide peut être relatif ou absolu. Mais les « chemins relatifs » font une grande différence dans la gestion des fichiers et lors de la réalisation (ou de l’importation) de sauvegardes.

[No. That is not true. The Media category view does not care. A valid filepath can relative or absolute. But “Relative Paths” make a big difference in file management and when making (or importing) backups.]

C’était juste une précision du contexte pas une justification
Je crois que je ne comprends plus rien a l’usage de cet outil
Par exemple sur ce cas précis(ci joint) :
J’ai vérifier qu’une checksum existait bien dans le xml et malgré une action du bouton Générer aucun attribut md5 n’a été initialiser

Media Verify DOES NOT create an attribute attached to the media record’s GUI record. Checksums are completely hidden in the Gramps background just like the Gramps object handle.

Checksum values are stored in the normal process of adding a media record in Gramps. In the normal process, the checksum stored in Gramps and the raw media record on the hard drive remain unchanged. However, on occasion, the raw media record may be edited by being cropped or a better-quality image is found to replace the original. The MV Generate option updates the Gramps record’s checksum so it agrees with the image file.

FYI: The Gramps Check and Repair will also update the stored checksum information.

I have used MV many times and with more than 27K media records, not one of them has any Attribute displaying the checksum value. I know the checksum exists but seeing the checksum value is not something I need to care about.

Checksums are important when using the MV’s Verify option. This option scans all media records in the Base media path and compares those results with the records in the Gramps media list. MV uses the checksums to find any records that have been renamed and/or moved to a new location. Using the checksum MV can Fix the information in the record’s Path field.

1 Like

I believe you very willingly

The early versions of Media Verify stored the checksum in an attribute. When it became clear that the tool was useful we moved it into the media object.

2 Likes

Is there a rule that can be used to find Media objects with/without an MD5?

From the info above, the OP ought to clean the Tree of Attribute MD5 data where object MD5 data exists.

Now that I know that this attribute is obsolete how to remove it for the hundreds of media that are initialized because manually it would take me a lot of time.
To find the media; I think the filter above was correct:
Search for all media with the md5 attribute = “.*” regex choice checked.
Note:
1 - With the Cleanup tool you can remove the md5 attribute but without effect on the media already initialized
2 - A click on the “Generate” option of the MV tool will make it reappear?

I’m going to ask this question again because I don’t see a simple solution for me other than manual cleaning.
Especially since I noticed that this md5 attribute polluted the text reports which contain images

Unfortunately, correct.

There is the Set Attribute tool. Unfortunately, it only works on attributes attached directly to a person’s record. I tried modifying it to work on media records. Changing person and people in the code to media but it throws errors regarding filtering. I am not a coder. I can only hack what someone else has thought up. It is the Remove functionality that you seek in the tool.

Removing the attribute manually can be made easier if you alter the order of the tabs in the edit media window so the Attribute tab appears first and thus the default tab when editing.

Edit /gramps/gui/editors/editmedia.py

in the code at line 237 (5.2.3) is the code to create the Attributes tab

    self.attr_tab = MediaAttrEmbedList(
        self.dbstate,
        self.uistate,
        self.track,
        self.obj.get_attribute_list(),
        "media_editor_attributes",
    )
    self._add_tab(notebook, self.attr_tab)
    self.track_ref_for_deletion("attr_tab")

Move this section to occur before the section that creates the Source Citations tab at line 226

    self.citation_tab = CitationEmbedList(
        self.dbstate,
        self.uistate,
        self.track,
        self.obj.get_citation_list(),
        "media_editor_citations",
        self.get_menu_title(),
    )
    self._add_tab(notebook, self.citation_tab)
    self.track_ref_for_deletion("citation_tab")

Now you can filter your media records that have the MD5 attribute. If you select twenty of the records together in the list and right-click and select Edit, all twenty edit windows will open stacked up. As you delete the offending attribute and save the record, the next window in the cue presents itself to be edited. These stacked edit windows only work if you are making the same edits to each record. Relatively quickly you can have 100 record cleaned and soon the 1000+ that need to be done. Stacking too many open edit windows will clog the memory.

A third alternative is if someone (not me) can tell you how the Isotammi SuperTool may be able to accomplish your goal.

Thanks Dave
That’s what I’m going to do
I’m not a coder either
I have the right filter, all I have to do is …
Nb:
1 - There is the Cleanup tool
If I understand correctly, you can remove the md5 attribute but not the already initialized records
1 - I also thought I noticed that this attribute will be recreated anyway when using the Verify Media tool (Generate button) even though it no longer seems useful
All this … to be confirmed … because I may not have understood everything

The solution with Supertool was provided to me by Jean Michault (jmichault) on a French-speaking forum that I have been frequenting for a few years
https://www.geneanet.org/forum/viewtopic.php?p=2657747#p2657747
I had to choose the lowercase writing md5
So solved for me
Thanks for your help
A single remark: if md5 is obsolete why is it recreated by the Verify Media tool

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.