aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-06-23 01:28:22 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:12:34 +0200
commit7c361fb303a2b8c2cb4d96ddbe8fe5667b9d6c5f (patch)
tree7bb9adb9825d1c43ede388af4e7fa3aa1c9fb9e7
parent40724c99dcdc86d0465af3337a7299477860a846 (diff)
Add launcher script, remove unused function
-rwxr-xr-xautomedia4
-rwxr-xr-xautomedia.py10
2 files changed, 4 insertions, 10 deletions
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()