calliope.import_
¶
Convert playlists from different serialization formats.
See also: cpe import command.
Package Contents¶
Functions¶
|
Guess the format of the input playlist. |
|
Parse playlist in PLS format. |
|
Parse playlist in XSPF format. |
|
|
|
|
|
Parse playlist in JSPF format. |
|
|
|
Parse playlist data from a file. |
Attributes¶
- exception calliope.import_.PlaylistReadError¶
Bases:
Exception
Exception raised if playlist parsing fails.
Initialize self. See help(type(self)) for accurate signature.
- calliope.import_.guess_format(text)¶
Guess the format of the input playlist.
This is a simple function which tries different parsers in succession until one succeeds. It’s not the most efficient way to load a playlist.
- Parameters:
text (str) –
- Return type:
- calliope.import_.parse_pls(text)¶
Parse playlist in PLS format.
- Parameters:
text (str) –
- Return type:
- calliope.import_.parse_xspf(text)¶
Parse playlist in XSPF format.
- Parameters:
text (str) –
- Return type:
- calliope.import_.jspf_to_calliope(jspf_entry, calliope_entry, jspf_property, calliope_property)¶
- calliope.import_.JSPF_EXTENSION_LISTENBRAINZ_PLAYLIST = 'https://musicbrainz.org/doc/jspf#playlist'¶
- calliope.import_.JSPF_EXTENSION_LISTENBRAINZ_TRACK = 'https://musicbrainz.org/doc/jspf#track'¶
- calliope.import_.process_jspf_listenbrainz_playlist_extension(extension, entry)¶
- calliope.import_.process_jspf_listenbrainz_track_extension(extension, entry)¶
- calliope.import_.parse_jspf(text)¶
Parse playlist in JSPF format.
- Parameters:
text (str) –
- Return type:
- calliope.import_.process_jspf(doc)¶
- Return type:
- calliope.import_.import_(text)¶
Parse playlist data from a file.
The type of the input data will be autodetected. The supported formats are: PLS, XSPF, JSPF.
- Parameters:
text (str) – The file contents.
- Returns:
A playlist.
- Return type: