On Tue 2024-12-10 00:17:43 +0200, Daniel Semyonov wrote: >>>>>> Yoni Rabkin writes:
> > Konstantin <reic...@gmail.com> writes: > >> Hello, > >> > >> Few years ago Yuchen Pei started to develop emms-info-ytdl (branch > >> info-ytdl), which provides info for links like: > >> https://www.youtube.com/watch?v=..... > >> > >> I do not know why these changes where not accepted in master. > >> Perhaps it is because ytdl is called synchronously, and therefore > >> emms-info-ytdl freezes Emacs. > > You would need to dive into these threads to read the backstory: > > https://lists.gnu.org/archive/html/emms-help/2022-03/msg00035.html > > https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00754.html > > If the situation has changed in the interim, I'm willing to reconsider > > merging it into Emms. > Using yt-dlp with Invidious or Piped just makes it redirect the requests > to Youtube, and I haven't looked too deep into it but there's still a > JavaScript interpreter included in yt-dlp which is imported by the > Youtube extractor (so it is very likely to still run JavaScript code > locally in order to function). > It's a shame really, as yt-dlp supports many sites other than Youtube, > but obviously using an info method in EMMS should never run non-free > code automatically. Instead of relying on youtube-dl or yt-dlp, why not just do it all in emacs? If you fetch a youtube video url (e.g. the rickroll video https://youtube.com/watch?v=dQw4w9WgXcQ) without executing any javascript (e.g. with wget), the resulting html includes all the video metadata info - just search for "var ytInitialPlayerResponse" and the json value that's assigned to it contains the video metadata needed by emms-info. > Daniel Best, Yuchen -- Dr Yuchen Pei | https://ypei.org | Timezone: UTC+10 PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 https://ypei.org/assets/ypei-pubkey.txt