Showing 1 changed files with 3 additions and 10 deletions
+3 -10
checkmusic
... ...
@@ -26,23 +26,16 @@ class Metainfo():
26 26
         }
27 27
 
28 28
 def getSongInfo(filepath):
29
+    print(filepath, end=": ")
29 30
     try:
30 31
         tag = TinyTag.get(filepath)
31 32
     except LookupError:
32 33
         return Metainfo()
33
-    # make sure everthing returned (except length) is a string
34 34
     for attribute in ['artist','album','title','track']:
35 35
         if getattr(tag, attribute) is None:
36
-            setattr(tag, attribute, '')
37
-#    print(filepath)
38
-#    print(tag.artist)
39
-#    print(tag.album)
40
-#    print(tag.title)
41
-#    print(str(tag.track))
42
-#    print(tag.duration)
43
-    return Metainfo(tag.artist, tag.album, tag.title, str(tag.track), tag.duration)
36
+            print(attribute, end=" ")
37
+    print()
44 38
 
45 39
 if __name__ == "__main__":
46 40
     for filepath in sys.argv[1:]:
47 41
         getSongInfo(filepath)
48
-