diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d9f1ebd1..dff44103 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,16 +14,16 @@ on:
- debug
push:
branches:
- - '*'
+ - "*"
paths-ignore:
- - '**.md'
- - '.github/**'
+ - "**.md"
+ - ".github/**"
pull_request:
branches:
- - 'master'
+ - "master"
paths-ignore:
- - '**.md'
- - '.github/ISSUE_TEMPLATE/**'
+ - "**.md"
+ - ".github/ISSUE_TEMPLATE/**"
env:
PLATFORMS: linux/amd64
@@ -36,10 +36,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+
+ - name: Update Version File
+ uses: ArabCoders/write-version-to-file@master
+ with:
+ filename: "/src/version.py"
+ placeholder: "dev-master"
+
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
+
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
+
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
@@ -52,6 +61,7 @@ jobs:
type=raw,value={{branch}}{{base_ref}}-{{date 'YYYYMMDD'}}-{{sha}}
flavor: |
latest=false
+
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -69,3 +79,9 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
+
+ - uses: actions/delete-package-versions@v4
+ with:
+ package-name: "ytptube"
+ package-type: "container"
+ min-versions-to-keep: 5
diff --git a/README.md b/README.md
index 23e0fff3..a6c39a75 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,29 @@
Web GUI for [yt-dlp](https://github.com/yt-dlp/yt-dlp) with playlist & channel support. Allows you to download videos from YouTube and [dozens of other sites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md).
-YTPTube is a fork of [meTube](https://github.com/alexta69/metube) project by alexta69.
+YTPTube started as a fork of [meTube](https://github.com/alexta69/metube) project by alexta69. Since then it went under heavy changes, and it supports many new features.
+
+# YTPTube Features compared to meTube.
+* A built in video player that can play any video file regardless of the format.
+* New `/add_batch` endpoint that allow multiple links to be sent.
+* Re-Imagined the frontend and re-wrote the code in VueJS.
+* Switched out of binary file storage in favor of SQLite.
+* Handle live streams.
+
+### Tips
+Your `yt-dlp` config should include the following options for optimal working conditions.
+
+```json
+{
+ "windowsfilenames": true,
+ "continue_dl": true,
+ "live_from_start": true,
+ "format_sort": [
+ "codec:avc:m4a"
+ ]
+}
+```
+* Note, the `format_sort`, forces YouTube to use x264 instead of vp9 codec, you can ignore it if you want. i prefer the media in x264.
[](/sc_full.png)
diff --git a/app/main.py b/app/main.py
index e1a96792..e5b2f507 100644
--- a/app/main.py
+++ b/app/main.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
-import asyncio
import os
from src.Config import Config
+from version import APP_VERSION
from src.Notifier import Notifier
from src.DownloadQueue import DownloadQueue
from src.Utils import ObjectSerializer
@@ -27,6 +27,7 @@ class Main:
def __init__(self):
self.config = Config()
+ self.config.version = APP_VERSION
try:
if not os.path.exists(self.config.download_path):
@@ -92,7 +93,8 @@ class Main:
self.app,
host=self.config.host,
port=self.config.port,
- reuse_port=True
+ reuse_port=True,
+ print=lambda _: print(f'YTPTube v{self.config.version} - listening on http://{self.config.host}:{self.config.port}')
)
async def connect(self, sid, environ):
@@ -214,7 +216,8 @@ class Main:
segmenter = Segments(
config=self.config,
segment_index=int(segment),
- segment_duration=float('{:.6f}'.format(float(sd if sd else M3u8.segment_duration))),
+ segment_duration=float('{:.6f}'.format(
+ float(sd if sd else M3u8.segment_duration))),
vconvert=True if vc == 1 else False,
aconvert=True if ac == 1 else False
)
diff --git a/app/version.py b/app/version.py
new file mode 100644
index 00000000..646ec0bd
--- /dev/null
+++ b/app/version.py
@@ -0,0 +1 @@
+APP_VERSION = "dev-master"
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index cd408b9f..b88c63b6 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -13,7 +13,7 @@
-
+