Disc information API

Release:0.8.0
class flacmanager.DiscCheck[source]

Bases: threading.Thread

A thread that checks for the presence of a CD-DA disc.

DiscCheck threads are daemonized so that they are killed automatically if the program exits.

run()[source]

Poll for a mounted CD-DA disk device until one is found or an exception occurs.

flacmanager.identify_cdda_device()[source]

Locate the file system device for an inserted CD-DA.

Returns:the CD-DA file system device (“/dev/<device>”)
Return type:str
flacmanager.identify_cdda_mount_point(device)[source]

Locate the file system mount point for the CD-DA device.

Parameters:device (str) – the CD-DA device (“/dev/<device>”)
Returns:the device mount point
Return type:str
flacmanager.read_disc_toc(mountpoint)[source]

Return the TOC for the currently mounted disc.

Parameters:mountpoint (str) – the mount point of an inserted CD-DA disc
Returns:a populated TOC for the inserted CD-DA disc
Return type:TOC
class flacmanager.TOC

This named tuple represents a CD-DA disc table-of-contents (TOC), as read from a .TOC.plist file.

TOC.first_track_number

Alias for field number 0

TOC.last_track_number

Alias for field number 1

TOC.track_offsets

Alias for field number 2

TOC.leadout_track_offset

Alias for field number 3