diff --git a/README.md b/README.md index 14a3d6c86..6e392c45c 100644 --- a/README.md +++ b/README.md @@ -263,8 +263,10 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo files (restart from beginning) --no-part Do not use .part files - write directly into output file - --no-mtime Do not use the Last-modified header to + --mtime Use the Last-modified header to set the file modification time + --no-mtime Do not use the Last-modified header to + set the file modification time (default) --write-description Write video description to a .description file --write-info-json Write video metadata to a .info.json @@ -482,16 +484,13 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo You can configure youtube-dl by placing any supported command line option to a configuration file. On Linux and macOS, the system wide configuration file is located at `/etc/youtube-dl.conf` and the user wide configuration file at `~/.config/youtube-dl/config`. On Windows, the user wide configuration file locations are `%APPDATA%\youtube-dl\config.txt` or `C:\Users\\youtube-dl.conf`. Note that by default configuration file may not exist so you may need to create it yourself. -For example, with the following configuration file youtube-dl will always extract the audio, not copy the mtime, use a proxy and save all videos under `Movies` directory in your home directory: +For example, with the following configuration file youtube-dl will always extract the audio, use a proxy and save all videos under `Movies` directory in your home directory: ``` # Lines starting with # are comments # Always extract audio -x -# Do not copy the mtime ---no-mtime - # Use this proxy --proxy 127.0.0.1:3128 diff --git a/youtube_dl/options.py b/youtube_dl/options.py index f6d2b0898..8fb219667 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -733,10 +733,14 @@ def parseOpts(overrideArguments=None): '--no-part', action='store_true', dest='nopart', default=False, help='Do not use .part files - write directly into output file') + filesystem.add_option( + '--mtime', + action='store_true', dest='updatetime', default=False, + help='Use the Last-modified header to set the file modification time') filesystem.add_option( '--no-mtime', - action='store_false', dest='updatetime', default=True, - help='Do not use the Last-modified header to set the file modification time') + action='store_false', dest='updatetime', + help='Do not use the Last-modified header to set the file modification time (default)') filesystem.add_option( '--write-description', action='store_true', dest='writedescription', default=False,