diff options
-rw-r--r-- | odin/strm/cache_media | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/odin/strm/cache_media b/odin/strm/cache_media index 796bccf0..c34e20fe 100644 --- a/odin/strm/cache_media +++ b/odin/strm/cache_media | |||
@@ -22,6 +22,8 @@ function notmuch { | |||
22 | done | 22 | done |
23 | } | 23 | } |
24 | 24 | ||
25 | acted=false | ||
26 | |||
25 | while { | 27 | while { |
26 | results=$(notmuch search --sort=oldest-first --output=messages "( tag:inbox AND is:media AND is:unread ) AND NOT ( tag:new OR tag:killed OR tag:failed OR tag:cached )") | 28 | results=$(notmuch search --sort=oldest-first --output=messages "( tag:inbox AND is:media AND is:unread ) AND NOT ( tag:new OR tag:killed OR tag:failed OR tag:cached )") |
27 | ids=("${(f)results}") | 29 | ids=("${(f)results}") |
@@ -34,5 +36,11 @@ while { | |||
34 | 36 | ||
35 | for id (${ids}); do | 37 | for id (${ids}); do |
36 | systemctl --user start $(systemd-escape --template=download-youtube@.service ${id}) | 38 | systemctl --user start $(systemd-escape --template=download-youtube@.service ${id}) |
39 | |||
40 | acted=true | ||
37 | done | 41 | done |
38 | done | 42 | done |
43 | |||
44 | if ${acted}; then | ||
45 | systemctl --no-block start uucico@hel.service | ||
46 | fi | ||