Configuration – Spy – Play counts

The page describes configuration options for the Playcount processing module when in Spy mode. The configuration file was initialised by the configuration wizard. Any changes will need to be done manually using the desktop shortcut named “Configuration (MyScrobble.ini)”

See here for an description of the application’s configuration framework.

See here for a description of the configuration wizard which created the configuration file for this mode

See here for a Quick Start guide to Spy mode configuration

See here for a Quick Start guide for the configuration steps to turning on AlbumPlays scrobbling Sonos owners only

See here for a description of the configuration options for the other module (“Observation & Detection”).

Option settings index

The main options used in SPY mode are listed below. Some notes follow, and further details can be found at the Configuration documentation shortcut on your desktop or task bar:

Configuration for your email credentials (optional) are not held in the ini file for security reasons. That topic is covered here.
Google Play Music credentials (optional) are not held here either. That topic is covered here.

Task Option name Section
Location settings
– albumPlays database _database [general section]
– mediaMonkey database _MM_db_path [general section]
– communicate with Spy module _nas_path [general section]
– SPY transfer database _external_spy_database [general section]
– MissedTracks playlist _playlist_directory [general section]
– Spy text transfer dir _spy_txt_export_directory [general section]
– match by location – Sonos _track_location_prefix_sonos [general section]
– match by location – MM _track_location_prefix_mm [general section]
– backup repository location 1 _bu_lan_path [gui]
– backup repository location 2 _bu_lan_path2 [gui]
Configuring for Spy mode _source_lfm [general section]
– using the text conduit always _spy_data_from_txt [get] |
Scrobble settings
– scrobble? .. scrobble whom? _scrobble_mode [gui]
– scrobble radio tracks? _scrobble_radio [crunch]
never-scrobble tracks _suppress_some_track_scrobbles [crunch]
Listeners: list _lfm_id_list [general section]
Streamed track settings _offer_streaming_wizard [gui]
_suppress_pause_for_streamed_confirmation [gui]
_force_pause_for_streamed_confirmation [gui]
_suppress_default_unmatched_to_streamed [massage] |
Application backup settings
– frequency? (in days) _backup_cycle [gui]
– locations _bu_lan_path [gui]
_bu_lan_path2 [gui]
Importation Review settings during Get _importation_review_comfort_limit [gui]
__suppress_importation_review_comfort_warning [gui]
Playlist settings
– exclusion: genre fragments _playlist_genre_filters [general section]
– “Sonos-sort” multi-artist tracks __playlist_seq_multi_artist [general section]
– locations _playlist_directory_sonos [general section]
_playlist_directory_nas [general section]
_playlist_track_location_prefix_nas [general section]
_playlist_\directory_\usb [general section]
_playlist_track_location_prefix_usb [general section]
Match on just artist & track _allow_match_ignoring_album [massage]
Supress auto-application of fuzzy logic tag corrections when matching scrobbles _suppress_auto_fuzzy [massage]
Enable lost scrobble resurrection _resurrect_lost_scrobbles [gui]
Missed Tracks playlist settings
– auto-generate the playlist? _generate_missedtracks_playlist [general section]
_missed_playlist_file_name [general section]
_missed_playlist_album_cutoff [general section]
_missed_playlist_track_cutoff [general section]
Non-Sonos scrobbles
– default to suppressed? _others_suppressed=Y [gui]
– from which LFM account _user [get]
Date & time settings _locale_date_format [general section]
_locale_time_format [general section]
Miscellaneous settings
limit rows read from LFM _limit [get]
ignore your historic scrobbles _when_limit_use_newest [get]
override rule grid row limit _remap_rule_grid_limit [gui]
_remap_rule_grid_include_fixed [gui]
_remap_rule_grid_include_streamed [gui]
override play history grid limit _edit_play_history_grid_limit [gui]
duplicated plays OK? _how_handle_duplicates_in_fresh_batch [gui]
you have no blank album tags? _no_blank_album_tags [general section]
override MediaMonkey version _mm_version [general section]
transfer individual scrobbles to MM _mm_update_contents [crunch]
o’ride which MM db columns are used _mm_col_for_album_play [general section]
_mm_col_for_album_last_play [general section]
override logging level _debug [general section]
Location settings
  • use the tilde character to specify the home directory for your Windows profile folder (ie. ~/My Documents/AlbumPlays for c:\Users\<your_profile>\My Documents\AlbumPlays)
  • the _nas_path setting specifies an override location for the directory used by this application to store some temporary files it reads and writes. If you are using the “Observe & Detect” Spy component, the directory location needs to be available to both components, and it must the same directory specified in that other component’s own _nas_path option. By default this directory will be used for:
    • hold the optional transfer database for Spy track play observations
    • the export location for AlbumPlays playlists
    • the export location for the optional text transfer file of Spy track play observations
    • where you will find the html menu allowing you to control the “Observe & Detect” component from within the browser on your main computer
    • where the “Observe & Detect” component will export its log file to, so you can observe what is going on in there
    • the default location for AlbumPlays’ application backup repository
  • each of these may be overridden to their own location, or may be written to a directory relative to that specified by _nas_path, by specifying a relative directory (one not starting with neither a slash, nor a drive letter) in their own option setting
  • you can also use the token {nas}, in a path definition, as a shortcut to refer to the above path, eg:

        _bu_lan_path2 = {nas}\Backups_level_2
  • the _database setting for the application is required, all the other are overrides, and are optional. You must supply the full path to your database, ie. this option does not use the _nas_path path prefix. AlbumPlays will usually work best if your database is stored the same PC which is running MediaMonkey and this Play Counts AlbumPlays component.

  • the _external_spy_database is an optional override to the default location (_nas_path), and|or to the default file name (AlbumPlays_Spy.db) used for the optional transfer database, where track play observations may be received from the Spy module. You may either specify an alternative file name for the database, or provide a path relative to the path specified in the _nas_path setting, or provide an independent absolute path to the database file.

  • by default, playlists are written to a directory named AlbumPlays_playlists, in the path resulting from your _nas_path choice.

  • you can override this generic location with the _playlist_directory option, which will override the default base location for all playlists. You may specify a full path, or you can specify a directory relative to _nas_path, by using a non-absolute path, ie. one not starting with a slash nor a drive letter (eg. _playlist_directory=playlists).
  • in either case, AlbumPlays creates the generic playlist folder if it doesn’t already exist

    • If you are using AlbumPlays’ multi-target facility for playlists, you will want to provide a separate location for some or all of the playlist targets. Non-absolute paths will be be relative the generic playlist location, or you may specify absolute paths. … In the following example the Sonos playlist folder is relative, and will therefore be \your_NAS/your_share/AlbumPlays_playlists/playlists_for_sonos. The usb one is absolute, and will therefore be H:\MyPlaylists

      [general section]
      _nas_path = \\your_NAS/your_share/
      _playlist_directory_usb = H:\MyPlaylists 
    • target playlist folders are also auto-created if they don’t already exist, excepting for the _playlist_directory_usb. There is no AlbumPlays requirement to keep your usb drive mounted, so AlbumPlays is unable to be sure whether that directory exists … if you are using a usb target, you need to manually create its playlist folder
    • the Missed Tracks playlist is written to each of the target playlist folders that you define, and also to the generic playlist directory if one or more of the target locations is not defined

    • Sonos owners: Playlist paths will need to be indexed by Sonos to enable it to see your playlist (ie. in the Sonos DeskTop controller, press the Add button in the Folders tab of Manage|MusicLibrarySettings)

  • the _spy_txt_export_directory is an optional override to the default export location (_nas_path) for the text transfer file of Spy observations

  • the track location options (_track_location_prefix_sonos & _track_location_prefix_sonos) are only required if AlbumPlays requires translation assistance to match your Sonos Spy observations back to MediaMonkey. There is a utility to show you whether this is needed, and how to configure this option.
  • the two backup location options (_bu_lan_path & _bu_lan_path2) are discussed here

  • you only need to use the _MM_db_path option if you have moved the MediaMonkey database away from its default location

        [general section]
        _mm_db_path = ~\My Documents\AlbumPlays\MM.DB
