From 19eafe2318ca310b12ea5a5b5dd4b082b35de9ca Mon Sep 17 00:00:00 2001 From: rouggy Date: Sun, 5 Jun 2022 11:41:42 +0700 Subject: [PATCH] python --- Sonarr/delete_files.py | 43 ------------------------------------------ 1 file changed, 43 deletions(-) diff --git a/Sonarr/delete_files.py b/Sonarr/delete_files.py index bef4061..da2f95c 100644 --- a/Sonarr/delete_files.py +++ b/Sonarr/delete_files.py @@ -1,46 +1,3 @@ -# #!/usr/bin/python3 -# -# import requests -# import os -# -# PATH_LIST = ["Movies", "Series", "4K-Movies", "4K-Series", "Cartoons"] -# -# basePath = "" -# sourcePath = "" -# movieFolder = "" -# -# def sendNotifications(title, message, priority): -# resp = requests.post('https://gotify.rouggy.com/message?token=AKMj5SsZblmpAJ_', json={ -# "message": message, -# "priority": priority, -# "title": title -# }) -# -# try: -# -# eventType = os.environ.get('sonarr_eventtype') -# sonarrMovieId = os.environ.get('sonarr_series_id') -# sourcePath = os.environ.get('sonarr_episodefile_sourcepath') -# -# # Get the folder name of the file to check if movie/serie is inside a folder or not -# movieFolder = os.path.dirname(sourcePath) -# basePath = os.path.basename(movieFolder) -# except: -# print("Cannot get env variables") -# -# #sendNotifications("Test of Radarr Script", f"Source Path:{sourcePath}", 10) -# -# if basePath not in PATH_LIST: -# try: -# os.remove(sourcePath) -# os.rmdir(movieFolder) -# except: -# pass -# else: -# try: -# os.remove(sourcePath) -# except: -# pass #!/home/rouggy/Scripts/ArrDeleteFiles/.venv/bin/python3 import requests