Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class M3u(filetype.Type):
"""Implements the m3u playlist matcher."""
MIME = "audio/x-mpegurl"
EXTENSION = "m3u"
def __init__(self):
super().__init__(mime=self.__class__.MIME, extension=self.__class__.EXTENSION)
def match(self, buf):
return len(buf) > 6 and buf.startswith(b"#EXTM3U")
# Not using `add_type()`, to append
filetype.types.append(Mp2x())
filetype.types.append(M3u())
filetype.types.append(Mp3Invalids())
class M3u(filetype.Type):
"""Implements the m3u playlist matcher."""
MIME = "audio/x-mpegurl"
EXTENSION = "m3u"
def __init__(self):
super().__init__(mime=self.__class__.MIME, extension=self.__class__.EXTENSION)
def match(self, buf):
return len(buf) > 6 and buf.startswith(b"#EXTM3U")
# Not using `add_type()`, to append
filetype.types.append(Mp2x())
filetype.types.append(M3u())
filetype.types.append(Mp3Invalids())
class M3u(filetype.Type):
"""Implements the m3u playlist matcher."""
MIME = "audio/x-mpegurl"
EXTENSION = "m3u"
def __init__(self):
super().__init__(mime=self.__class__.MIME, extension=self.__class__.EXTENSION)
def match(self, buf):
return len(buf) > 6 and buf.startswith(b"#EXTM3U")
# Not using `add_type()`, to append
filetype.types.append(Mp2x())
filetype.types.append(M3u())
filetype.types.append(Mp3Invalids())