mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2025-12-06 02:30:50 -08:00
Add backwords compatibility for Matrix
This commit is contained in:
parent
198d321ad6
commit
27c3e0d13c
3 changed files with 77 additions and 4 deletions
61
.github/workflows/make-release.yml
vendored
61
.github/workflows/make-release.yml
vendored
|
|
@ -78,6 +78,45 @@ jobs:
|
|||
echo "filename=$filename" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
- name: Create Zip (Matrix)
|
||||
id: zip-matrix
|
||||
run: |
|
||||
git reset
|
||||
git checkout .
|
||||
git clean -fdx
|
||||
mv .git ..
|
||||
rm -rf .??*
|
||||
rm *.md
|
||||
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
|
||||
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
|
||||
xmlstarlet ed -L -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
|
||||
filename=${{ github.event.repository.name }}-${version}.matrix.1.zip
|
||||
cd ..
|
||||
zip -r $filename ${{ github.event.repository.name }}
|
||||
mv .git ${{ github.event.repository.name }}
|
||||
echo "filename=$filename" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
- name: Create Zip (Matrix-Unofficial)
|
||||
id: zip-unofficial-matrix
|
||||
run: |
|
||||
git reset
|
||||
git checkout .
|
||||
git clean -fdx
|
||||
git apply .patches/unofficial.patch
|
||||
mv .git ..
|
||||
rm -rf .??*
|
||||
rm *.md
|
||||
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
|
||||
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
|
||||
xmlstarlet ed -L -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
|
||||
filename=${{ github.event.repository.name }}-unofficial-${version}.matrix.1.zip
|
||||
cd ..
|
||||
zip -r $filename ${{ github.event.repository.name }}
|
||||
mv .git ${{ github.event.repository.name }}
|
||||
echo "filename=$filename" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
- name: Create Release
|
||||
id: create-release
|
||||
uses: actions/create-release@v1
|
||||
|
|
@ -111,3 +150,25 @@ jobs:
|
|||
asset_name: ${{ steps.zip-unofficial-nexus.outputs.filename }}
|
||||
asset_path: ${{ steps.zip-unofficial-nexus.outputs.filename }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload Zip (Matrix)
|
||||
id: upload-matrix
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||
asset_name: ${{ steps.zip-matrix.outputs.filename }}
|
||||
asset_path: ${{ steps.zip-matrix.outputs.filename }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload Zip (Matrix-Unofficial)
|
||||
id: upload-unofficial-matrix
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||
asset_name: ${{ steps.zip-unofficial-matrix.outputs.filename }}
|
||||
asset_path: ${{ steps.zip-unofficial-matrix.outputs.filename }}
|
||||
asset_content_type: application/zip
|
||||
|
|
|
|||
|
|
@ -10,7 +10,21 @@
|
|||
|
||||
import xbmcgui
|
||||
|
||||
from infotagger.listitem import ListItemInfoTag
|
||||
try:
|
||||
from infotagger.listitem import ListItemInfoTag
|
||||
except ImportError:
|
||||
class ListItemInfoTag:
|
||||
__slots__ = (__li__, )
|
||||
|
||||
def __init__(self, list_item):
|
||||
self.__li__ = list_item
|
||||
|
||||
def add_stream_info(self, *args, **kwargs):
|
||||
return self.__li__.addStreamInfo(*args, **kwargs)
|
||||
|
||||
def set_info(self, *args, **kwargs):
|
||||
return self.__li__.setInfo(*args, **kwargs)
|
||||
|
||||
|
||||
from ...items import VideoItem, AudioItem, UriItem
|
||||
from ... import utils
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
import xbmcgui
|
||||
import xbmcplugin
|
||||
|
||||
from infotagger.listitem import ListItemInfoTag
|
||||
|
||||
from ..abstract_provider_runner import AbstractProviderRunner
|
||||
from ...exceptions import KodionException
|
||||
from ...items import *
|
||||
|
|
@ -95,7 +93,7 @@ class XbmcRunner(AbstractProviderRunner):
|
|||
|
||||
item = xbmcgui.ListItem(label=directory_item.get_name(), offscreen=True)
|
||||
|
||||
info_tag = ListItemInfoTag(item, tag_type='video')
|
||||
info_tag = xbmc_items.ListItemInfoTag(item, tag_type='video')
|
||||
|
||||
# only set fanart is enabled
|
||||
if directory_item.get_fanart() and self.settings.show_fanart():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue