Returns a string list of metadata values contained in an audio file.
Example - Retreive all Metadata
function OnStart()
{
app.ChooseFile( "Choose an audio file", "audio/mpeg", OnChoose );
}
function OnChoose( path )
{
var keys = (
"album,artist,genre,title,composer," +
"author,duration"
).split(",");
var data = app.GetMetadata( path, keys )
data = data.slice(1).split(",");
var lst = [];
for(var i in keys) lst.push(keys[i] + ": " + data[i]);
app.Alert( lst.join( "\n" ), path );
}
from native import app
def OnStart():
app.ChooseFile("Choose an audio file", "audio/mpeg", OnChoose)
def OnChoose(path):
keys = (
"album,artist,genre,title,composer," +
"author,duration"
).split(",")
data = app.GetMetadata(path, keys)
data = data.slice(1).split(",")
lst = []
for i in range(len(keys)):
lst.append(keys[i] + ": " + data[i])
app.Alert("\n".join(lst), path)