Added Version

This commit is contained in:
ArabCoders 2023-12-01 00:36:52 +03:00
parent 12130b33d9
commit 8832231284
6 changed files with 64 additions and 12 deletions

View file

@ -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

View file

@ -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.
[![Short screenshot](/sc_short.png)](/sc_full.png)

View file

@ -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
)

1
app/version.py Normal file
View file

@ -0,0 +1 @@
APP_VERSION = "dev-master"

View file

@ -13,7 +13,7 @@
</div>
<button class="modal-close is-large" aria-label="close" @click="video_link = ''"></button>
</div>
<PageFooter />
<PageFooter :app_version="config?.app?.version" />
</template>
<script setup>

View file

@ -1,7 +1,7 @@
<template>
<div class="columns is-multiline mt-3">
<div class="column has-text-left">
{{Year}} © YTPtube
{{ Year }} © YTPtube - {{ app_version }}
</div>
<div class="column has-text-right">
<a href="https://github.com/ArabCoders/ytptube" target="_blank">
@ -12,5 +12,15 @@
</template>
<script setup>
import { defineProps } from 'vue'
const Year = new Date().getFullYear()
defineProps({
app_version: {
type: String,
required: true,
},
})
</script>