pisak.audio package

pisak.audio.description module

pisak.audio.handlers module

pisak.audio.handlers.add_or_remove_from_favs(playback)[source]

Add or remove the current audio stream object from the favourites.

Parameters:playback – media playback with audio to be marked as favourite

pisak.audio.widgets module

pisak.audio.data_loader module

pisak.audio.db_manager module

Music database management.

class pisak.audio.db_manager.DBConnector[source]

Bases: object

Database connector.

add_track_to_favourites(track_path)[source]

Add track with the given path to the favourites

Parameters:track_path – path to the track
get_all_folders()[source]

Get all available folders.

Returns:list of all folders.
get_folder_count()[source]

Get number of folders.

Returns:integer, number of folders.
get_folders_ids()[source]

Get list of ids of all the folders from the database.

Returns:list of ids of all the folders,

including -1 for fake favourites if there are any favourite tracks.

get_tracks_from_folder(folder_id)[source]

Get tracks from the folder with the given index.

Parameters:folder_id – index of the folder, -1 for the favourites folder.
Returns:list of tracks.
is_track_in_favourites(track_path)[source]

Check if track with the given path is in the favourites

Parameters:track_path – path to the track.
Returns:True or False.
remove_track_from_favourites(track_path)[source]

Remove track with the given path from the favourites

Parameters:track_path – path to the track
class pisak.audio.db_manager.DBLoader[source]

Bases: pisak.audio.db_manager.DBConnector

Use this to update the music library. Use close method when done.

close()[source]

Close the db loader, close any open connections.

insert_folder(name, cover_path)[source]

Insert single folder to the db.

Parameters:
  • name – name of the folder.
  • cover_path – path to a cover of the given folder.
Returns:

rowid of the inserted or already existing record.

insert_many_tracks(tracks_list)[source]

Insert many tracks to the db.

Parameters:tracks_list – list of dictionaries with the tracks.

Module contents