From 7638a2ae8cd18e0ea0ded9cdc6b4b0433e3459d6 Mon Sep 17 00:00:00 2001 From: Jawish Hameed Date: Fri, 30 Jun 2023 00:42:48 +0800 Subject: [PATCH] feat: update sources --- .gitattributes | 4 +++ .github/workflows/publish.yml | 47 ++++++++++++++++++++++++ .gitignore | 67 +++-------------------------------- addon.py | 47 ++++++++---------------- addon.xml | 7 ++-- 5 files changed, 73 insertions(+), 99 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/publish.yml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ed29b4d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +.gitignore export-ignore +.gitattributes export-ignore +.github export-ignore +.git export-ignore \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8faae74 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Kodi Addon-Submitter + +on: + push: + tags: + - v* + +jobs: + kodi-addon-submitter: + runs-on: ubuntu-latest + name: Kodi addon submitter + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Generate distribution zip and submit to official kodi repository + id: kodi-addon-submitter + uses: xbmc/action-kodi-addon-submitter@v1.3 + with: # Replace all the below values + kodi-repository: repo-plugins + kodi-version: matrix + addon-id: plugin.video.maldivestv + kodi-matrix: false # Submit a Python 2/3 compatible addon to matrix branch in addition to the target branch + sub-directory: false + env: # Make sure you create the below secrets (GH_TOKEN and EMAIL) + GH_USERNAME: ${{ github.actor }} + GH_TOKEN: ${{secrets.GH_TOKEN}} + EMAIL: ${{secrets.EMAIL}} + - name: Create Github Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Addon zip to github release + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.kodi-addon-submitter.outputs.addon-zip }} + asset_name: ${{ steps.kodi-addon-submitter.outputs.addon-zip }} + asset_content_type: application/zip \ No newline at end of file diff --git a/.gitignore b/.gitignore index 92c2af4..728a6ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,63 +1,4 @@ -# Created by .gitignore support plugin (hsz.mobi) -### Python template -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -venv2/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -#lib/ -#lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml -coverage.xml - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# PyCharm project files -.idea/ - -*.zip +.vscode +*.pyo +*.pyc +.history \ No newline at end of file diff --git a/addon.py b/addon.py index 5091468..25cf610 100644 --- a/addon.py +++ b/addon.py @@ -4,8 +4,7 @@ # Created on: 30.03.2018 import sys -from urllib import urlencode -from urlparse import parse_qsl +from urllib.parse import urlencode, parse_qsl import xbmcgui import xbmcplugin @@ -16,41 +15,23 @@ VIDEOS = [ {'name': 'TVM', - 'thumb': 'http://play.mv/stb/item/tvlive1/198.png', - 'video': 'http://feed.play.mv/live/1000/10001/master.m3u8'}, + 'video': 'https://54.169.75.117:1935/live/livestream/playlist.m3u8'}, {'name': 'RaajjeTV', - 'thumb': 'http://play.mv/stb/item/tv_live1/199.png', - 'video': 'http://feed.play.mv/live/1000/10005/master.m3u8'}, - {'name': 'Channel 13 HD', - 'thumb': 'http://play.mv/stb/item/tv_live1/200.png', - 'video': 'http://feed.play.mv/live/1000/10003/master.m3u8'}, + 'video': 'https://stream.raajje.mv/live/rtv_live/index.m3u8'}, {'name': 'Munnaaru', - 'thumb': 'http://play.mv/stb/item/tvlive1/201.png', - 'video': 'http://feed.play.mv/live/1002/10026/master.m3u8'}, + 'video': 'https://w1.viastreaming.net:1935/munnaar/live/playlist.m3u8'}, {'name': 'VTV', - 'thumb': 'http://play.mv/stb/item/tv_live1/202.png', - 'video': 'http://feed.play.mv/live/1000/10006/master.m3u8'}, + 'video': 'https://vtvstream.vnews.mv/vtvlive/vmedia/playlist.m3u8'}, {'name': 'YES', - 'thumb': 'http://play.mv/stb/item/tv_live1/203.png', - 'video': 'http://feed.play.mv/live/1000/10002/master.m3u8'}, - {'name': 'MVtv HD', - 'thumb': 'http://play.mv/stb/item/tvlive1/204.png', - 'video': 'http://feed.play.mv/live/1006/10065/master.m3u8'}, - {'name': 'SanguTV HD', - 'thumb': 'http://play.mv/stb/item/tv_live1/213.png', - 'video': 'http://feed.play.mv/live/1001/10012/master.m3u8'}, + 'video': 'https://w1.viastreaming.net:1935/yestv/live/playlist.m3u8'}, {'name': 'SunTV', - 'thumb': 'http://play.mv/stb/item/tvlive1/233.png', - 'video': 'http://feed.play.mv/live/1001/10017/master.m3u8'}, - {'name': 'GO Plus HD', - 'thumb': 'http://play.mv/stb/item/tvlive1/344.png', - 'video': 'http://feed.play.mv/live/1007/10079/master.m3u8'}, - {'name': 'PSM News HD', - 'thumb': 'http://play.mv/stb/item/tvlive1/352.png', - 'video': 'http://feed.play.mv/live/1006/10066/master.m3u8'}, - {'name': 'Al Kaun HD', - 'thumb': 'http://play.mv/stb/item/tvlive1/355.png', - 'video': 'http://feed.play.mv/live/1005/10053/master.m3u8'} + 'video': 'https://sstv.ssplay.mv/hls/sstv-live/index.m3u8'}, + {'name': 'PSM News', + 'video': 'https://ec2-54-254-194-192.ap-southeast-1.compute.amazonaws.com:1935/live/smil:newslive.smil/playlist.m3u8'}, + {'name': 'Maldives TV', + 'video': 'https://58bdd3c8ef31c.streamlock.net/live/smil:maldivestv.smil/playlist.m3u8'}, + {'name': 'Majlis TV', + 'video': 'https://fl1.viastreaming.net:1935/majlis/livestream/playlist.m3u8'} ] @@ -100,7 +81,7 @@ def list_videos(): # Set graphics (thumbnail, fanart, banner, poster, landscape etc.) for the list item. # Here we use the same image for all items for simplicity's sake. # In a real-life plugin you need to set each image accordingly. - list_item.setArt({'thumb': video['thumb'], 'icon': video['thumb'], 'fanart': video['thumb']}) + # list_item.setArt({'thumb': video['thumb'], 'icon': video['thumb'], 'fanart': video['thumb']}) # Set 'IsPlayable' property to 'true'. # This is mandatory for playable items! list_item.setProperty('IsPlayable', 'true') diff --git a/addon.xml b/addon.xml index 05e2315..3185eef 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,8 @@ - - + + - + + video