only add video-id to archive, when successful

Example:
no space left--> youtube-dl adds the id to archive, but the video isn't fully downloaded
Update YoutubeDL.py
Merge pull request #4501 from AndroKev/master

only add video-id to archive, when successful
YoutubeDL: style fix
[screencastomatic] Remove unused variable
[theplatform] Extract captions (Closes #4495)
[flake8] Ignore build/ directory

That directory is temporarily generated when building for PyPi and may be present if something goes wrong with the upload.
[dvtv] Add new extractor
Merge remote-tracking branch 'petrkutalek/dvtv'
[dvtv] PEP8 and correct format sorting (#4502)
Credit @petrkutalek for dvtv (#4502)