change 'extension-map' default

Replace all JPEG filename extensions with 'jpg'.
pull/1195/head
Mike Fährmann 4 years ago
parent e5438b8a29
commit 9b1bd09454
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1,5 +1,7 @@
# Changelog
## Unreleased
## 1.15.3 - 2020-11-13
### Additions
- [sankakucomplex] extract videos and embeds ([#308](https://github.com/mikf/gallery-dl/issues/308))

@ -188,8 +188,6 @@ extractor.*.extension-map
Type
``object``
Default
``null``
Example
.. code:: json
{
@ -200,7 +198,7 @@ Example
"jfi" : "jpg"
}
Description
A JSON ``object`` mapping filename extensions to alternatives.
A JSON ``object`` mapping filename extensions to their replacements.
extractor.*.skip

@ -717,6 +717,13 @@ class Formatter():
class PathFormat():
EXTENSION_MAP = {
"jpeg": "jpg",
"jpe" : "jpg",
"jfif": "jpg",
"jif" : "jpg",
"jfi" : "jpg",
}
def __init__(self, extractor):
filename_fmt = extractor.config("filename", extractor.filename_fmt)
@ -725,8 +732,7 @@ class PathFormat():
extension_map = extractor.config("extension-map")
if extension_map is None:
# TODO: better default value in 1.16.0
extension_map = {}
extension_map = self.EXTENSION_MAP
self.extension_map = extension_map.get
try:

@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.15.3"
__version__ = "1.16.0-dev"

Loading…
Cancel
Save