나는이 문제를 보았고 그것을 고치기 위해 파이썬 함수를 작성했다. 내 충고는 DRM 파일로 손실을 줄이고 재생 목록 등을 위해 사용하는 프로그램에 관계없이 이동하는 것입니다. 일반적인 문제는 m4p가 mp3 및 m4a와 섞여 있다는 것입니다.
이
import os, shutil
def move_drm_files(music_folder):
all_songs = []
good_filetypes = ['mp3', 'm4a', 'ogg', 'flv', 'wma']
for root, dirs, files in os.walk(music_folder):
for name in files:
full_name = os.path.join(root, name)
all_songs.append(full_name)
os.mkdir('/drm_music')
for song in all_songs:
if song[-3:] not in good_filetypes:
shutil.move(song, '/drm_music')
그래서 예를 들어 당신이 (move_drm.py
로 스크립트를 저장) python -i move_drm.py
과 위의를 실행하고 move_drm_files('/users/alienfluid/music')
를 호출 할 수 있으며, 모든 DRM : 어떤 믹스이 C:\drm_music
에서 새 폴더에 모든 drm'd 파일을 이동합니다 파일 형식이 자신의 격리 된 폴더로 이동됩니다.
def sort_drm(drm_folder, all_songs=[]):
os.mkdir('/drm_collection')
known_types = []
for root, dirs, files in os.walk(drm_folder):
for name in files:
full_name = os.path.join(root, name)
all_songs.append(full_name)
for item in all_songs:
if item[-3:] not in known_types:
known_types.append(item[-3:])
for item in known_types:
os.mkdir('/drm_collection/'+item)
for item in all_songs:
shutil.copy2(item, '/drm_collection/'+item[-3:])
이 자신의 연장라는 이름의 하위 폴더 (M4P 등)로 C:\drm_collection
에 폴더를 생성합니다, 그들은 것입니다 : 당신은 당신이 그 중 일부를 절약 할 수 있습니다 생각한다면 당신은 유형별로 DRM 파일을 정렬이 작업을 수행 할 수 각 유형의 모든 인스턴스로 채워짐; 첫 번째 기능을 실행하면 두 번째 파일을 같은 파일에 저장하고 sort_drm('/drm_music')
쥬크 박스 소프트웨어가이 작업을 수행하지 않습니까? 난 그냥 아이튠즈에서 별도의 스마트 재생 목록을 설정합니다. –