File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,9 +149,13 @@ def artist(artistDir):
149149 elif ext == ".ogg" :
150150 audio = OggVorbis (fullPath )
151151 title = audio ['title' ][0 ].encode ('ascii' , 'ignore' )
152+ if args .album :
153+ album = audio ['album' ][0 ].encode ('ascii' , 'ignore' )
152154 print (" title: " + title )
153155 except :
154156 title = None
157+ if args .album :
158+ album = None
155159
156160 if not title :
157161 print ("Error: title not found for '" + filename + "'" )
@@ -160,7 +164,13 @@ def artist(artistDir):
160164 neatTitle = toNeat (title )
161165 print (" neatTitle: " + neatTitle )
162166
163- newFullPath = os .path .join (artistDir , neatTitle + ext )
167+ if args .album :
168+ neatAlbum = toNeat (album )
169+ print (" neatAlbum: " + neatAlbum )
170+ newFullPath = os .path .join (artistDir , neatAlbum , neatTitle + ext )
171+
172+ else :
173+ newFullPath = os .path .join (artistDir , neatTitle + ext )
164174 print (" newFullPath: " + newFullPath )
165175
166176 if newFullPath != fullPath :
You can’t perform that action at this time.
0 commit comments