mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Include version/date in changelog
This commit is contained in:
parent
d839b3a60a
commit
564982919d
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@ import xml.etree.ElementTree as ET
|
||||||
import yaml
|
import yaml
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
def indent(elem, level=0):
|
def indent(elem, level=0):
|
||||||
'''
|
'''
|
||||||
|
@ -52,11 +53,12 @@ addon_version = data.get('version')
|
||||||
root.attrib['version'] = f'{addon_version}-{py_version}'
|
root.attrib['version'] = f'{addon_version}-{py_version}'
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
date = datetime.today().strftime('%Y-%m-%d')
|
||||||
changelog = data.get('changelog')
|
changelog = data.get('changelog')
|
||||||
for section in root.findall('extension'):
|
for section in root.findall('extension'):
|
||||||
news = section.findall('news')
|
news = section.findall('news')
|
||||||
if news:
|
if news:
|
||||||
news[0].text = f'Changelog:\n{changelog}'
|
news[0].text = f'v{addon_version} ({date}):\n{changelog}'
|
||||||
|
|
||||||
# Format xml tree
|
# Format xml tree
|
||||||
indent(root)
|
indent(root)
|
||||||
|
|
Loading…
Reference in a new issue