mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
change 'extension-map' default
Replace all JPEG filename extensions with 'jpg'.
This commit is contained in:
parent
e5438b8a29
commit
9b1bd09454
@ -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…
Reference in New Issue
Block a user