Skip to content

Commit

Permalink
Use git submodules instead of having the ci add youtube-dl (#37)
Browse files Browse the repository at this point in the history
* Added youtube-dl and youtube-dlp (original shortname yt-dlp) as submodules

* Do not download and integrate youtube-dl (or forks) during the run of the github action (which releases this addon). Instead the new git submodules are used. Following the recommendation in the kodi wiki, they are stored in a subfolder called lib. Also removed the travis instructions to clean up a bit

* Create build-addon.yml

Make action checkout submodules as well
  • Loading branch information
nullket authored Nov 10, 2021
1 parent 1b305ef commit 65926be
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 58 deletions.
4 changes: 0 additions & 4 deletions .github/scripts/build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ git config --global user.email "tristanteufel@googlemail.com"
git config --global user.name "firsttris"

cd ..
# youtube_dl
wget ${YOUTUBE_DL}
unzip master.zip
cp -R youtube-dl-master/youtube_dl ${ADDON_NAME}
# clone repo
git clone https://${GH_REPO}
git clone https://${GH_REPO_PYTHON3}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
env:
GH_REPO: "github.com/firsttris/repository.sendtokodi.git"
GH_REPO_PYTHON3: "github.com/firsttris/repository.sendtokodi.python3.git"
YOUTUBE_DL: https://github.com/rg3/youtube-dl/archive/master.zip
VERSION: 0.1.${{github.run_id}}
ADDON_NAME: plugin.video.sendtokodi
REPO_NAME: repository.sendtokodi
Expand All @@ -18,5 +17,7 @@ jobs:
TOKEN: ${{secrets.PAT}}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- run: chmod +x ${GITHUB_WORKSPACE}/.github/scripts/build-script.sh
- run: ${GITHUB_WORKSPACE}/.github/scripts/build-script.sh
- run: ${GITHUB_WORKSPACE}/.github/scripts/build-script.sh
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "lib/youtube-dl"]
path = lib/youtube-dl
url = https://github.com/ytdl-org/youtube-dl.git
[submodule "lib/yt-dlp"]
path = lib/yt-dlp
url = https://github.com/yt-dlp/yt-dlp.git
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

Empty file added lib/__init__.py
Empty file.
1 change: 1 addition & 0 deletions lib/youtube-dl
Submodule youtube-dl added at a80358
1 change: 1 addition & 0 deletions lib/yt-dlp
Submodule yt-dlp added at 9ebf3c
2 changes: 1 addition & 1 deletion service.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def strptime(date_string, format):

patchYoutubeDL()

from youtube_dl import YoutubeDL
from lib.youtube-dl.youtube_dl import YoutubeDL


def showInfoNotification(message):
Expand Down

0 comments on commit 65926be

Please sign in to comment.