def listMediaFiles(path):
 if ((not dir) or (not os.path.isdir(path))):
  return []
 files = []
 for curFile in os.listdir(path):
  fullCurFile = os.path.join(path, curFile)
  if (os.path.isdir(fullCurFile) and (not curFile.startswith(u'.')) and (not (curFile == u'Extras'))):
   files += listMediaFiles(fullCurFile)
  elif isMediaFile(curFile):
   files.append(fullCurFile)
 return files

def listMediaFiles ( path ) : if ( ( not dir ) or ( not os . path . isdir ( path ) ) ) : return [ ] files = [ ] for curFile in os . listdir ( path ) : fullCurFile = os . path . join ( path , curFile ) if ( os . path . isdir ( fullCurFile ) and ( not curFile . startswith ( u'.' ) ) and ( not ( curFile == u'Extras' ) ) ) : files += listMediaFiles ( fullCurFile ) elif isMediaFile ( curFile ) : files . append ( fullCurFile ) return files
get a list of files possibly containing media in a path .