Пример #1
0
    def score(filename, fileobj, header_data):
        filename = filename.lower()

        return (header_data.startswith(b"ID3") * 2 +
                endswith(filename, b".mp3") +
                endswith(filename, b".mp2") + endswith(filename, b".mpg") +
                endswith(filename, b".mpeg"))
Пример #2
0
 def score(filename, fileobj, header):
     filename = filename.lower()
     s = (
         endswith(filename, ".aac")
         or endswith(filename, ".adts")
         or endswith(filename, ".adif")
     )
     s += b"ADIF" in header
     return s
Пример #3
0
 def score(filename, fileobj, header):
     filename = filename.lower()
     return header.startswith(b"MThd") and (
         endswith(filename, ".mid") or endswith(filename, ".midi"))