Author Topic: File Rescan Missing?  (Read 29078 times)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
unzip and replace the existing musicbee files:
http://musicbee.niblseed.com/V2_5/MusicBee_Exe_Patched.zip

this is the final planned update for this functionality:
- continuous monitor now detects deleted and renamed files
- however the way windows works is when you move a file from one folder to another, its messaged as a create (in the new folder) and then a delete (in the old folder). There isnt a guaranteed way i could figure out how to link the two messages. What that means is if you do that, then you won't lose the file from your library, but you will lose playcounts, any tag data that is only cached in the musicbee database, and the file would be moved to the Inbox if configured that way in the monitor. The same would happen on startup if you moved the file when MB wasnt running
- renaming the directory or the filename only should work fine
- deleted files are removed from static playlists
- this also fixes a couple of small bugs with yesterday's version for new file detection on startup
- this version also provides more feedback about the changes detected

redwing

  • Guest
Great. Now it detects changes in continuously monitored folders immediately without having to rescan manually.

- continuous monitor now detects deleted and renamed files

While MB is running, if I delete (or move) inbox files from a continuously monitored folder using Windows Explorer, it gets soon auto-updated.
But if I rename an inbox file using Windows Explorer, it requires to refresh the inbox node to update filename column in the main panel. Also if I run "File: Rescan Monitored Folders" command, the filename gets updated but with status bar message "No changes".

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
the first is fixed for the next update

Also if I run "File: Rescan Monitored Folders" command, the filename gets updated but with status bar message "No changes".
the manual rescan does not detect renamed files (imagine you did it while MB is not running). It should have been removed from the Inbox and either added to the library or inbox using the new filename depending on your settings

edit:
link is updated with the correction
Last Edit: January 20, 2015, 10:32:56 PM by Steven

redwing

  • Guest
I renamed the inbox file while MB is running, but for some reason it no longer detects renamed files as you said. I might have refreshed the node previously, but I'm not sure why I can't reproduce it any more.
Anyway does that mean "File: Rescan Monitored Folders" command detects only new/missing files?

redwing

  • Guest
If I copy tags (ctrl C & ctrl V) from a library file to an inbox file (both library and inbox files reside in continuously monitored folders), the file soon gets removed from inbox with the message "Monitored folders: 1 file removed" (the file remain in the folder, only removed from inbox). File rescan of the folder doesn't help. If I restart MB, the file comes back with "Monitored folders: 1 file added".

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
thanks - i've been testing out the continous monitoring quite a bit and found a couple of obscure bugs. I will post a fix later today

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
If I copy tags (ctrl C & ctrl V) from a library file to an inbox file (both library and inbox files reside in continuously monitored folders), the file soon gets removed from inbox with the message "Monitored folders: 1 file removed" (the file remain in the folder, only removed from inbox). File rescan of the folder doesn't help. If I restart MB, the file comes back with "Monitored folders: 1 file added".
i cant reproduce this. Its possible i have already fixed it but i am not convinced about that, so could you try with this version
http://www.mediafire.com/download/0b4ve848w3b6jo1/MusicBee.zip
is it something you can reproduce with the current version you have? Also I would find this behaviour more plausible if you were using the replace existing file command
Last Edit: January 24, 2015, 09:56:15 AM by Steven

redwing

  • Guest
The linked version fixed it. Thanks!

Yes, the bug was always reproducible using the latest version. No, didn't use replace command. Just copy and paste whole tags between files.

redwing

  • Guest
I had got this error while using the latest version when I ran file rescan for a folder when the file was removed from inbox. Don't know this would be helpful since you already fixed it.

6.1.7601.65536 - 2.5.5498.40465 - System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at #=qlwD4s_$s5Rij6W8s5Kjt9pOurl6AL9k8tPvyWnjyon1VBlwIT94G8IQYFKSRi7Xk.#=qlkFKPpyV2YS$9Spi0f3vT0NdvFWICpgDdhlF1DPuNsSOBOlkA09HAgoqFauwiQDp(Object #=qjnPvy751Gr4TyGjhqHRe4g==, RetrieveVirtualItemEventArgs #=qXcXcNl5LmnIbC_vzrQe8Iw==)
   at System.Windows.Forms.ListView.OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs e)
   at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at #=qlwD4s_$s5Rij6W8s5Kjt9pOurl6AL9k8tPvyWnjyon1VBlwIT94G8IQYFKSRi7Xk.#=qz5xDamBllHe$akNS0O38KQ==.WndProc(Message& #=qNDVr8ykoxofImIT4A$LrmQ==)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
the mediafire link is updated with a fix for when created folders with files are detected by the continuous monitor, it was including non-media files.
Also it now handles when a library file is updated by an external tool and one or more of the fields that are used for naming in an auto-organised library then the file is now re-organised (edit: I've changed my mind about this and it now no longer re-organises the file in this cirsumstance)

http://musicbee.niblseed.com/V2_5/MusicBee_Exe_Patched.zip
Last Edit: January 24, 2015, 01:51:35 PM by Steven

redwing

  • Guest
1. While MB is running, open an inbox file (in a continuously monitored folder) with another app like audacity.
2. Try to delete the file from inbox. Then it shows Windows' "File in use" error message.
3. However, the file gets removed from inbox despite the error message. File rescan of the folder doesn't restore the file.
4. Restart MB, then the file comes back with "Monitored folders: 1 file added" message.

The file shouldn't be removed from inbox in the first place as the file wasn't deleted.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
i assume you mean permanently delete and not remove the file from the inbox. In which case i guess Audacity has the file open and hence windows cant delete the file.
Can you confirm thats what you are saying.

redwing

  • Guest

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
i cant reproduce the error with Audacity but i can see why the link is being removed when the file is locked so thats fixed:
http://musicbee.niblseed.com/V2_5/MusicBee_Exe_Patched.zip

redwing

  • Guest
It makes no differences. Still gets removed from inbox and then gets restored upon restart.

I think the problem is "delete from library and computer" is a mixed command. So it deletes from inbox (as part of library) but couldn't delete from computer because it's in use. Then it gets restored as a new file (new date added) since it's newly found from monitored folders. All makes sense. The only issue is it confuses the user. So it would be better to abort even "delete from library" part as I requested.