Path based record provider. More...

Inheritance diagram for Crosstales.DJ.Provider.RecordProviderPath:
Crosstales.DJ.Provider.BaseRecordProviderDB Crosstales.DJ.Provider.BaseRecordProvider Crosstales.DJ.Provider.IRecordProviderDB Crosstales.DJ.Provider.IRecordProvider

Public Member Functions

override void Load (bool forceReload=false)
 Loads all audio records for this provider. More...
 
- Public Member Functions inherited from Crosstales.DJ.Provider.BaseRecordProviderDB
virtual void SaveDB (string filePath="")
 Saves all audio records from this provider as a DB file. More...
 
virtual void LoadDB (string filePath="")
 Loads all audio records for this provider from a DB file. More...
 
void DeleteDB ()
 Deletes the DB file. More...
 

Public Attributes

Crosstales.DJ.RecordsChangeEvent OnRecordsChanged
 
Crosstales.DJ.ProviderReadyEvent OnProviderReadyEvent
 
Crosstales.DJ.ErrorProviderEvent OnErrorProviderInfo
 
string Extension => determineAudioFormatExtension(Format)
 Returns the extension of the provider. More...
 
- Public Attributes inherited from Crosstales.DJ.Provider.BaseRecordProviderDB
string uid
 
bool hasDBFile => Crosstales.Common.Util.FileHelper.ExistsFile(DBFilePath)
 
string DBFilePath => $"{Application.persistentDataPath}/{uid}.djdb"
 
- Public Attributes inherited from Crosstales.DJ.Provider.BaseRecordProvider
double TotalPlaytime => Records.Aggregate(0d, (current, record) => current + record.Duration)
 
long TotalSize => Records.Sum(record => record.FileSize)
 

Protected Member Functions

override void Awake ()
 
override void OnDestroy ()
 
override void load ()
 
override void loadInEditor ()
 
- Protected Member Functions inherited from Crosstales.DJ.Provider.BaseRecordProvider
virtual void Start ()
 
void fillRecords (string[] list)
 
virtual void onRecordsChange ()
 
virtual void onProvider ()
 
virtual void onErrorProvider (string info)
 

Protected Attributes

override Crosstales.DJ.RecordsChangeEvent onRecordsChanged => OnRecordsChanged
 
override Crosstales.DJ.ProviderReadyEvent onProviderReady => OnProviderReadyEvent
 
override Crosstales.DJ.ErrorProviderEvent onErrorProviderInfo => OnErrorProviderInfo
 
- Protected Attributes inherited from Crosstales.DJ.Provider.BaseRecordProvider
System.Collections.Generic.List< Crosstales.DJ.Model.Recordrecords = new System.Collections.Generic.List<Crosstales.DJ.Model.Record>()
 
bool loading
 
string errorMessage
 

Properties

bool UseMusicLibrary [get, set]
 Use default music library - this overrides the 'Path'-setting on supported platforms. More...
 
string Path [get, set]
 Path containing the records. More...
 
Crosstales.DJ.Model.Enum.AudioFormat Format [get, set]
 Audio format of the files. More...
 
bool Recursive [get, set]
 Scan the path recursively (incl. sub-directories). More...
 
bool SlowAndSave [get, set]
 Use the slow but save scan method. More...
 
bool WatchDog [get, set]
 Add a watchdog to the path to be notified about changes, like new files etc. More...
 
- Properties inherited from Crosstales.DJ.Provider.BaseRecordProviderDB
bool UseDatabase [get, set]
 Use a database file to store the processed records. More...
 
- Properties inherited from Crosstales.DJ.Provider.BaseRecordProvider
bool LoadTag [get, set]
 
bool ReadFileSize [get, set]
 
bool AutoUpdate [get, set]
 
bool AutoUpdateInEditor [get, set]
 Auto-update the record list in Editor. More...
 
abstract Crosstales.DJ.RecordsChangeEvent onRecordsChanged [get]
 
abstract Crosstales.DJ.ProviderReadyEvent onProviderReady [get]
 
abstract Crosstales.DJ.ErrorProviderEvent onErrorProviderInfo [get]
 
bool isLoadTag [get, set]
 
bool isReadFileSize [get, set]
 
bool isAutoUpdate [get, set]
 
bool isReady [get, set]
 
System.Collections.Generic.List< Crosstales.DJ.Model.RecordRecords [get]
 
- Properties inherited from Crosstales.DJ.Provider.IRecordProvider
bool LoadTag [get, set]
 Load the tag of every Record in the constructor. This is a time-costly operation and can lead to stuttering. More...
 
bool ReadFileSize [get, set]
 Read the file size of every Record in the constructor. This is a time-costly operation and can lead to stuttering. More...
 
bool AutoUpdate [get, set]
 Auto-update the record list. More...
 
bool isReady [get, set]
 Checks if the provider is ready to work. More...
 
System.Collections.Generic.List< Crosstales.DJ.Model.RecordRecords [get]
 Returns the list of all audio records from this provider. More...
 
double TotalPlaytime [get]
 Returns the total playtime in seconds from the provider. More...
 
long TotalSize [get]
 Returns the total size in bytes from the provider. More...
 
- Properties inherited from Crosstales.DJ.Provider.IRecordProviderDB
bool hasDBFile [get]
 Checks if the provider has a DB-file. More...
 
string DBFilePath [get]
 Path for the DB file. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Crosstales.DJ.Provider.BaseRecordProvider
static string determineAudioFormatExtension (Crosstales.DJ.Model.Enum.AudioFormat audioFormat=Crosstales.DJ.Model.Enum.AudioFormat.MP3)
 
- Events inherited from Crosstales.DJ.Provider.BaseRecordProvider
Crosstales.DJ.RecordsChange OnRecordsChange
 An event triggered whenever the records change. More...
 
ProviderReady OnProviderReady
 An event triggered whenever all providers are ready. More...
 
Crosstales.DJ.ErrorProvider OnErrorProvider
 An event triggered whenever an error occurs. More...
 

Detailed Description

Path based record provider.

Member Function Documentation

◆ Load()

override void Crosstales.DJ.Provider.RecordProviderPath.Load ( bool  forceReload = false)
virtual

Loads all audio records for this provider.

Parameters
forceReloadForce reloading the records (optional).

Reimplemented from Crosstales.DJ.Provider.BaseRecordProviderDB.

Member Data Documentation

◆ Extension

string Crosstales.DJ.Provider.RecordProviderPath.Extension => determineAudioFormatExtension(Format)

Returns the extension of the provider.

Returns
Extension of the provider.

Property Documentation

◆ Format

Crosstales.DJ.Model.Enum.AudioFormat Crosstales.DJ.Provider.RecordProviderPath.Format
getset

Audio format of the files.

◆ Path

string Crosstales.DJ.Provider.RecordProviderPath.Path
getset

Path containing the records.

◆ Recursive

bool Crosstales.DJ.Provider.RecordProviderPath.Recursive
getset

Scan the path recursively (incl. sub-directories).

◆ SlowAndSave

bool Crosstales.DJ.Provider.RecordProviderPath.SlowAndSave
getset

Use the slow but save scan method.

◆ UseMusicLibrary

bool Crosstales.DJ.Provider.RecordProviderPath.UseMusicLibrary
getset

Use default music library - this overrides the 'Path'-setting on supported platforms.

◆ WatchDog

bool Crosstales.DJ.Provider.RecordProviderPath.WatchDog
getset

Add a watchdog to the path to be notified about changes, like new files etc.


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/DJPro/DJPro/Assets/Plugins/crosstales/DJ/Scripts/Provider/RecordProviderPath.cs