Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
def __repr__(self):
return str(self.name)
LIBMTP_Album._fields_ = [
("album_id", ctypes.c_uint32),
("parent_id", ctypes.c_uint32),
("storage_id", ctypes.c_uint32),
("name", ctypes.c_char_p),
("artist", ctypes.c_char_p),
("composer", ctypes.c_char_p),
("genre", ctypes.c_char_p),
("tracks", ctypes.POINTER(ctypes.c_uint32)),
("no_tracks", ctypes.c_uint32),
("next", ctypes.POINTER(LIBMTP_Album)),
]
class MTPAlbum(BaseModel):
"""
MTPAlbum
An object representing a single album.
"""
def _get_album_id(self):
"""
A unique identifier for the album - typically, you don't manipulate
this value manually.
"""
return int(self.base_structure.album_id)
# ---------
# Defining LIBMTP_Album, MTPAlbum and MTPAlbums
# ---------
class LIBMTP_Album(ctypes.Structure):
"""
LIBMTP_Album
Contains the ctypes structure for LIBMTP_album_struct
"""
def __repr__(self):
return str(self.name)
LIBMTP_Album._fields_ = [
("album_id", ctypes.c_uint32),
("parent_id", ctypes.c_uint32),
("storage_id", ctypes.c_uint32),
("name", ctypes.c_char_p),
("artist", ctypes.c_char_p),
("composer", ctypes.c_char_p),
("genre", ctypes.c_char_p),
("tracks", ctypes.POINTER(ctypes.c_uint32)),
("no_tracks", ctypes.c_uint32),
("next", ctypes.POINTER(LIBMTP_Album)),
]
class MTPAlbum(BaseModel):
"""
MTPAlbum