Don’t change the parsed metadata.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 17 Mar 2013 09:57:57 +0000 (10:57 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 17 Mar 2013 09:57:57 +0000 (10:57 +0100)
src/main/java/net/pterodactylus/sonitus/data/source/FileSource.java

index 6c28522..010eeb9 100644 (file)
@@ -69,7 +69,7 @@ public class FileSource implements Source {
                        metadata = identifyingInputStream.get().metadata();
                } else {
                        /* fallback. */
-                       metadata = new Metadata(UNKNOWN_CHANNELS, UNKNOWN_FREQUENCY, UNKNOWN_ENCODING);
+                       metadata = new Metadata(UNKNOWN_CHANNELS, UNKNOWN_FREQUENCY, UNKNOWN_ENCODING).name(path);
                }
        }
 
@@ -79,7 +79,7 @@ public class FileSource implements Source {
 
        @Override
        public Metadata metadata() {
-               return metadata.name(path);
+               return metadata;
        }
 
        @Override