diff --git a/.github/workflows/update-loc-badge.yml b/.github/workflows/update-loc-badge.yml new file mode 100644 index 0000000..5708373 --- /dev/null +++ b/.github/workflows/update-loc-badge.yml @@ -0,0 +1,29 @@ +name: Update Lines of Code Badge + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + update-loc-badge: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install cloc + run: sudo apt-get install -y cloc + + - name: Count Lines of Code + run: | + LOC=$(cloc . --json | jq '.SUM.code') + echo "{\"schemaVersion\": 1, \"label\": \"Lines of Code\", \"message\": \"$LOC\", \"color\": \"green\"}" > loc-badge.json + + - name: Commit and Push LOC Badge + run: | + git config --local user.name "GitHub Actions" + git config --local user.email "actions@github.com" + git add loc-badge.json + git commit -m "Update lines of code badge" || echo "No changes to commit" + git push \ No newline at end of file diff --git a/README.md b/README.md index 1a8aa6b..d5141af 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ PyPI Downloads + + Lines of Code +

# 📋 Table of Contents diff --git a/StreamingCommunity/Api/Site/1337xx/title.py b/StreamingCommunity/Api/Site/1337xx/title.py index bdf9b9e..06a5551 100644 --- a/StreamingCommunity/Api/Site/1337xx/title.py +++ b/StreamingCommunity/Api/Site/1337xx/title.py @@ -38,9 +38,7 @@ def download_title(select_title: MediaItem): # Define output path title_name = os_manager.get_sanitize_file(select_title.name) - mp4_path = os_manager.get_sanitize_path( - os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) - ) + mp4_path = os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) # Create output folder os_manager.create_path(mp4_path) diff --git a/StreamingCommunity/Api/Site/altadefinizionegratis/film.py b/StreamingCommunity/Api/Site/altadefinizionegratis/film.py index 204d98d..609802d 100644 --- a/StreamingCommunity/Api/Site/altadefinizionegratis/film.py +++ b/StreamingCommunity/Api/Site/altadefinizionegratis/film.py @@ -46,9 +46,7 @@ def download_film(select_title: MediaItem) -> str: # Define output path title_name = os_manager.get_sanitize_file(select_title.name) + ".mp4" - mp4_path = os_manager.get_sanitize_path( - os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) - ) + mp4_path = os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) # Get m3u8 master playlist master_playlist = video_source.get_playlist() diff --git a/StreamingCommunity/Api/Site/cb01new/film.py b/StreamingCommunity/Api/Site/cb01new/film.py index 11a1304..aa98e13 100644 --- a/StreamingCommunity/Api/Site/cb01new/film.py +++ b/StreamingCommunity/Api/Site/cb01new/film.py @@ -45,9 +45,7 @@ def download_film(select_title: MediaItem) -> str: # Define output path title_name = os_manager.get_sanitize_file(select_title.name) +".mp4" - mp4_path = os_manager.get_sanitize_path( - os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) - ) + mp4_path = os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) # Get m3u8 master playlist master_playlist = video_source.get_playlist() diff --git a/StreamingCommunity/Api/Site/ilcorsaronero/title.py b/StreamingCommunity/Api/Site/ilcorsaronero/title.py index 886de89..e32af4d 100644 --- a/StreamingCommunity/Api/Site/ilcorsaronero/title.py +++ b/StreamingCommunity/Api/Site/ilcorsaronero/title.py @@ -32,9 +32,7 @@ def download_title(select_title: MediaItem): # Define output path title_name = os_manager.get_sanitize_file(select_title.name) - mp4_path = os_manager.get_sanitize_path( - os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) - ) + mp4_path = os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", "")) # Create output folder os_manager.create_path(mp4_path) diff --git a/config.json b/config.json index 928ed1c..505eb34 100644 --- a/config.json +++ b/config.json @@ -82,7 +82,7 @@ "domain": "so" }, "cb01new": { - "domain": "video" + "domain": "mobi" }, "1337xx": { "domain": "to"