From 7c361fb303a2b8c2cb4d96ddbe8fe5667b9d6c5f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 23 Jun 2020 01:28:22 +0200 Subject: Add launcher script, remove unused function --- automedia | 4 ++++ automedia.py | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) create mode 100755 automedia diff --git a/automedia b/automedia new file mode 100755 index 0000000..b08e78f --- /dev/null +++ b/automedia @@ -0,0 +1,4 @@ +#!/bin/sh + +cd /usr/share/automedia +./automedia.py diff --git a/automedia.py b/automedia.py index 5670988..8e32a98 100755 --- a/automedia.py +++ b/automedia.py @@ -165,16 +165,6 @@ def get_tracked_html(html_tracked_dir): def show_notification(title, body, urgency="normal"): subprocess.Popen(["notify-send", "-u", urgency, "--", title, body]) -def fetch_page(url): - process = subprocess.Popen(["curl", "-s", "-L", "--output", "-", url], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = process.communicate() - if process.returncode != 0: - # TODO: Add file to list of failed files, so the user knows which they should manually download - if not only_show_finished_notification: - show_notification("Download failed", "Failed to fetch page: {}, error: {}".format(url, stderr.decode('utf-8')), urgency="critical") - return None - return stdout.decode('utf-8') - def is_torrent_daemon_running(): process = subprocess.Popen(["transmission-remote", "-si"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) process.communicate() -- cgit v1.2.3