Data source

Not required, as AlbumPlays’ default mode is Spy mode. If this option is specified it should be set as:

[general section]

The default Spy conduit is via the database (see here for a description of the transfer options).

The Spy source may be temporarily overridden to the text file via the “Set Options” button on the application’s front panel.

Alternatively the Spy source may be permanently overridden to the text file with the _spy_data_from_txt option


Each Listener needs to be enrolled in the application database. See here for more information about Listeners, including database enrolment.

The _lfm_id_list specification is optional. It is a blank separated list of the valid Listener IDs in use for the household. The option causes AlbumPlays to check whether all of the listed Listeners are enrolled into the database, and will offer to auto-enrol any missing ones. It is a requirement that identical IDs (including use of upper|lower case characters) are used for each active Listener across both the Observe & Detect and the Playcounts components. This option setting line may be copied across from the Observe & Detect component’s configuration file, to help ensure that have specified all IDs correctly. …. As use of this option is optional, there is no complaint if the database already contains Listeners who are not contained in the option list.

The _user setting is optional. You can only specify a single Listener ID for this option. It is required if you want to supplement Sonos plays, with plays made on non-Sonos devices, or plays made at other locations. This option specifies the Listener ID of the person whose account will be searched for any non_Sonos plays to be imported into the MediaMonkey database.

It option is also be required if you are using user mode scrobbling (see _scrobble_mode=user in the following section)

[general section]
_lfm_id_list=BJM AKM HMP

The Scrobbling Quick Start guide is the best way to get overview of scrobbling configuration. There is more required than just the ini file setting illustrated below.

The option default is to not scrobble, meaning that this application will update play data into MediaMonkey, but assumes that if you have a account, you are still using your Sonos equipment to handle any scrobbling requirement.

The _scrobble_mode options are described here

Here is how to override this default setting with group scrobbling:


Or here is how to specify user scrobbling:

[general section]
_user = BJM

Remember that you need to turn Sonos scrobbling off to avoid double scrobbling.

Never-scrobble tracks

This option is relevant only where you have configured AlbumPlays to scrobble.

You may select to permanently never scrobble specific tracks for a specific Listener, or for all Listeners.

Track selection for this optional feature, is by Genre. You may specify one or more genres, to be suppressed from scrobbling, for a specific Listener, or for All Listeners.

The specification of the genre name is not case case sensitive, and you may specify the whole genre name, or just a part of the genre name. … eg. a specification of “rock” would suppress all tracks tagged with “Rock“, as well as tracks tagged with either “Classic Rock” or “Krautrock

nb: remember that MediaMonkey allows you to assign multiple genres for any track, so the easiest way to use this feature may be to invent some non-scrobbling genre name, and then assign it, as an additional genre, to all the tracks that you want permanently suppressed from scrobbling.

The specification is a blank separated list, of one or more ListenerID:Genre pairs. A Listener ID of * selects all Listeners. … You may provide more than one Genre name, or name-fragment, for a Listener.

_suppress_some_track_scrobbles=tom:rap sue:orch tom:punk *:pop

In the above example:

  • any tracks which had genres such as “pop”, “POP”, or “popular”, would be suppressed for every Listener
  • and any tracks tagged with a genre of “rap”, or “Trappist Melodies”, or “Punk” would be suppressed for Tom
  • and any tracks with “Orchestral” and “Classical – orchestral” for would be suppressed for Sue
Application backups

Set the application backup cycle frequency, in days, as shown below. Example: a setting of 7 would cause a fresh backup of the AlbumPlays & MediaMonkey databases to taken every 7 days.

There will be no application backups if this optional setting is not set, or is set to a value of 0.

_backup_cycle = 5

On its own, this option will just cause each successive backup to overwrite the last backup. See here an explanation of AlbumPlays’ application backup facility, and for the additional steps required to set up a multi-level backup repository.

The following three settings allow you to override the default paths for optional level(s) within your backup repository. You may use neither, either or both of these options.

_bu_lan_path = ~\My Documents\AlbumPlays\Backups
_bu_lan_path2 = \\your_NAS\your_share\AlbumPlays\Backups_level_2
_bu_lan_path3 = \\your_NAS\your_share\AlbumPlays\Backups_level_3

If you make no location override configuration, the backups will be stored in the default repository locations, as documented towards the end of the “Location” section found here

nb: see here for the options available when configuring path values for AlbumPlays.

The built-in application backup facility also has provision for automatic transfer of backup copies to an offsite location at Dropbox. Configuration details are found here.

It is important that you “firedrill” your backup set up, ie. restore both databases at least once, to verify that they are usable.

Importation Review; review and authorise new plays before importation

You may tune the Importation Review, which is a sub-step of Spy mode’s Get action.

This step allows you to review fresh plays before they are imported into MediaMonkey, and before Sonos plays are scrobbled to (where you are using AlbumPlays to scrobble your Sonos plays). You may suppress importation of any LFM scrobble or any Sonos play, or re-assign a Sonos play to a different Listener to that deduced by the Spy module.

You may tune this facility to your own listening preference, by reviewing and suppressing at either the individual tracks level, or summarised at the whole album level.

The Importation Review facility works best if the batch of fresh scrobbles is somewhere around 300 tracks (typically that would be around 20 hours of music). AlbumPlays still can handle a batch size around three as large as that, but smaller is more comfortable.

There is a warning message where your batch sizes exceed the 300 track comfort level, and you get offered the chance to accept the whole batch without review. … You can adjust when the warning message cuts in, or you can suppress the message altogether.

Non-Sonos scrobbles

“Other” scrobbles are your non-Sonos scrobbles, ie. scrobbles from your other equipment or locations, which are downloaded from your free account into MediaMonkey. AlbumPlays automatically filters out any Sonos plays which are already already known to MediaMonkey.

The _user option specifies the Listener whose account will be used as a source for “other” scrobbles. Only one Listener may be specified.

The _others_suppressed option specifies whether or not the “other” scrobbles are suppressed by default. This is a convenience option to tune AlbumPlays to your normal your listening preferences:

  • if the majority of your non-Sonos plays are listening to streamed tracks that you don’t own, you could set to “y” This would default all your non-Sonos plays to suppressed, and then you only have to manually un-suppress plays of any material sourced from, or duplicated in, your own library
  • if the majority of your plays are of your own music, you should not use this option (or set it to “n”), so that by default your “other” scrobbles are not suppressed.

Here is an example:

Allow ignore of album tag during scrobble match

AlbumPlays matches your imported scrobbles to your MediaMonkey database via the Artist, Album & Track tags. Where no full match is found AlbumPlays has an optional facility to try and obtain a match using only the Artist & Track name tags.

AlbumPlays is installed with this option turned on, as it can greatly reduce the drudgery during the database seeding process.

Leaving this optional setting turned on could cause AlbumPlays to attribute the play to the wrong version of the track, if you have multiple versions of the same artist|track tag set, maybe in separate albums. … It is not as too much of a problem because it can only happen where there is no match using the full artist|ALBUM|set.

If you chose to turn this time-saving option off, you would then need use the action lists to create a remapping rule for any unmatched scrobbles, which is probably a better option once you have fought your way through the database seeding task. Either of the following options will turn OFF this time-saving option.

_allow_match_ignoring_album = N

or by commenting out the default line in your configuration file:

#_allow_match_ignoring_album = Y
Suppress auto-application of fuzzy logic while scrobble matching

By default, AlbumPlays will automatically attempt to resolve any fresh scrobbles, which cannot be matched against your current track tags for some reason. It does this by trying to find the correct track, by using fuzzy logic to see if any track has a tag set which is a close enough match to the scrobble tags. You can suppress this default assistance with the following configuration option.

If suppressed, AlbumPlays will still make suggestions for scrobble tag corrections, but you will need to review and authorise them before they are used. The combo-boxes in the Edit|ActionList menu items will be pre-populated with the fuzzy logic suggestions, but these will not be used until you press the Update button, and then rerun the Approve action.

Enable lost scrobble resurrection

If you typically listen to whole albums, rather than mixed track playlists, you may want to enable the lost scrobble resurrection logic, which is off by default.

If you are listening to mixed track playlists scrobble resurrection will add overhead, but mostly generate false positives. For this reason it is turned off by default.

The use of the following option will turn scrobble resurrection on. During the *Approve” action you will be presented with a list of proposed lost scrobble resurrections. You may reject any of these, and those that you accept will be uploaded into MediaMonkey.

Streamed tracks

The Streaming Wizard is an optional extention to AlbumPlays’ regular Approve processing action. The Wizard is turned off by default. It is aimed at simplifying the handling of unknown streamed items. It facilitates “adoption” of tracks or album from Google Play’s subscription streaming serice into your MediaMoneky database. It is also a streamlined way to “hide” tracks or albums which you stream from any streaming service, but don’t wish to adopt into MediaMonkey.

If you wish to use the Streaming Wizard you enable it by


There are also options which affect the regular processing cycle with regard to streamed plays (ie.outside the optional Streaming Wizard).

There is optional logic to handle scrobbles obtained from, and which are suspected as being played from a music streaming service. These tracks may, or may not, be in your own collection. There are two ini file settings to override the default behaviour.

The first can stop the GUI Express Wizard from pausing for confirmation whenever the fresh batch of scrobbles obtained from contains any unmatched tracks which are suspected as being streamed. (See here for the aim of the confirmation step).


The second option will suppress the logic which defaults as being streamed, any unmatched scrobble freshly obtained from, where neither the artist nor the album title are found in MediaMonkey. (See the same link for more information)


There is also an option which can modify the default behaviour regarding Sonos Spy observations which cannot be matched back to your MediaMonkey database. By default these are excluded from the upload to MediaMonkey, without requiring your confirmation. You can force the requirement for confirmation via the following option. More information is available here

AlbumPlays playlists

See the Location settings section above for settings regarding the export locations for all playlists, including the Missed Tracks playlist

The following section not address the special Missed Tracks playlist – see the bottom of this.

You can restrict a subset of your tracks from ever being considered as candidates for playlist inclusion by specifying the _playlist_genre_filters option. This is a blank separated list of genres, or a fragment of the name of any genres, whose tracks you never want to see in an AlbumPlays playlists (does not impact the Missed Tracks Playlist). The following example would exclude any tracks which were tagged with any of the following genres; “Kids”, “Duplicates”, “duplicates” & “Audience Taped”

[general section]
_playlist_genre_filters=Kids Duplicates Taped

nb: MediaMonkey allows you to tag any track as being part of more than one genre; you need to separate the genres with a semicolon and then a blank. eg. Jazz; Favourite
So you could elect to create a dummy genre, just for the purpose of excluding some of your tracks from ever appearing in a playlist:

You can translate the track locations, as known by MediaMonkey, to an alternative location. This is primarily intended to handle a situation where you have replicated your music collection onto a WiFi USB drive which you use while travelling away from home.

[general section]

You can influence how tracks, with multiple artist or albumartist tags, are sorted and displayed in your playlists.

A playlist entry may only have a single value for each tag type, so if your track has been tagged with multiple separate artist tags, only one will be used when the playlist entry is generated.
eg. MediaMonkey allows you to list the album Raising Sands both under Robert Plant, and also under Alison Krause, but for playlists purposes you have to chose one of these artists if you have them as separate tags.
A Sonos owner will probably have placed the most significant artist as the last tag, as Sonos only indexes the last tag for tracks which have multiple tags.

By default, AlbumPlays will produce playlist entries using the 1st Artist tag. The same thing with the AlbumArtist tags.

You may override this with the following option.

[general section]
Missed Tracks PlayList

The aim and configuration of the MissedTracks facility is discussed here

Date and time formats

Miles Davis was born on the May 26th, 1926. By default this application would describe this date as 26/05/1926. By default times are shown in 24 hour format.

You can modify the defaults as shown here.

Miscellaneous Settings
Limit quantity of scrobbles downloaded from

Only applicable when using the Get action with the “Source” radio button set to LFM, ie. getting “other” non-Sonos scrobbles.

A limit can be applied to the number of fresh scrobbles which are downloaded from by a single Get action. The limit is only of any use during the process where a new database is seeded with historic scrobbles. In regular use you are unlikely to have sufficient fresh scrobbles to warrant use of this option. If it has been left on, you may want to turn it off.

It is discussed here.

