# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           python 1.0

# IMPORTANT: never update this port without verifying that it still works as expected.
# As the minimum, `-a SnapAnyVideoClient` must be tested.

github.setup        CharlesPikachu videodl 60a516494f192ce7cd967884622692c77b2926e2
# PyPi tarball is broken: FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
# python.rootname     videofetch
version             0.8.8
revision            0
epoch               1
categories-prepend  net multimedia
platforms           any
license             Apache-2
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         Lightweight video downloader
long_description    {*}${description} written in pure Python.
homepage            https://videofetch.readthedocs.io
checksums           rmd160  9eafbaf58a4e58b15110eec522a56ae7a4f7d6f3 \
                    sha256  70ac8c5f0063e129dcfcb3e44c2f798e5fa80d4e522d1e55443ec420566054cc \
                    size    22374792
github.tarball_from archive
supported_archs     noarch

python.default_version  313

depends_lib-append  port:freeproxy-py \
                    port:py${python.version}-beautifulsoup4 \
                    port:py${python.version}-bleach \
                    port:py${python.version}-brotli \
                    port:py${python.version}-click \
                    port:py${python.version}-cryptography \
                    port:py${python.version}-drissionpage \
                    port:py${python.version}-emoji \
                    port:py${python.version}-fake-useragent \
                    port:py${python.version}-filetype \
                    port:py${python.version}-json-repair \
                    port:py${python.version}-lxml \
                    port:py${python.version}-m3u8 \
                    port:py${python.version}-parsel \
                    port:py${python.version}-pathvalidate \
                    port:py${python.version}-platformdirs \
                    port:py${python.version}-prettytable \
                    port:py${python.version}-puremagic \
                    port:py${python.version}-pycryptodome \
                    port:py${python.version}-pycryptodomex \
                    port:py${python.version}-pywidevine \
                    port:py${python.version}-questionary \
                    port:py${python.version}-requests \
                    port:py${python.version}-rich \
                    port:py${python.version}-tldextract \
                    port:py${python.version}-tqdm

depends_run-append  path:bin/ffmpeg:ffmpeg \
                    port:n_m3u8dl-re-cpp \
                    port:py${python.version}-curl-cffi

# FIXME: https://github.com/CharlesPikachu/videodl/issues/58
notes "
    You may want to try different parsers manually, if default results do not satisfy.\
    Notice, that parsers may get picked non-deterministically.

    Based on limited testing, using `-a YouTubeVideoClient` fetches a low-res video,\
    while `-a SnapAnyVideoClient` with YouTube fetches a full-res one.

    With Facebook reels VideoFKVideoClient downloads lower quality video with audio,\
    while PVVideoClient omits audio track, but produces a better video.
"
