MPfm: Music Player for Musicians - Developer Documentation - 0.6.0.0
Library Class
NamespacesMPfm.LibraryLibrary
The Library class is a cache of the song library. It can update the library in a background worker. It uses the DataAccess class to access the MPfm database.
Declaration Syntax
C#Visual Basic
public class Library
Public Class Library
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
Library(String)
Constructs the Library class using the specified database file path.

AddAudioFilesToLibrary(List<(Of <<'(String>)>>))
Adds audio files into the library. Must specify the list of files to add using the filePaths parameter.

AudioFiles
Local cache of the audio file library.

CancelUpdateLibrary
When true, cancels an update library process if running.

CheckIfDatabaseVersionNeedsToBeUpdated(String)
Checks if the library database structure needs to be updated by comparing the database version in the Settings table to the expected database version for this version of MPfm.Library.dll. If the versions don't match, the database structure will be updated by running the appropriate migration scripts in the right order.

CreateDatabaseFile(String)
Creates the MPfm database file at the specified location. Executes the SQL needed to create the tables and basic entries.

DatabaseVersionMajor
Indicates what database major version is expected. Useful to update the database structure. Needs to be used with the DatabaseVersionMinor property.

DatabaseVersionMinor
Indicates what database minor version is expected. Useful to update the database structure. Needs to be used with the DatabaseVersionMajor property.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Gateway
Data access library.

GetAlbumArtFromID3OrFolder(String)
Returns the album art in the ID3 tags, or the folder.jpg image if the tags are empty.

GetDatabaseVersion(String)
Returns the database version from the database file (actually in the Settings table).

GetEmbeddedSQLScript(String)
Returns an embedded SQL script file from the assembly.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetTagLibInfo(String)
Returns the TagLib# data structure of a file.

GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
OnUpdateLibraryFinished
This event is fired when the library update process has finished its work.

OnUpdateLibraryProgress
This event is fired every time a file is added to the library.

RefreshCache()()()()
Refreshes the audio file cache from the database.

RemoveAudioFilesWithBrokenFilePaths()()()()
Removes the audio files that do not exist anymore on the hard drive.

RemoveSongsFromLibrary(String)
Removes the songs in the library that match the path passed in parameter.

ResetLibrary()()()()
Resets the library (deletes all songs from the database).

SearchMediaFilesInFolders()()()()
Searches for songs in all configured folders.

SearchMediaFilesInFolders(String, Boolean)
Searches for songs in a specific folder, using recursivity or not.

SelectAlbumTitles()()()()
Returns a list of distinct album titles.

SelectAlbumTitles(AudioFileFormat)
Returns a list of distinct album titles, using the filter passed in the soundFormat parameter.

SelectAlbumTitlesWithFilePaths()()()()
Returns a list of distinct album titles with the file path of one of the audio files of the album. This method is useful to display album covers.

SelectAlbumTitlesWithFilePaths(AudioFileFormat)
Returns a list of distinct album titles with the file path of one of the audio files of the album, using the filter passed in the soundFormat parameter.

SelectArtistAlbumTitles(String)
Returns the unique album titles of a specific artist in the library.

SelectArtistAlbumTitles(String, AudioFileFormat)
Returns the unique album titles of a specific artist in the library, using the filter passed in the soundFormat parameter.

SelectArtistNames()()()()
Returns the unique artist names in the library.

SelectArtistNames(AudioFileFormat)
Returns the unique artist names in the library, using the filter passed in the soundFormat parameter.

SelectAudioFile(Guid)
Selects an audio file from the cache using its identifier.

SelectAudioFiles()()()()
Selects all the audio files from the cache.

SelectAudioFiles(AudioFileFormat)
Selects audio files from the song cache, filtered by different parameters.

SelectAudioFiles(AudioFileFormat, String, Boolean)
Selects audio files from the song cache, filtered by different parameters.

SelectAudioFiles(AudioFileFormat, String, Boolean, String)
Selects audio files from the song cache, filtered by different parameters.

SelectAudioFiles(AudioFileFormat, String, Boolean, String, String)
Selects audio files from the song cache, filtered by different parameters.

SelectAudioFiles(AudioFileFormat, String, Boolean, String, String, String)
Selects audio files from the song cache, filtered by different parameters.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
UpdateAudioFilePlayCount(Guid)
Updates the play count of an audio file into the database.

UpdateLibrary()()()()
Starts a background worker process to update the library. Refreshes the whole library by default.

UpdateLibrary(UpdateLibraryMode, List<(Of <<'(String>)>>), String)
Starts a background worker process to update the library, using the mode passed in parameter. If the mode is SpecificFiles, then you must pass the file paths using a List of strings in the filePaths parameter. If the mode is SpecificFolder, then you must pass the folder path in the folderPath parameter.

UpdateLibraryReportProgress(String, String)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double, String)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double, Int32, Int32)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double, Int32, Int32, String)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double, Int32, Int32, String, String)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double, Int32, Int32, String, String, UpdateLibraryProgressDataSong)
Reports progress for the update library process.

UpdateLibraryReportProgress(String, String, Double, Int32, Int32, String, String, UpdateLibraryProgressDataSong, Exception)
Reports progress for the update library process.

Inheritance Hierarchy
Object
Library

Assembly: MPfm.Library (Module: MPfm.Library) Version: 0.5.3.0 (0.5.3.0)