diff options
author | lassulus <lassulus@lassul.us> | 2020-04-19 13:21:58 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-04-19 13:21:58 +0200 |
commit | 355ebd73ee298a845ec2393f964354aa8e411073 (patch) | |
tree | a9f7abba8d1eb9b7d47deede42274aaa7235f6c2 /lass/2configs | |
parent | 8bc2a64f49c4f49d942576cd8dadfec832088ffe (diff) |
l radio: be more http compliant
Diffstat (limited to 'lass/2configs')
-rw-r--r-- | lass/2configs/radio.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 146472e5f..c28152175 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -44,9 +44,9 @@ let if [[ "$current_track" =~ ^the_playlist/music/.* ]]; then ${pkgs.attr}/bin/setfattr -n user.skip_count -v 0 "$music_dir"/"$current_track" else - mv "$music_dir"/"$current_track" "$music_dir"/the_playlist/music/ + mv "$music_dir"/"$current_track" "$music_dir"/the_playlist/music/ || : fi - echo good: "$track_infos" + echo good: "$track_infos" ''; print_current = pkgs.writeDashBin "print_current" '' @@ -278,6 +278,9 @@ in { script = '' case "$Method $Request_URI" in "GET /current") + printf 'HTTP/1.1 200 OK\r\n' + printf 'Connection: close\r\n' + printf '\r\n' ${print_current}/bin/print_current exit ;; |