Skip to content

Commit

Permalink
0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
L2501 committed Jul 22, 2022
1 parent 440bff2 commit 2a0f3d4
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
matrix export-ignore
.github export-ignore
.gitignore export-ignore
.gitattributes export-ignore
README.md export-ignore
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on:
push:
tags:
- 'v*'

name: Upload Release Asset

jobs:
build:
env:
ADDON_ID: "plugin.audio.m3sr2019"
GITHUB_REF: ${{ github.ref }}
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create zip name
id: create_name
run: echo ::set-output name=zip_name::${ADDON_ID}-${GITHUB_REF#refs/tags/v}.zip
- name: Create zip name Kodi 19
id: create_name_19
run: echo ::set-output name=zip_name::${ADDON_ID}-${GITHUB_REF#refs/tags/v}+matrix.1.zip
- name: Build project
working-directory: .
run: |
git archive --prefix=${ADDON_ID}/ -o artifact.zip -9 HEAD
cp artifact.zip artifact-matrix.zip
cd matrix && zip -r ../artifact-matrix.zip ${ADDON_ID}/addon.xml
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact.zip
asset_name: ${{ steps.create_name.outputs.zip_name }}
asset_content_type: application/zip
- name: Upload Release Asset Kodi 19
id: upload-release-asset-19
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact-matrix.zip
asset_name: ${{ steps.create_name_19.outputs.zip_name }}
asset_content_type: application/zip

2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.m3sr2019" name="MP3 Streams Reloaded" version="6" provider-name="MP3 Streams">
<addon id="plugin.audio.m3sr2019" name="MP3 Streams Reloaded" version="0.0.7" provider-name="MP3 Streams">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.beautifulsoup4" />
Expand Down
9 changes: 7 additions & 2 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
from future.backports.urllib.parse import quote_from_bytes as orig_quote
from future.backports.urllib.parse import unquote_to_bytes as orig_unquote

try:
from xbmcvfs import translatePath
except ImportError:
from kodi_six.xbmc import translatePath


def quote(s, safe=""):
return orig_quote(s.encode("utf-8"), safe.encode("utf-8"))
Expand All @@ -37,8 +42,8 @@ def unquote(s):
plugin = Plugin()
plugin.name = addon.getAddonInfo("name")

USER_DATA_DIR = xbmc.translatePath(addon.getAddonInfo("profile"))
MEDIA_DIR = os.path.join(xbmc.translatePath(xbmcaddon.Addon().getAddonInfo("path")), "resources", "media")
USER_DATA_DIR = translatePath(addon.getAddonInfo("profile"))
MEDIA_DIR = os.path.join(translatePath(xbmcaddon.Addon().getAddonInfo("path")), "resources", "media")
FANART = os.path.join(MEDIA_DIR, "fanart.jpg")
MUSICMP3_DIR = os.path.join(USER_DATA_DIR, "musicmp3")
if not os.path.exists(MUSICMP3_DIR):
Expand Down
26 changes: 26 additions & 0 deletions matrix/plugin.audio.m3sr2019/addon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.m3sr2019" name="MP3 Streams Reloaded" version="0.0.7" provider-name="MP3 Streams">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.beautifulsoup4" />
<import addon="script.module.six" />
<import addon="script.module.kodi-six" />
<import addon="script.module.future" />
<import addon="script.module.requests" />
<import addon="script.module.routing" />
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>audio</provides>
</extension>
<extension point="xbmc.addon.metadata">
<reuselanguageinvoker>true</reuselanguageinvoker>
<platform>all</platform>
<license>GPL-3.0</license>
<summary>A music streaming collection</summary>
<description>Browse, stream or download your favourite songs and albums</description>
<assets>
<icon>resources/media/icon.png</icon>
<fanart>resources/media/fanart.jpg</fanart>
</assets>
</extension>
</addon>

0 comments on commit 2a0f3d4

Please sign in to comment.