Skip to content

Instantly share code, notes, and snippets.

@presuku
Created January 27, 2017 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save presuku/026850b91eead6b22d24b93e1c7af3a7 to your computer and use it in GitHub Desktop.
Save presuku/026850b91eead6b22d24b93e1c7af3a7 to your computer and use it in GitHub Desktop.
diff --git a/lib.go b/lib.go
index 37ea63c..5bd64da 100644
--- a/lib.go
+++ b/lib.go
@@ -53,6 +53,9 @@ func refreshLibrary() {
lib, err := tx.CreateBucketIfNotExists([]byte("Library"))
checkErr(err)
for _, t := range tracks {
+ if t.Artist == "" {
+ t.Artist = "Unknown Artist"
+ }
artist, err := lib.CreateBucketIfNotExists([]byte(t.Artist))
checkErr(err)
if t.Album == "" {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment