Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Aug 13, 2023
2 parents f3ae3e5 + 2d05e2c commit 02341a9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: pip3 install -r requirements.txt
- init: sudo apt update && sudo apt install ffmpeg -y
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"formation": {
"worker": {
"quantity": 1,
"size": "free"
"size": "eco"
}
},
"buildpacks": [
Expand All @@ -40,4 +40,4 @@
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git"
}
]
}
}
4 changes: 2 additions & 2 deletions ytdlbot/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def ytdl_download(url: str, tempdir: str, bm, **kwargs) -> list:
"--split=16",
]
formats = [
# webm and av01 are not streamable on telegram, so we'll extract mp4 and not av01 codec
"bestvideo[ext=mp4][vcodec!*=av01]+bestaudio[ext=m4a]/bestvideo+bestaudio",
# webm , vp9 and av01 are not streamable on telegram, so we'll extract mp4 and not av01 codec
"bestvideo[ext=mp4][vcodec!*=av01][vcodec!*=vp09]+bestaudio[ext=m4a]/bestvideo+bestaudio",
"bestvideo[vcodec^=avc]+bestaudio[acodec^=mp4a]/best[vcodec^=avc]/best",
None,
]
Expand Down
6 changes: 4 additions & 2 deletions ytdlbot/ytdl_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,10 @@ def link_checker(url: str) -> str:

if (
not PLAYLIST_SUPPORT
and re.findall(r"^https://www\.youtube\.com/channel/", Channel.extract_canonical_link(url))
or "list" in url
and (
re.findall(r"^https://www\.youtube\.com/channel/", Channel.extract_canonical_link(url))
or "list" in url
)
):
return "Playlist or channel links are disabled."

Expand Down

0 comments on commit 02341a9

Please sign in to comment.