Remove Yandex services & bookmarks.

This commit is contained in:
Dmitry Voronin 2024-10-07 10:42:23 +03:00
parent 3b0c69aa00
commit c5269f51f3
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
5 changed files with 2 additions and 75 deletions

View file

@ -102,7 +102,7 @@ in {
ManagedBookmarks = [
{ toplevel_name = "Pin"; }
(mkBookmark "Dashboard" "https://home.voronind.com")
(mkBookmark "Music" "https://music.yandex.ru")
(mkBookmark "Watch" "https://watch.voronind.com")
(mkBookmark "Telegram" "https://web.telegram.org/a")
(mkBookmark "Discord" "https://discord.com")
(mkBookmark "Mail" "https://mail.voronind.com")
@ -112,7 +112,6 @@ in {
(mkBookmark "WorkBoard" "https://support.fsight.ru")
(mkBookmark "Hass" "https://iot.voronind.com")
(mkBookmark "Cloud" "https://cloud.voronind.com")
(mkBookmark "Watch" "https://watch.voronind.com")
];
ExtensionUpdate = true;
ExtensionSettings = {

View file

@ -45,7 +45,7 @@
download = [ "/storage/hot/download" ];
manga = [ "/storage/cold_1/manga" "/storage/cold_2/manga" ];
movie = [ "/storage/cold_1/movie" "/storage/cold_2/movie" ];
music = [ "/storage/cold_2/music" "/storage/hot/music" ];
music = [ "/storage/cold_2/music" ];
paper = [ "/storage/hot/paper" ];
porn = [ "/storage/cold_2/porn" ];
photo = [ "/storage/hot/container/cloud/data/data/cakee/files/photo" "/storage/cold_1/backup/tmp/photo" ];

View file

@ -1,49 +0,0 @@
{ pkgs, util, lib, __findFile, ... }: let
storage = "/storage/hot/music";
package = import <package/yamusicdownload> { inherit pkgs; };
pattern = "#album-artist/#year_#album/#number_#title";
in {
systemd.user = {
services.yamusicdownload = let
script = pkgs.writeText "YaMusicDownloadScript" (util.trimTabs ''
[[ $UID = 0 ]] && exit 0
function notify_silent() {
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\",\"disable_notification\":\"true\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
}
cd ${storage}
output=$(${package}/bin/yandex-music-downloader --browser "firefox" --hq --add-lyrics --embed-cover --skip-existing --stick-to-artist --only-music --path-pattern "${pattern}" --url https://music.yandex.ru/users/cakee.ru/playlists/3)
if [[ $? = 0 ]]; then
notify_silent "Music download complete: ''${output}"
else
notify_silent "Music download failed. Capcha?"
fi
'');
in util.mkStaticSystemdService {
enable = true;
description = "Yandex Music Download.";
serviceConfig = {
Type = "oneshot";
ExecStart = "-${lib.getExe pkgs.bashInteractive} ${script}";
Restart = "on-failure";
};
path = with pkgs; [
curl
firefox-esr
python313
];
};
timers.yamusicdownload = {
timerConfig = {
OnCalendar = "daily";
Persistent = true;
Unit = "yamusicdownload.service";
};
wantedBy = [ "default.target" ];
};
};
}

View file

@ -84,7 +84,6 @@
onlyoffice-bin # Office documents app suite.
(mpv.override { scripts = [ mpvScripts.mpris ]; }) # Media player.
(pkgs.callPackage ./yamusicdownload {})
];
gaming = with pkgs; [

View file

@ -1,22 +0,0 @@
{ pkgs, ... }: with pkgs.python3Packages; buildPythonPackage {
version = "1.0.0";
pname = "yandex-music-downloader";
format = "pyproject";
propagatedBuildInputs = [
setuptools
setuptools-git
requests
eyed3
browser-cookie3
];
src = pkgs.fetchFromGitHub {
owner = "llistochek";
repo = "yandex-music-downloader";
rev = "08ea384869cbc31efb1e78b831e2356882219951";
hash = "sha256-WOFesD7HjskyqHaXZAPy3pgSPaEO+tOyQ+5MV3ZO7XU=";
};
meta.mainProgram = "yandex-music-downloader";
}