youtubedl: remove podcast download (#636)
Reviewed-on: #636 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
8d507e1470
commit
6157fa5d48
4 changed files with 47 additions and 11 deletions
|
@ -24,18 +24,18 @@ ytdl_video_urls:
|
|||
- https://www.youtube.com/playlist?list=PLs4hTtftqnlAkiQNdWn6bbKUr-P1wuSm0 # jimmy kimmel mean tweets
|
||||
- https://www.youtube.com/tomstantonengineering
|
||||
- https://www.youtube.com/@liamcarps #englandvideos ironisch
|
||||
ytdl_podcast_urls:
|
||||
- https://sternengeschichten.podigee.io/feed/aac # Sternengeschichten
|
||||
- https://feeds.br.de/radiowissen/feed.xml # BR2 RadioWissen
|
||||
|
||||
ytdl_video_output: "/shares_videos/Youtube/%(uploader)s/%(title)s-%(id)s.%(ext)s" # Videos werden jetzt IMMEr nach "Uploader/Name.ext" geschrieben
|
||||
ytdl_video_output: "/shares_videos/Youtube/%(uploader)s/%(title)s-%(id)s.%(ext)s" # Videos werden jetzt IMMER nach "Uploader/Name.ext" geschrieben
|
||||
|
||||
ytdl_enable_video_download: true
|
||||
ytdl_enable_podcast_download: false
|
||||
|
||||
ytdl_podcast_output: "/shares_music/Podcasts/%(playlist)s/%(id)s.%(ext)s"
|
||||
ytdl_video_log_output: "/shares_videos/Youtube/archive-youtube.log"
|
||||
ytdl_podcast_log_output: "/shares_music/Podcasts/archive-podcast.log"
|
||||
ytdl_youtube_username: "{{ lookup('keepass', 'youtubedl_youtube_login', 'username') }}"
|
||||
ytdl_youtube_password: "{{ lookup('keepass', 'youtubedl_youtube_login', 'password') }}"
|
||||
ytdl_conf_dir: "/etc/youtubedl" #ohne / am ende
|
||||
ytdl_conf_dir: "/etc/youtubedl" # ohne / am ende
|
||||
ytdl_download_limit: "10000K"
|
||||
|
||||
### mgrote_fileserver_smb
|
||||
|
|
|
@ -35,3 +35,6 @@ ytdl_youtube_password: "{{ lookup('keepass', 'youtubedl_youtube_login', 'passwor
|
|||
ytdl_conf_dir: "/etc/youtubedl" #ohne / am ende
|
||||
ytdl_download_limit: "10000K"
|
||||
ytdl_active: false # damit werden die systemd-Units nicht angelegt
|
||||
|
||||
ytdl_enable_video_download: true
|
||||
ytdl_enable_podcast_download: false
|
||||
|
|
|
@ -24,19 +24,29 @@
|
|||
group: root
|
||||
mode: "0755"
|
||||
|
||||
- name: template youtubedl config
|
||||
- name: template youtubedl video config
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ ytdl_conf_dir }}/{{ item }}"
|
||||
src: youtube.txt
|
||||
dest: "{{ ytdl_conf_dir }}/youtube.txt"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- systemctl daemon-reload
|
||||
loop:
|
||||
- podcast.txt
|
||||
- youtube.txt
|
||||
when: ytdl_enable_video_download
|
||||
|
||||
- name: template youtubedl podcast config
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: podcast.txt
|
||||
dest: "{{ ytdl_conf_dir }}/podcast.txt"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- systemctl daemon-reload
|
||||
when: ytdl_enable_podcast_download
|
||||
|
||||
- name: template systemd services
|
||||
become: true
|
||||
|
@ -84,3 +94,22 @@
|
|||
notify:
|
||||
- systemctl daemon-reload
|
||||
when: ytdl_active
|
||||
|
||||
- name: ensure youtubedl video config is absent
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: "{{ ytdl_conf_dir }}/youtube.txt"
|
||||
notify:
|
||||
- systemctl daemon-reload
|
||||
when: not ytdl_enable_video_download
|
||||
|
||||
- name: ensure youtubedl podcast config is absent
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: "{{ ytdl_conf_dir }}/podcast.txt"
|
||||
notify:
|
||||
- systemctl daemon-reload
|
||||
when: not ytdl_enable_podcast_download
|
||||
...
|
||||
|
|
|
@ -6,8 +6,12 @@ OnFailure=youtubedl_mail.service
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
{% if ytdl_enable_podcast_download is sameas true %}
|
||||
ExecStart=-{{ ytdl_bin_path }} --config-location "{{ ytdl_conf_dir }}/podcast.txt"
|
||||
{% endif %}
|
||||
{% if ytdl_enable_video_download is sameas true %}
|
||||
ExecStart=-{{ ytdl_bin_path }} --config-location "{{ ytdl_conf_dir }}/youtube.txt"
|
||||
{% endif %}
|
||||
Restart=on-failure
|
||||
RestartSec=10min
|
||||
|
||||
|
|
Loading…
Reference in a new issue