]> gitweb.factorcode.org Git - factor.git/commitdiff
Removed extra nulls from v1 tags
authorTim Wawrzynczak <inforichland@gmail.com>
Mon, 16 Feb 2009 01:12:46 +0000 (19:12 -0600)
committerTim Wawrzynczak <inforichland@gmail.com>
Mon, 16 Feb 2009 01:12:46 +0000 (19:12 -0600)
extra/id3/id3-tests.factor
extra/id3/id3.factor

index b9d45b1b04fc1af9fd93a667b1f71407d40d7230..fdbaf69f03d49be3284b6ad4dcfff4d043e74733 100644 (file)
@@ -164,17 +164,17 @@ IN: id3.tests
 [    
   T{ mp3v1-file
      { title
-       "BLAH\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "BLAH"
      }
      { artist
-       "ARTIST\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "ARTIST"
      }
      { album
-       "ALBUM\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "ALBUM"
      }
      { year "2009" }
      { comment
-       "COMMENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "COMMENT"
      }
      { genre 89 }
   }
index 64e1ff1d10b498b8778a2ee5716f540a5b929897..5b0d3f373e3a8234d8e9633cbbc5ce9ccc0aa9d0 100644 (file)
@@ -127,11 +127,11 @@ TUPLE: mp3v1-file title artist album year comment genre ;
 : (read-v1-tag-data) ( seq -- mp3-file )
     [ <mp3v1-file> ] dip
     {
-        [ read-title   ascii decode  >>title ]
-        [ read-artist  ascii decode  >>artist ]
-        [ read-album   ascii decode  >>album ]
-        [ read-year    ascii decode  >>year ]
-        [ read-comment ascii decode  >>comment ]
+        [ read-title   ascii decode  filter-text-data >>title ]
+        [ read-artist  ascii decode  filter-text-data >>artist ]
+        [ read-album   ascii decode  filter-text-data >>album ]
+        [ read-year    ascii decode  filter-text-data >>year ]
+        [ read-comment ascii decode  filter-text-data >>comment ]
         [ read-genre   >fixnum       >>genre ]
     } cleave ;