MythTV  master
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
discid.disc.Disc Class Reference
Inheritance diagram for discid.disc.Disc:
[legend]
Collaboration diagram for discid.disc.Disc:
[legend]

Public Member Functions

def __init__ (self)
 
def __str__ (self)
 
def read (self, device=None, features=[])
 
def put (self, first, last, disc_sectors, track_offsets)
 
def id (self)
 
def freedb_id (self)
 
def submission_url (self)
 
def toc_string (self)
 
def first_track_num (self)
 
def last_track_num (self)
 
def sectors (self)
 
def seconds (self)
 
def mcn (self)
 
def tracks (self)
 
def __enter__ (self)
 
def __exit__ (self, exc_type, exc_value, traceback)
 
def __del__ (self)
 

Static Public Attributes

 argtypes
 
 restype
 
def length = sectors
 

Private Member Functions

def _get_error_msg (self)
 
def _get_id (self)
 
def _get_freedb_id (self)
 
def _get_submission_url (self)
 
def _get_toc_string (self)
 
def _get_first_track_num (self)
 
def _get_last_track_num (self)
 
def _get_sectors (self)
 
def _get_mcn (self)
 
def _free (self)
 

Private Attributes

 _handle
 
 _success
 
 _requested_features
 

Detailed Description

The class of the object returned by :func:`read` or :func:`put`.

Definition at line 92 of file disc.py.

Constructor & Destructor Documentation

◆ __init__()

def discid.disc.Disc.__init__ (   self)
The initialization will reserve some memory
for internal data structures.

Definition at line 98 of file disc.py.

◆ __del__()

def discid.disc.Disc.__del__ (   self)

Definition at line 387 of file disc.py.

Member Function Documentation

◆ __str__()

def discid.disc.Disc.__str__ (   self)

Definition at line 107 of file disc.py.

◆ _get_error_msg()

def discid.disc.Disc._get_error_msg (   self)
private
Get the error message for the last error with the object.

Definition at line 113 of file disc.py.

Referenced by discid.disc.Disc.put(), and discid.disc.Disc.read().

◆ read()

def discid.disc.Disc.read (   self,
  device = None,
  features = [] 
)
Reads the TOC from the device given as string

The user is supposed to use :func:`discid.read`.

Definition at line 127 of file disc.py.

◆ put()

def discid.disc.Disc.put (   self,
  first,
  last,
  disc_sectors,
  track_offsets 
)
Creates a TOC based on the input given.

The user is supposed to use :func:`discid.put`.

Definition at line 157 of file disc.py.

◆ _get_id()

def discid.disc.Disc._get_id (   self)
private
Gets the current MusicBrainz disc ID

Definition at line 182 of file disc.py.

Referenced by discid.disc.Disc.id().

◆ _get_freedb_id()

def discid.disc.Disc._get_freedb_id (   self)
private
Gets the current FreeDB disc ID

Definition at line 191 of file disc.py.

Referenced by discid.disc.Disc.freedb_id().

◆ _get_submission_url()

def discid.disc.Disc._get_submission_url (   self)
private
Give an URL to submit the current TOC
as a new Disc ID to MusicBrainz.

Definition at line 200 of file disc.py.

Referenced by discid.disc.Disc.submission_url().

◆ _get_toc_string()

def discid.disc.Disc._get_toc_string (   self)
private
The TOC suitable as value of the `toc parameter`
when accessing the MusicBrainz Web Service.

Definition at line 213 of file disc.py.

Referenced by discid.disc.Disc.toc_string().

◆ _get_first_track_num()

def discid.disc.Disc._get_first_track_num (   self)
private
Gets the first track number

Definition at line 227 of file disc.py.

Referenced by discid.disc.Disc.first_track_num().

◆ _get_last_track_num()

def discid.disc.Disc._get_last_track_num (   self)
private
Gets the last track number

Definition at line 235 of file disc.py.

Referenced by discid.disc.Disc.last_track_num().

◆ _get_sectors()

def discid.disc.Disc._get_sectors (   self)
private
Gets the total number of sectors on the disc

Definition at line 243 of file disc.py.

