more music stuff
This commit is contained in:
parent
cfdd468453
commit
266c981cd4
|
@ -5,6 +5,8 @@
|
|||
serviceConfig.Type = "oneshot";
|
||||
path = [
|
||||
pkgs.coreutils
|
||||
pkgs.openssh
|
||||
pkgs.gawk
|
||||
pkgs.rsync
|
||||
pkgs.beets
|
||||
];
|
||||
|
@ -13,7 +15,7 @@
|
|||
User = "anish";
|
||||
};
|
||||
};
|
||||
systemd.timers.get-music-timer = {
|
||||
systemd.timers.get-music-sync = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "get-music-sync.service" ];
|
||||
timerConfig.OnCalendar = [ "hourly" ];
|
||||
|
|
|
@ -45,6 +45,8 @@ while IFS= read -r album; do
|
|||
|
||||
# Import to beets
|
||||
echo "$(date): Importing $album to beets..." >>"$LOG_FILE"
|
||||
# Set umask to allow group read/write access
|
||||
umask 002
|
||||
if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then
|
||||
echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue