Codecore Logo
Quick Search
»
Advanced Search »

Music Media Library Driver

RSS
Provides a media library for music and audio files. Supports WMA, MP3, MP2, MP1, MPA, OGG, OGA, FLAC, MP+, MPC, MPP, APE, M4A, M4P, MP4, M4B files. This can be used with touch screen media controls and media player drivers to browse cover art and play music by Artists, Albums, Genres, Titles, and Playlists; and can be filtered by letters. Cover art is retrieved from the music file's meta data, or the folder's folder.jpg file. The file system is rescanned every 24 hours. The file path that this driver passes to media player devices depends on the 'Music Folder' setting of this device. If you specify a path with a drive letter then the file path will look something like: c:\music\song.mp3. If you specify a UNC path then the file path will look something like: \\MYCOMPUTER\MusicShare\song.mp3

Manufacturer: N/A


File Permissions Troubleshooting

The Driver Service runs in the background as a windows service, so it is running even when you are not logged into Windows. Because of this the driver service runs under the Windows SYSTEM user account. This is a built in Windows user account that most windows services run under.

When you use any drivers which access files (such as the music library driver) you must ensure that the driver has access to the file. Some drivers provide an optional username and password setting which can be used to tell the driver what Windows user account to use when accessing the files. This is very helpful for accessing files over a network on another machine. You do not need to specify the username and password if the SYSTEM account has read access to files. On most systems the SYSTEM account has access to all files on the local machine but not files across a network.

The following drivers require file or directory access:


* These drivers allow specifying a username, password and domain name of a Windows user account.

A common configuration complication is when the media files are not stored on the same pc as the media player or the pc that the media library is running on. In this situation the user would normally see something similar to the following error:

The 'medialibrary' device failed to scan the '\\mediaserver\media' subdirectory for media. Access to the path '\\mediaserver\media' is denied.
The error indicates that the media library driver was unable to scan the provided path since it does not have sufficient permissions to do so. In the example above you can see that a network path was specified. The SYSTEM user account does not have access to the network file share so this will not work.

There are at least four solutions to this problem:

  1. The best solution is to simply specify a username, password and domain in the driver settings for a Window account which has access to the file.
  2. Move the media files to the pc running the Driver Service that the media library is running under.
  3. Install a Driver Service on the pc that has the media files and run the media library driver from there.
  4. Change the user which the Driver Service runs under. This is done through the Control Panel -> Administrative Tools -> Services utility. In the Service's dialog box, under Log on as, select This account, and then enter the changed account information. This is an advanced topic and only recommended for those familiar with network administration and windows services. Be aware each time the software is updated the driver's user account will be reset the the SYSTEM user account and the installer would need to change it back to the desired user.


Configuration Settings

  • Music Folder : The directory to scan for music files. This directory must be accessible from the machine that the driver is to run on.

Events

Ready State Changed

The device's running and ready state changed.

Whenever Filter:

none

EventArgs:

  • Number NewValue : The new property value.
  • Number PreviousValue : The previous property value.

Instance Properties

Loaded

Gets a value indicating if the driver has successfully loaded the music library.

Accessibility : Read Only

Type: Boolean

Scanning

Gets a value indicating if the driver is currently scanning the music folder.

Accessibility : Read Only

Type: Boolean

ScanStartTime

Gets a value indicating if the driver is currently scanning the music folder.

Accessibility : Read Only

Type: DateTime

LastScanDateTime

Gets the date/time of the last successful scan of the music folder.

Accessibility : Read Only

Type: DateTime

ItemCount

Gets the number of tracks and playlists in the library.

Accessibility : Read Only

Type: Number

TrackCount

Gets the number of tracks in the library.

Accessibility : Read Only

Type: Number

AlbumCount

Gets the number of albums in the library.

Accessibility : Read Only

Type: Number

ArtistCount

Gets the number of artists in the library.

Accessibility : Read Only

Type: Number

GenreCount

Gets the number of genres in the library.

Accessibility : Read Only

Type: Number

PlaylistCount

Gets the number of playlists in the library.

Accessibility : Read Only

Type: Number

DeviceDisplayName

The display name for this device.

Accessibility : Read Only

Type: String

DeviceStartTime

The date and time when this device was started.

Accessibility : Read Only

Type: DateTime

DeviceLifecycleStage

The current lifecycle stage of the device. The stages in order are: Pending Start, Starting, Running, Stopping

Accessibility : Read Only

Type: Number

DeviceIsRunningAndReady

Indicates if the device is ready for use, ie it is in the Running lifecycle stage and all properties are valid and all methods are ready to be used.

Accessibility : Read Only

Type: Boolean

Instance Methods

GetMediaImage ( Number )

Gets the image.

Syntax

unknown GetMediaImage( Number itemID )

Parameters

itemID : The id of the item.

GetMediaFile ( Number )

Gets the music file.

Syntax

unknown GetMediaFile( Number itemID )

Parameters

itemID : The id of the item.

RescanLibrary

Rescans the music folder.

Syntax

void RescanLibrary( )

Parameters

none

SetPropertyForDuration ( String, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, Number arrayIndex, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
arrayIndex : The property's array index to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

Privacy Policy | Conditions Of Use

Copyright ©2014 Codecore Technologies, All rights reserved.