2264: Autotag track status not updated in some conditions

Report bugs & feature requests for MediaMonkey 5 and learn about the newest builds.

Moderator: Gurus

TIV73
Posts: 108
Joined: Sat Nov 12, 2011 1:31 pm
Contact:

2264: Autotag track status not updated in some conditions

Post by TIV73 »

Hi,
I found a combination of autotagger settings and track properties which cause the autotag function to display an incorrect track status.

To reproduce:
- Create a new autotag plugin with the functions below

Code: Select all

requirejs('helpers/searchCommon')

webTaggers.dummy = inheritTagger('dummy', 'Common', {
  allowedTypes: 'music',

  getPluginPriority: function (type) {
    return 5
  },

  groupingSupport: function () {
    return true;
  },

  fingerprintingSupport: function () {
      return false;
  },

  searchByFingerprints: function() {
    alert('searchByFingerprints')
    return new Promise(function (resolve) {
      resolve(false);
  });
  },

  searchByTracks: function (searchManager, list){
    alert('searchByTracks')
    return new Promise(function (resolve) {
      resolve(false);
  });
  },

  searchTrack: function(searchManager, track) {
    alert('searchTrack')
    return new Promise(function (resolve) {
      resolve(false);
  });
  },

  albumSearchStep: function (searchManager, album, albumArtist, lst) {
    alert('albumSearchStep')
    return new Promise(function (resolve) {
      resolve(false);
  });
},
  
  searchByAlbum: function (searchManager, list, data) {
    alert('searchByAlbum')
    return new Promise(function (resolve) {
      resolve(false);
  });
  },
})
- Try to tag a single track with empty album property

-> The track is stuck in status Processing even after the autotag dialog reported that all lookups were completed. None of the plugin functions were called.


I did some troubleshooting (because I initially thought that my plugin just isn't working correctly) and it looks like this is happening because processAlbum in searchCommon first checks a couple of options, including the existence of an album name, and if it doesn't find one, it falls back to fingerprinting support. If that is disabled as well, it just moves on to the next item, leaving the previous one stuck in whatever status it is currently in.

It's maybe not that big of a deal since the actual lookup functionality is not impacted, but it's confusing nevertheless. Should this be considered a bug or is the plugin supposed to handle cases like this?
If so, how? Short of overriding the startSearch function, I haven't found a feasible entry point to hook into.
PetrCBR
Posts: 1702
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: 2264: Autotag track status not updated in some conditions

Post by PetrCBR »

Thanks for a feedback. Will check that.

EDIT: will be fixed in next build.
Post Reply