-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
30 lines (24 loc) · 772 Bytes
/
test.py
File metadata and controls
30 lines (24 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from mutagen.easyid3 import EasyID3
import os
"""
tagがついてないmp3を含むディレクトリのリストを返す
"""
dir_list = []
path = input("path=")
path = path.replace("\\", "/")
artist_list = os.listdir(path)
album_list = []
for artist in artist_list:
album_list = os.listdir(path+"/"+artist)
for album in album_list:
if os.path.isdir(album) == False:
continue
music_list = [s for s in os.listdir(
path+"/"+artist+"/"+album) if s.endswith("mp3")]
#print(album, music_list)
if music_list == []:
continue
tags = EasyID3(path+"/"+artist+"/"+album+"/"+music_list[0])
if tags["title"] == "":
dir_list.append(path+"/"+artist+"/"+album)
print(dir_list)