Referenced by discid.disc.Disc.sectors().

◆ _get_mcn()

def discid.disc.Disc._get_mcn (   self)
private
Gets the current Media Catalogue Number (MCN/UPC/EAN)

Definition at line 254 of file disc.py.

Referenced by discid.disc.Disc.mcn().

◆ id()

def discid.disc.Disc.id (   self)
This is the MusicBrainz :musicbrainz:`Disc ID`,
a :obj:`unicode` or :obj:`str <python:str>` object.

Definition at line 270 of file disc.py.

Referenced by discid.disc.Disc.__str__().

◆ freedb_id()

def discid.disc.Disc.freedb_id (   self)
This is the :musicbrainz:`FreeDB` Disc ID (without category),
a :obj:`unicode` or :obj:`str <python:str>` object.

Definition at line 277 of file disc.py.

◆ submission_url()

def discid.disc.Disc.submission_url (   self)
Disc ID / TOC Submission URL for MusicBrainz

With this url you can submit the current TOC
as a new MusicBrainz :musicbrainz:`Disc ID`.
This is a :obj:`unicode` or :obj:`str <python:str>` object.

Definition at line 284 of file disc.py.

Referenced by discid.disc.Disc.toc_string().

◆ toc_string()

def discid.disc.Disc.toc_string (   self)
The TOC suitable as value of the `toc parameter`
when accessing the MusicBrainz Web Service.

This is a :obj:`unicode` or :obj:`str <python:str>` object
and enables fuzzy searching when the actual Disc ID is not found.

Note that this is the unencoded value, which still contains spaces.

.. seealso:: `MusicBrainz Web Service <http://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#discid>`_

Definition at line 301 of file disc.py.

◆ first_track_num()

def discid.disc.Disc.first_track_num (   self)
Number of the first track

Definition at line 325 of file disc.py.

Referenced by discid.disc.Disc.tracks().

◆ last_track_num()

def discid.disc.Disc.last_track_num (   self)
Number of the last **audio** track

Definition at line 330 of file disc.py.

Referenced by discid.disc.Disc.tracks().

◆ sectors()

def discid.disc.Disc.sectors (   self)
Total length in sectors

Definition at line 335 of file disc.py.

Referenced by discid.track.Track.seconds(), and discid.disc.Disc.seconds().

◆ seconds()

def discid.disc.Disc.seconds (   self)
Total length in seconds

Definition at line 343 of file disc.py.

◆ mcn()

def discid.disc.Disc.mcn (   self)
This is the Media Catalogue Number (MCN/UPC/EAN)

It is set after the `"mcn"` feature was requested on a read
and supported by the platform or :obj:`None`.
If set, this is a :obj:`unicode` or :obj:`str <python:str>` object.

Definition at line 351 of file disc.py.

◆ tracks()

def discid.disc.Disc.tracks (   self)
A list of :class:`Track` objects for this Disc.

Definition at line 361 of file disc.py.

◆ _free()

def discid.disc.Disc._free (   self)
private
This will free the internal allocated memory for the object.

Definition at line 373 of file disc.py.

◆ __enter__()

def discid.disc.Disc.__enter__ (   self)
deprecated :keyword:`with` usage

Definition at line 379 of file disc.py.

◆ __exit__()

def discid.disc.Disc.__exit__ (   self,
  exc_type,
  exc_value,
  traceback 
)
deprecated :keyword:`with` usage

Definition at line 383 of file disc.py.

Member Data Documentation

◆ argtypes

discid.disc.Disc.argtypes
static

Definition at line 96 of file disc.py.

◆ restype

discid.disc.Disc.restype
static

Definition at line 97 of file disc.py.

◆ length

def discid.disc.Disc.length = sectors
static

Definition at line 339 of file disc.py.

◆ _handle

discid.disc.Disc._handle
private

◆ _success

discid.disc.Disc._success
private

◆ _requested_features

discid.disc.Disc._requested_features
private

Definition at line 104 of file disc.py.

Referenced by discid.disc.Disc._get_mcn(), discid.disc.Disc.put(), and discid.disc.Disc.read().


The documentation for this class was generated from the following file: