mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.4k stars 931 forks source link

metadata json file downloaded twice with different name #4285

Closed ghbook closed 1 year ago

ghbook commented 1 year ago

Hi when i am downloading file from gfycat its downloading json metadata file twice Here is my config

{
    "extractor":
    {
        "base-directory": "F://dled-gallery-dl/",
        "directory": ["{category}"],
        "filename": "{category}_{id}{num:?_//}.{extension}",
        "postprocessors":[
            {
                "name": "metadata", 
                "event": "post", 
                "filename": "{category}_{id}.json",
                "skip": true
            }
        ],
        "redgifs":
        {
            "format": ["sd", "gif"]
        },
        "gfycat":
        {
            "filename": "redgifs_{gfyId}.{extension}",
            "directory": ["{category}"],
            "format": ["mobile"],
            "postprocessors":[
                {
                    "name": "metadata", 
                    "event": "post", 
                    "filename": "redgifs_{gfyId}.json",
                    "skip": true
                }
            ]
            },
    }
}
D:\>gallery-dl -v https://gfycat.com/bowedcourageouscommabutterfly-rhardcorenature
[gallery-dl][debug] Version 1.25.6
[gallery-dl][debug] Python 3.11.4 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 2.0.3
[gallery-dl][debug] Configuration Files ['%APPDATA%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://gfycat.com/bowedcourageouscommabutterfly-rhardcorenature'
[gfycat][debug] Using GfycatImageExtractor for 'https://gfycat.com/bowedcourageouscommabutterfly-rhardcorenature'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.gfycat.com:443
[urllib3.connectionpool][debug] https://api.gfycat.com:443 "GET /v1/gfycats/bowedcourageouscommabutterfly HTTP/1.1" 200 806
[gfycat][debug] Active postprocessor modules: [MetadataPP, MetadataPP]
# F:\\dled-gallery-dl\gfycat\redgifs_bowedcourageouscommabutterfly.mp4
Files downloaded:
redgifs_bowedcourageouscommabutterfly.mp4
redgifs_bowedcourageouscommabutterfly.json
gfycat_None.json

Unfortunately gfycat uses gfyId instead of id so i have to define postprocessor inside the extractor again.

gfycat_None.json should not have downloaded.

mikf commented 1 year ago

You have two metadata post processors active as indicated by [gfycat][debug] Active postprocessor modules: [MetadataPP, MetadataPP]

Disable the general one for gfycat by adding "blacklist": ["gfycat"] to its settings.

ghbook commented 1 year ago

You have two metadata post processors active as indicated by [gfycat][debug] Active postprocessor modules: [MetadataPP, MetadataPP]

Disable the general one for gfycat by adding "blacklist": ["gfycat"] to its settings.

thanks, it worked.