mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
Print *all* release notes
This commit is contained in:
parent
8271226a55
commit
3bf79c752e
1 changed files with 12 additions and 4 deletions
|
@ -77,10 +77,8 @@ def update_self(to_screen, verbose, filename):
|
||||||
|
|
||||||
to_screen(u'Updating to version ' + versions_info['latest'] + '...')
|
to_screen(u'Updating to version ' + versions_info['latest'] + '...')
|
||||||
version = versions_info['versions'][versions_info['latest']]
|
version = versions_info['versions'][versions_info['latest']]
|
||||||
if version.get('notes'):
|
|
||||||
to_screen(u'PLEASE NOTE:')
|
print_notes(version_info['versions'])
|
||||||
for note in version['notes']:
|
|
||||||
to_screen(note)
|
|
||||||
|
|
||||||
if not os.access(filename, os.W_OK):
|
if not os.access(filename, os.W_OK):
|
||||||
to_screen(u'ERROR: no write permissions on %s' % filename)
|
to_screen(u'ERROR: no write permissions on %s' % filename)
|
||||||
|
@ -158,3 +156,13 @@ def update_self(to_screen, verbose, filename):
|
||||||
return
|
return
|
||||||
|
|
||||||
to_screen(u'Updated youtube-dl. Restart youtube-dl to use the new version.')
|
to_screen(u'Updated youtube-dl. Restart youtube-dl to use the new version.')
|
||||||
|
|
||||||
|
def print_notes(versions, fromVersion=__version__):
|
||||||
|
notes = []
|
||||||
|
for v,vdata in sorted(versions.items()):
|
||||||
|
if v > fromVersion:
|
||||||
|
notes.extend(vdata.get('notes', []))
|
||||||
|
if notes:
|
||||||
|
to_screen(u'PLEASE NOTE:')
|
||||||
|
for note in notes:
|
||||||
|
to_screen(note)
|
||||||
|
|
Loading…
Reference in a new issue