-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Howdy,

This concept sounds like a great idea to share in #994151 as they try to decide what to do with the youtube-dl package. Given some[0] responses[1] on youtube-dl's bug tracker, I don't imagine picking up new versions will be an option any time soon.


Regards,
~Unit 193
Unit193 @ Libera
Unit193 @ OFTC

[0]: https://github.com/ytdl-org/youtube-dl/issues/31190
[1]: https://github.com/ytdl-org/youtube-dl/issues/28859#issuecomment-1158188788


On Mon, 01 Aug 2022 20:10:42 +0200 michel <okgomdjgbm...@gmail.com> wrote:
I fleshed out the proposal a bit more. The simplest possibillity is to make 
symlinks, of both
the executable and module, to pretend they are youtube-dl and the module 
youyube_dl. This way,
also python programs that load the module could work.

A little bit better is this little wraper. you link the exec and module to it.

------------------
#!/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)
--------------------


The compat options should improve the compatibility. Also, by using the cli 
options, it would
risk less of breaking over time and keeping a fix stupid proof. Maybe a final 
improvement,
would be to initialise the appropriate variable for the compatibility options, 
so that they
are active in the module also. This would have a higher risk of breaking.

I tested this with pafy(has an unrelated bug) and mpv on stable.

This should stay relevent, for a whille.
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCQAyFiEEjbPlhoZdK0orGFpcUAHhsJqjdEsFAmMNRzkUHHVuaXQxOTNA
dW5pdDE5My5uZXQACgkQUAHhsJqjdEsf/g//aAwJxAOk0ag1UATT2Qui85kUA2x0
BA+WQ6F4EijSjkmze1qhakR8Qlxc2BDJf5T7r/RMnagcqzRqrM+2j2smoNbTcxHd
fJfV9I2yPYgtAW+ieydqacWOSFHg+P1atG+MAgHJdV7klWAeyCFDnX4Bh2GvQeZF
PsXHPFHyK6WdsGXUiZyUz9workcW4w/wFVljp2mQi63aLDj835E9AZDMJgtJdfZV
x71H5hRoAGxvmjgp69C7D9bhVzJeFVw1I8KDII1Uga84hW5gPVrv8+tWElDVankm
fgOoc6pJ/nWDOaUulk/+DFztZ2CF+HoTn0i9yZt3Sz7XDJPV+ldY9O7Hz2iK77FL
5g+XzEJcK1cLsFDjjcLbLbf0HHU4inwl+ZzYkLuWR04TnzVMXSivFkDZF/JO+LtC
b3ASX37jKT8sV311hUxGzociyYFBVhrfj5N1hj2pUY5AUU2GkW/dOo5SVW4tyyKr
gPlJ9HgjwknPlKtTfJXgJvqqUuzdCvzdbsbDcrB77kLQfZI3Meb6XCQeT6yedavM
p4JRSdpM/3Q5GeyjNBQPM1B9QByNu2vyUwN3wsZmFjHSmUGDTtHf2IexGRxHhGzI
5tL1jDP2IEkv3sTDOCRJPWkXDYehPzwM6uzvuRY5wA80mJAS8cWI/NwzPSK7iZVn
rxInIT6l005IxwQ=
=pMQh
-----END PGP SIGNATURE-----

Reply via email to