makedeb


yt-dlp-drop-in 2.1.1-1


Emulate youtube-dl executables and modules with yt-dlp

Click here to go back to the commit logs for yt-dlp-drop-in.

Commit:


Hash: 218ef57fe3747b3b3f459221080b09894c99e0ba

Message: Initial mpr release

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 4bb2642..ec197de 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,11 @@
-pkgbase = yt-dlp-drop-in
-	pkgdesc = Emulate youtube-dl executables with yt-dlp (youtube-dlp)
-	pkgver = 1.1
-	pkgrel = 1
-	arch = any
-	license = MIT
-	depends = yt-dlp
-	provides = youtube-dl
-	conflicts = youtube-dl
-	source = youtube-dl-hook.sh
-	sha256sums = 78e4e0ae75e40fea540afd65c4d45788a14b14611d358578cb7fa20e574efb8d
-
+generated-by = makedeb
 pkgname = yt-dlp-drop-in
+pkgbase = yt-dlp-drop-in
+pkgdesc = Emulate youtube-dl executables with yt-dlp
+pkgrel = 0
+pkgver = 2.0
+arch = any
+conflicts = youtube-dl
+depends = yt-dlp
+license = MIT
+provides = youtube-dl
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..be38999
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg
+src
+yt-dlp-drop-in_*
diff --git a/PKGBUILD b/PKGBUILD
index 75c5579..648da3d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,36 @@
-# Maintainer: Minmo <com dot gmail at maroboromike>
-# Contributor: Sematre <sematre at gmx dot de>
+# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
+# Contributor: Minmo (AUR) <com dot gmail at maroboromike>
+# Contributor: Sematre (AUR) <sematre at gmx dot de>
 
 pkgname=yt-dlp-drop-in
-pkgver=1.1
-pkgrel=1
-pkgdesc='Emulate youtube-dl executables with yt-dlp (youtube-dlp)'
+pkgver=2.0
+pkgrel=0
+pkgdesc='Emulate youtube-dl executables with yt-dlp'
 arch=('any')
 license=('MIT')
 depends=('yt-dlp')
 provides=('youtube-dl')
 conflicts=('youtube-dl')
-source=('youtube-dl-hook.sh')
-sha256sums=('78e4e0ae75e40fea540afd65c4d45788a14b14611d358578cb7fa20e574efb8d')
 
 package() {
-  install -Dm755 "youtube-dl-hook.sh" "${pkgdir}/usr/bin/youtube-dl"
+
+WRAPPER="#!/usr/bin/python3
+
+import sys
+from yt_dlp import *
+
+if __name__ == '__main__':
+
+    args=sys.argv.copy()
+    args.pop(0)
+    args=['--compat-options','youtube-dl']+args
+
+    main(args)"
+
+  mkdir -p "${pkgdir}/usr/lib/python3/dist-packages"
+  echo "$WRAPPER" > "${pkgdir}/usr/lib/python3/dist-packages/youtube_dl.py"
+  chmod 755 "${pkgdir}/usr/lib/python3/dist-packages/youtube_dl.py"
+
+  mkdir -p "${pkgdir}/usr/bin"
+  ln -Tfs "/usr/lib/python3/dist-packages/youtube_dl.py" "${pkgdir}/usr/bin/youtube-dl"
 }
diff --git a/youtube-dl-hook.sh b/youtube-dl-hook.sh
deleted file mode 100644
index b4f0839..0000000
--- a/youtube-dl-hook.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/usr/bin/yt-dlp --compat-options youtube-dl "$@"