fix: remove ghproxy domain. #53
This commit is contained in:
parent
7a214962a5
commit
2655f025cc
|
@ -55,13 +55,13 @@ jobs:
|
||||||
destination_dir: ${{ env.artifact }}
|
destination_dir: ${{ env.artifact }}
|
||||||
publish_branch: master
|
publish_branch: master
|
||||||
publish_dir: ./artifacts
|
publish_dir: ./artifacts
|
||||||
# - name: Publish release
|
- name: Publish release
|
||||||
# uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
# with:
|
with:
|
||||||
# repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# file: ./artifacts/${{ env.artifact }}_*.zip
|
file: ./artifacts/${{ env.artifact }}_*.zip
|
||||||
# tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
# file_glob: true
|
file_glob: true
|
||||||
# - name: Publish manifest
|
# - name: Publish manifest
|
||||||
# uses: svenstaro/upload-release-action@v2
|
# uses: svenstaro/upload-release-action@v2
|
||||||
# with:
|
# with:
|
||||||
|
|
|
@ -5,6 +5,5 @@ obj/
|
||||||
artifacts
|
artifacts
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
metashark/
|
metashark/
|
||||||
manifest_cn.json
|
*.json
|
||||||
manifest.json
|
|
||||||
.vscode
|
.vscode
|
||||||
|
|
|
@ -16,11 +16,7 @@ jellyfin电影元数据插件,影片信息只要从豆瓣获取,并由TheMov
|
||||||
|
|
||||||
只支持最新的`jellyfin 10.8.x`版本
|
只支持最新的`jellyfin 10.8.x`版本
|
||||||
|
|
||||||
添加插件存储库:
|
添加插件存储库:https://jellyfin-plugin-release.pages.dev/metashark/manifest.json
|
||||||
|
|
||||||
国内加速:https://gh-proxy.com/https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest_cn.json
|
|
||||||
|
|
||||||
国外访问:https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest.json
|
|
||||||
|
|
||||||
## 如何使用
|
## 如何使用
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ from datetime import datetime
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
|
|
||||||
|
|
||||||
def generate_manifest():
|
def generate_manifest():
|
||||||
return [{
|
return [{
|
||||||
"guid": "9a19103f-16f7-4668-be54-9a1e7a4f7556",
|
"guid": "9a19103f-16f7-4668-be54-9a1e7a4f7556",
|
||||||
|
@ -17,7 +18,7 @@ def generate_manifest():
|
||||||
"overview": "jellyfin电影元数据插件",
|
"overview": "jellyfin电影元数据插件",
|
||||||
"owner": "cxfksword",
|
"owner": "cxfksword",
|
||||||
"category": "Metadata",
|
"category": "Metadata",
|
||||||
"imageUrl": "https://github.com/cxfksword/jellyfin-plugin-metashark/raw/main/doc/logo.png",
|
"imageUrl": "https://jellyfin-plugin-release.pages.dev/metashark/logo.png",
|
||||||
"versions": []
|
"versions": []
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@ -26,7 +27,7 @@ def generate_version(filepath, version, changelog):
|
||||||
'version': f"{version}.0",
|
'version': f"{version}.0",
|
||||||
'changelog': changelog,
|
'changelog': changelog,
|
||||||
'targetAbi': '10.8.0.0',
|
'targetAbi': '10.8.0.0',
|
||||||
'sourceUrl': f'https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/v{version}/metashark_{version}.0.zip',
|
'sourceUrl': f'https://jellyfin-plugin-release.pages.dev/metashark/metashark_{version}.0.zip',
|
||||||
'checksum': md5sum(filepath),
|
'checksum': md5sum(filepath),
|
||||||
'timestamp': datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
|
'timestamp': datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
|
||||||
}
|
}
|
||||||
|
@ -39,7 +40,7 @@ def md5sum(filename):
|
||||||
def main():
|
def main():
|
||||||
filename = sys.argv[1]
|
filename = sys.argv[1]
|
||||||
tag = sys.argv[2]
|
tag = sys.argv[2]
|
||||||
version = tag.removeprefix('v')
|
version = tag.lstrip('v')
|
||||||
filepath = os.path.join(os.getcwd(), filename)
|
filepath = os.path.join(os.getcwd(), filename)
|
||||||
result = subprocess.run(['git', 'tag','-l','--format=%(contents)', tag, '-l'], stdout=subprocess.PIPE)
|
result = subprocess.run(['git', 'tag','-l','--format=%(contents)', tag, '-l'], stdout=subprocess.PIPE)
|
||||||
changelog = result.stdout.decode('utf-8').strip()
|
changelog = result.stdout.decode('utf-8').strip()
|
||||||
|
@ -54,18 +55,19 @@ def main():
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# 追加新版本
|
# 追加新版本/覆盖旧版本
|
||||||
|
manifest[0]['versions'] = list(filter(lambda x: x['version'] == version, manifest[0]['versions']))
|
||||||
manifest[0]['versions'].insert(0, generate_version(filepath, version, changelog))
|
manifest[0]['versions'].insert(0, generate_version(filepath, version, changelog))
|
||||||
|
|
||||||
with open('manifest.json', 'w') as f:
|
with open('manifest.json', 'w') as f:
|
||||||
json.dump(manifest, f, indent=2)
|
json.dump(manifest, f, indent=2)
|
||||||
|
|
||||||
# 国内加速
|
# # 国内加速
|
||||||
with open('manifest_cn.json', 'w') as f:
|
# with open('manifest_cn.json', 'w') as f:
|
||||||
manifest_cn = json.dumps(manifest, indent=2)
|
# manifest_cn = json.dumps(manifest, indent=2)
|
||||||
manifest_cn = re.sub('https://github.com/cxfksword/jellyfin-plugin-metashark/raw/main/doc/logo.png', "https://jellyfin-plugin-release.pages.dev/metashark/logo.png", manifest_cn)
|
# manifest_cn = re.sub('https://github.com/cxfksword/jellyfin-plugin-metashark/raw/main/doc/logo.png', "https://jellyfin-plugin-release.pages.dev/metashark/logo.png", manifest_cn)
|
||||||
manifest_cn = re.sub('https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/v[0-9.]+', "https://jellyfin-plugin-release.pages.dev/metashark", manifest_cn)
|
# manifest_cn = re.sub('https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/v[0-9.]+', "https://jellyfin-plugin-release.pages.dev/metashark", manifest_cn)
|
||||||
f.write(manifest_cn)
|
# f.write(manifest_cn)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}
|
|
Loading…
Reference in New Issue