about summary refs log tree commit diff stats
path: root/modules/home.legacy/conf/beets/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home.legacy/conf/beets/default.nix')
-rw-r--r--modules/home.legacy/conf/beets/default.nix21
1 files changed, 9 insertions, 12 deletions
diff --git a/modules/home.legacy/conf/beets/default.nix b/modules/home.legacy/conf/beets/default.nix
index de05ca24..612a5f03 100644
--- a/modules/home.legacy/conf/beets/default.nix
+++ b/modules/home.legacy/conf/beets/default.nix
@@ -41,9 +41,12 @@ in {
         color = true;
       };
 
-      include = [
-        "./replace_override.yaml"
-      ];
+      replace = {
+        "[/]" = "\\";
+        "[\\x00-\\x1f]" = "";
+        "\\s+$" = "";
+        "^\\s+" = "";
+      };
 
       import = {
         # move, instead of copying or linking the files
@@ -62,15 +65,11 @@ in {
       };
 
       paths = let
-        j = lib.strings.concatStringsSep "/";
+        join = lib.strings.concatStringsSep "/";
       in {
-        default = j ["[Default]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"];
-        "albumtype:live" = j ["[Live]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"];
+        "albumtype:live" = join ["[Live, please delete]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"];
 
-        "albumtype:album" = j ["Music" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"];
-        "albumtype::(Single|EP)" = j ["Music" "$genre" "$first_artist_singleton" "$album ($albumtype)" "$track $title"];
-        "albumtype:compilation" = j ["Complilations" "$genre" "Various Artists" "$album ($albumtype)" "$track $title"];
-        "albumtype:soundtrack" = j ["Soundtracks" "$genre" "$first_artist" "$album" "$track $title"];
+        default = "$albumartist/$album%aunique{}/$track $title";
       };
 
       inherit plugins;
@@ -102,8 +101,6 @@ in {
     };
   };
 
-  xdg.configFile."beets/replace_override.yaml".source = ./replace_override.yaml;
-
   # Use the json formatter instead of the YAML one, as the YAML formatter mangles the
   # longer python inline strings.
   # YAML is a superset of JSON.