fix: remove ghproxy domain. #53

This commit is contained in:
cxfksword 2023-11-25 09:44:57 +08:00
parent 7a214962a5
commit 2655f025cc
5 changed files with 21 additions and 25 deletions

View File

@ -55,13 +55,13 @@ jobs:
destination_dir: ${{ env.artifact }}
publish_branch: master
publish_dir: ./artifacts
# - name: Publish release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: ./artifacts/${{ env.artifact }}_*.zip
# tag: ${{ github.ref }}
# file_glob: true
- name: Publish release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./artifacts/${{ env.artifact }}_*.zip
tag: ${{ github.ref }}
file_glob: true
# - name: Publish manifest
# uses: svenstaro/upload-release-action@v2
# with:

3
.gitignore vendored
View File

@ -5,6 +5,5 @@ obj/
artifacts
**/.DS_Store
metashark/
manifest_cn.json
manifest.json
*.json
.vscode

View File

@ -16,11 +16,7 @@ jellyfin电影元数据插件影片信息只要从豆瓣获取并由TheMov
只支持最新的`jellyfin 10.8.x`版本
添加插件存储库:
国内加速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
添加插件存储库https://jellyfin-plugin-release.pages.dev/metashark/manifest.json
## 如何使用

View File

@ -9,6 +9,7 @@ from datetime import datetime
from urllib.request import urlopen
from urllib.error import HTTPError
def generate_manifest():
return [{
"guid": "9a19103f-16f7-4668-be54-9a1e7a4f7556",
@ -17,7 +18,7 @@ def generate_manifest():
"overview": "jellyfin电影元数据插件",
"owner": "cxfksword",
"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": []
}]
@ -26,7 +27,7 @@ def generate_version(filepath, version, changelog):
'version': f"{version}.0",
'changelog': changelog,
'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),
'timestamp': datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
}
@ -39,7 +40,7 @@ def md5sum(filename):
def main():
filename = sys.argv[1]
tag = sys.argv[2]
version = tag.removeprefix('v')
version = tag.lstrip('v')
filepath = os.path.join(os.getcwd(), filename)
result = subprocess.run(['git', 'tag','-l','--format=%(contents)', tag, '-l'], stdout=subprocess.PIPE)
changelog = result.stdout.decode('utf-8').strip()
@ -54,18 +55,19 @@ def main():
else:
raise
# 追加新版本
# 追加新版本/覆盖旧版本
manifest[0]['versions'] = list(filter(lambda x: x['version'] == version, manifest[0]['versions']))
manifest[0]['versions'].insert(0, generate_version(filepath, version, changelog))
with open('manifest.json', 'w') as f:
json.dump(manifest, f, indent=2)
# 国内加速
with open('manifest_cn.json', 'w') as f:
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/releases/download/v[0-9.]+', "https://jellyfin-plugin-release.pages.dev/metashark", manifest_cn)
f.write(manifest_cn)
# # 国内加速
# with open('manifest_cn.json', 'w') as f:
# 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/releases/download/v[0-9.]+', "https://jellyfin-plugin-release.pages.dev/metashark", manifest_cn)
# f.write(manifest_cn)
if __name__ == '__main__':

View File

@ -1 +0,0 @@
{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}