From 4056c2e1cb6d6d8e340656d1084c1d36616b4fb8 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 21 Mar 2020 11:53:43 +0100 Subject: [PATCH] Added executeCommand function at the end of download --- deemix/app/default.json | 1 + deemix/app/main.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/deemix/app/default.json b/deemix/app/default.json index b6886d6..2b43937 100644 --- a/deemix/app/default.json +++ b/deemix/app/default.json @@ -39,6 +39,7 @@ "saveID3v1": true, "titleCasing": "nothing", "artistCasing": "nothing", + "executeCommand": "", "tags": { "title": true, "artist": true, diff --git a/deemix/app/main.py b/deemix/app/main.py index d657dbc..cdf2cc8 100644 --- a/deemix/app/main.py +++ b/deemix/app/main.py @@ -2,6 +2,7 @@ from deemix.api.deezer import Deezer from deemix.utils.misc import getIDFromLink, getTypeFromLink, getBitrateInt from deemix.app.downloader import download_track, download_album, download_playlist, download_artist +from os import system as execute dz = Deezer() @@ -21,3 +22,6 @@ def downloadLink(url, settings, bitrate=None): download_artist(dz, id, settings, forcedBitrate) else: print("URL not supported yet") + return None + if settings['executeCommand'] != "": + execute(settings['executeCommand'])