Possible bug with the "Refresh" function in DialogAlbumInfo
#1
Hi,

Using the confluence skin, in the DialogAlbumInfo panel, there is a Refresh button to fetch meta data for the current album.

When this button is clicked, the AlbumInfo panel is closed, and a dialog pops up saying "Searching album" with the album title inside the dialog body.

It seems the UI is totally blocked while this dialog is active...

I have been trying to solve this, but I am stuck. I have tracked the issue down to:

INFO_RET CMusicInfoScanner:Big GrinownloadAlbumInfo() inside ./xbmc/music/infoscanner/MusicInfoScanner.cpp

The problem seems to be related with the following loop inside DownloadAlbumInfo() (line 1230 to line 1239 in my branch):

Code:
scraper.LoadAlbumInfo(iSelectedAlbum);
while (!scraper.Completed())
{
  if (m_bStop)
  {
      scraper.Cancel();
      return INFO_CANCELLED;
  }
  Sleep(1);
}

I am not sure I understand this implementation, scraper.LoadAlbumInfo() is starting the scrapper thread, so I guess this is intended to wait for the thread completion, but it is also blocking the main UI. Shouldn't this return and wait for a message upon thread completion? Another consequence is that a progress bar cannot be displayed while the thread is working...

Is this analysis correct? Any suggestion on the right way to correct this?
Reply

Logout Mark Read Team Forum Stats Members Help
Possible bug with the "Refresh" function in DialogAlbumInfo0