From 2965bdb38d4d9f1cb38d9c0e20d99e5f9c92a759 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 25 Apr 2022 04:02:37 +0200 Subject: [PATCH] Replace youtube-dl with yt-dlp --- modules/audio.nix | 19 ++++++++++++------- modules/software.nix | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/audio.nix b/modules/audio.nix index 4230762..3d0116d 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -1,6 +1,14 @@ { config, lib, pkgs, ... }: -{ +with pkgs; + +# HACK Replace youtube-dl with yt-dlp in mopidy-youtube +let + mopidy-youtube-yt_dlp = mopidy-youtube.overrideAttrs (old: rec { + propagatedBuildInputs = old.propagatedBuildInputs + ++ [ python3.pkgs.yt-dlp ]; + }); +in { # Configure pipewire as sound server services.pipewire = { enable = true; @@ -32,12 +40,8 @@ # Set up Mopidy services.mopidy = { enable = true; - extensionPackages = with pkgs; [ - mopidy-mpd - mopidy-youtube - mopidy-somafm - mopidy-local - ]; + extensionPackages = + [ mopidy-mpd mopidy-youtube-yt_dlp mopidy-somafm mopidy-local ]; configuration = '' [audio] mixer_volume = @@ -71,6 +75,7 @@ [youtube] allow_cache = true search_results = 50 + youtube_dl_package = yt_dlp [somafm] encoding = aac diff --git a/modules/software.nix b/modules/software.nix index c2109f4..2a46808 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -78,7 +78,7 @@ in { mpv patched-webtorrent-cli deluge - youtube-dl-light + yt-dlp-light calibre beets # File management