Ignore your historic scrobbles; start fresh from today

You can chose to ignore your historic scrobbles at This would mean that AlbumPlays and MediaMonkey only have new scrobbles, starting from now.
This topic is covered here, and the configuration settings are:

    _limit = 2
Action list grid limit; scrobble mismatches

The action list grid where you edit mismatched scrobbles (discussed here) has a size limitation. The application may become sluggish, and may break, if this limit is set too high.

You can override the limit each time that you use this facility, or you can reset the default as shown below. The default limit is 200 rows.


If the above Action List row limit is exceeded, AlbumPlays tries to conserve space in the editing grid, for templates requiring action, by excluding “fixed” and “streamed” templates. By default these are included back into the diting grid only if you set their inclusion checkboxes on the Action List’s sub-batch handler. … The following configuration options reverse this default, … ie. default the check-boxes for inclusion.

Edit|PlayHistory grid limits

The action grid where you edit play history (discussed here) has a size limitation. The application may become sluggish, and may break, if this limit is set too high.

The current limitation is 500 rows. If your search criteria returns more rows than this, you will be warned, and only the first 500 rows will be displayed.

The best way to work around this limitation is to narrow down your search, with a more specific search criteria. The following areas are affected:

  • search for target album or artist … a search for f would try to return a row for any artist or album containing the letter “f” …. if you were targeting Pink Floyd, a search for flo would would be better as it would return a lot fewer rows
  • Delete Single Plays: … this will try to return a list containing a separate row, for each play, of each track that you have selected … this could be a problem for very large album which you have played often … the best work around is to select fewer tracks at any one time

If a more specific search criteria is impractical, you could try seeing if your PC can handle a larger number of rows, example:

Handle multiple scrobbles for a track

It is not hard to generate unintentional, and unwanted, track play duplicates. This can be caused by finger fumbles when interacting with your Sonos controller or music client, or can be caused by a scrobbler becoming confused during track play interruptions on your mobile device.

nb: a ‘duplicate‘ is just defined as being for the same artist|album|track .. ie. the play does not need to have an identical time stamp.

You can configure how AlbumPlays handles track duplicates imported during a Get action. The _how_handle_duplicates_in_fresh_batch option affects the following Approve action for these scrobbles, as described [here][34]. The options are as follows:

  • either accept – the default option – silently accept the duplicates; use this if you commonly replay tracks, and want each play recorded
  • or warn – accept all duplicates, but issue a warning during the Approve action … There are tools to identify and deal with the duplicates later if you wish.
  • or suppress – temporarily pause processing, inform the user, and offer to auto-suppress the duplicates. If you accept the runtime option to suppress the plays, the duplicates will not be scrobbled, nor be synced to MediaMonkey.


Blank album tags

If your collection contains no tracks with blank album tags, you should set this option.

AlbumPlays works best with a traditional collection, where all tracks belong to specific albums. It has some compromises and extra overhead to accommodate collections which have some blank album tags. You can tighten up validation, and avoid some small overhead if you know that your collection has none, or minimal blank albums tags.

    [general section]
MediaMonkey version

I use version 4 of MediaMonkey. It is the default for this application, and for that version you need no configuration file entry.

MediaMonkey changed their default database location and the storage format for some dates in version 4. I haven’t used this application with version 3 for some time, so some issues may have crept in. It should still work. Contact me if you have any problems. To use version 3 you need the following

[general section]
Level of detail to transfer to MediaMonkey

By default AlbumPlays transfers just play history summaries to MediaMonkey, as that is all that it uses.

You can override this default to also transfer all individual scrobbles to MediaMonkey with the following ini file setting:

_mm_update_contents = details

See considerations about this, and important warnings, here.

Override the MediaMonkey columns used by AlbumPlays

The MediaMonkey database has no column for album play counts or last play dates. AlbumPlays takes a couple of MediaMonkey columns, which are not used in a music context, and uses them to fill the gap.

See here for further information (read the “technical details”).

You can override which MediaMonkey fields are appropriated for this purpose. Here is an example:

[general section]
Alter AlbumPlays’ logging level

The amount of information which is output to the log file can be increased. Set debug logging on as follows:

[general section]