Release [Module] youtube-dl - multi-site playable URL resolver
Where I am at:

After much internal debate, I decided to leave script.module.youtube.dl alone and create script.module.yt-dlp in its place. I did this for several reasons:
  1. I do not like addons putting exported code in lib, but rather a child directory with something identifying it what it belongs to. I'm concerned that the namespace (top level python path) could get a bit cluttered.
  2. Along with the previous change, the imports had to change as well. Sigh. Sorry.
  3. There were some who were using an older version on python 2 kodi, and I suppose wanted the door open to continue updating it.
So all in all, I decided to reduce the amount of disruption.

Progress so far:
  1. The port to the new yt-dlp lib is not so bad.
  2. The problem is that there seem to be a backlog of problems in the YouTubeDL wrapper code. Many of these appear to be due to the Python 3 migration. I have found places where strings are being converted to hex and back when they don't need to. It is also common to not specify encoding options on file operations.
  3. My big accomplishment today was to be able to download something playing on Youtube using the YouTubeDL-Control app. Never mind that the file name is very long garbage, etc. The main thing is that it sort of worked.
The plan is to continue pecking at the problems. I'll undoubtedly release prior to everything being fixed because I'm not that familiar with the code. I actually use it by calling the yt-dlp code directly and ignoring the Youtube.dl wrapper code.  Still, I can see value in the wrapper, once it works right.

Working on this did bring up a recent concern that I have with Kodi addons. There is a bug which a draconian fix was put in. It impacts locale, etc. In particular, it broke unicode characters in filenames. The work around is easy enough (encode the file path on file open to utf-8). But this may nab a number of people. Time will tell. It also causes locale.getdefaultlocale and getPreferredEncoding to behave less than perfectly. UTF-8 still works, but there are some subtle edge cases.

I'll try to have a workable version within a week. Some day I'll get to release RandomTrailers.
Reply


Messages In This Thread
v14.810.0 - by ruuk - 2014-08-11, 19:45
v14.925.0 - by ruuk - 2014-09-25, 17:49
v14.1026.0 - by ruuk - 2014-10-26, 21:53
v14.1210.0 - by ruuk - 2014-12-10, 23:32
v14.1210.1 - by ruuk - 2014-12-11, 21:17
v15.318.0 - by ruuk - 2015-04-02, 23:01
v15.1123.0 - by ruuk - 2015-11-23, 21:20
v15.1124.0 - by ruuk - 2015-11-24, 21:05
v15.1223.0 - by ruuk - 2015-12-23, 22:27
v16.306.0 - by ruuk - 2016-03-13, 19:05
v16.318.0 - by ruuk - 2016-03-21, 20:31
v16.327.0 - by ruuk - 2016-03-31, 01:12
v16.521.0 - by ruuk - 2016-05-22, 18:15
v16.627.0 - by ruuk - 2016-06-28, 20:38
v16.1026.0 - by ruuk - 2016-10-28, 18:32
v17.310.0 - by ruuk - 2017-03-11, 23:47
v17.518.0 - by ruuk - 2017-05-21, 08:53
v17.518.1 - by ruuk - 2017-05-25, 04:00
v17.709.0 - by ruuk - 2017-07-11, 03:00
v17.1228.0 - by ruuk - 2017-12-28, 22:46
v17.1231.0 - by ruuk - 2018-01-01, 05:46
v18.320.0 - by ruuk - 2018-03-25, 02:07
v18.425.0 - by ruuk - 2018-04-28, 02:53
v14.1217.0 - by ruuk - 2014-12-27, 21:12
RE: Script Error Message - by ruuk - 2016-04-14, 13:15
RE: v16.1026.0 - by Lunatixz - 2016-10-28, 20:25
L0RE - by L0RE - 2017-12-19, 14:34
RE: [Module] youtube-dl - multi-site playable URL resolver - by fbacher - 2022-01-19, 21:36
Script Error Message - by eondesigns1138 - 2016-04-08, 10:46
Error python dependency 2.25.0 - by Alyy - 2016-05-21, 10:45
Logout Mark Read Team Forum Stats Members Help
[Module] youtube-dl - multi-site playable URL resolver2