Forum Discussion
jambalaya
14 years agoChannel Surfer
JT - Just letting you know I had a stab at editing mymedia.py and common.py to include .m4a support, with success. The changes are very minimal (does not try to parse album/artist or song length), but at least now the unprotected iTunes music purchases play so I am all set. No need to incorporate into the main release if no one else cares about iTunes m4a support, but just FYI these are the changes I made (the code locations should be obvious) -
In mymedia.py, add:
In mymedia.py, change:
In common.py, add:
In common.py, change:
Cheers
JB
In mymedia.py, add:
elif ext == ".m4a":
# use the filename as the title
basename = os.path.split(fname)[1]
title = os.path.splitext(basename)[0]
description = "Music"
filetype = "mp4"
ContentType = "audio"
In mymedia.py, change:
media_re = re.compile("\.m3u|.m3u8|\.mp3|\.wma|\.m4a|\.m4v|\.mp4|\.mov|\.wmv|\.jpg|\.jpeg|\.png|\.gif")In common.py, add:
elif ext == "m4a":
return "audio/mp4"
In common.py, change:
def is_music(path):
return ext2mime(path) in ("audio/mpeg", "audio/mp4", "audio/x-ms-wma", "audio/x-mpegurl")
Cheers
JB