tweak: revert back cn domain. close #57
This commit is contained in:
parent
a1b8533376
commit
e3a4ea6d73
|
@ -44,18 +44,10 @@ jobs:
|
||||||
dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
|
dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll
|
zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll
|
||||||
cp ./doc/logo.png ./artifacts/logo.png
|
|
||||||
- name: Generate manifest
|
- name: Generate manifest
|
||||||
run: cd artifacts && python3 ../scripts/generate_manifest.py ${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ${GITHUB_REF#refs/*/}
|
run: python3 ./scripts/generate_manifest.py ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ${GITHUB_REF#refs/*/}
|
||||||
- name: Deploy to jellyfin release repo
|
env:
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
CN_DOMAIN: ${{ vars.CN_DOMAIN }}
|
||||||
with:
|
|
||||||
personal_token: ${{ secrets.PAT }}
|
|
||||||
external_repository: cxfksword/jellyfin-release
|
|
||||||
destination_dir: ${{ env.artifact }}
|
|
||||||
publish_branch: master
|
|
||||||
publish_dir: ./artifacts
|
|
||||||
keep_files: true
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -63,11 +55,11 @@ jobs:
|
||||||
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:
|
||||||
# repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# file: ./artifacts/manifest*.json
|
file: ./manifest*.json
|
||||||
# tag: "manifest"
|
tag: "manifest"
|
||||||
# overwrite: true
|
overwrite: true
|
||||||
# file_glob: true
|
file_glob: true
|
||||||
|
|
|
@ -72,7 +72,10 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (list.Count == 0)
|
||||||
|
{
|
||||||
this.Log($"Got images failed because the images of \"{item.Name}\" is empty!");
|
this.Log($"Got images failed because the images of \"{item.Name}\" is empty!");
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,13 @@ jellyfin电影元数据插件,影片信息只要从豆瓣获取,并由TheMov
|
||||||
|
|
||||||
只支持最新的`jellyfin 10.8.x`版本
|
只支持最新的`jellyfin 10.8.x`版本
|
||||||
|
|
||||||
添加插件存储库:https://jellyfin-plugin-release.pages.dev/metashark/manifest.json
|
添加插件存储库:
|
||||||
|
|
||||||
|
国内加速:https://mirror.ghproxy.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
|
||||||
|
|
||||||
|
> 如果无法访问,可以直接从 [Release](https://github.com/cxfksword/jellyfin-plugin-metashark/releases) 页面下载,并解压到 jellyfin 插件中目录使用
|
||||||
|
|
||||||
## 如何使用
|
## 如何使用
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ def generate_manifest():
|
||||||
"overview": "jellyfin电影元数据插件",
|
"overview": "jellyfin电影元数据插件",
|
||||||
"owner": "cxfksword",
|
"owner": "cxfksword",
|
||||||
"category": "Metadata",
|
"category": "Metadata",
|
||||||
"imageUrl": "https://jellyfin-plugin-release.pages.dev/metashark/logo.png",
|
"imageUrl": "https://github.com/cxfksword/jellyfin-plugin-metashark/raw/main/doc/logo.png",
|
||||||
"versions": []
|
"versions": []
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@ -27,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://jellyfin-plugin-release.pages.dev/metashark/metashark_{version}.0.zip',
|
'sourceUrl': f'https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/v{version}/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')
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ def main():
|
||||||
|
|
||||||
# 解析旧 manifest
|
# 解析旧 manifest
|
||||||
try:
|
try:
|
||||||
with urlopen('https://raw.githubusercontent.com/cxfksword/jellyfin-release/master/metashark/manifest.json') as f:
|
with urlopen('https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest.json') as f:
|
||||||
manifest = json.load(f)
|
manifest = json.load(f)
|
||||||
except HTTPError as err:
|
except HTTPError as err:
|
||||||
if err.code == 404:
|
if err.code == 404:
|
||||||
|
@ -63,11 +63,14 @@ def main():
|
||||||
json.dump(manifest, f, indent=2)
|
json.dump(manifest, f, indent=2)
|
||||||
|
|
||||||
# # 国内加速
|
# # 国内加速
|
||||||
# with open('manifest_cn.json', 'w') as f:
|
cn_domain = 'https://mirror.ghproxy.com/'
|
||||||
# manifest_cn = json.dumps(manifest, indent=2)
|
if 'CN_DOMAIN' in os.environ:
|
||||||
# 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)
|
cn_domain = os.environ["CN_DOMAIN"]
|
||||||
# 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)
|
cn_domain = cn_domain.rstrip('/')
|
||||||
# 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', f'{cn_domain}/https://github.com', manifest_cn)
|
||||||
|
f.write(manifest_cn)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue