DanCooper / Ember-MM-Newscraper

New Ember Media Manager - The all in one media manager for Kodi and other media centers
http://www.embermediamanager.org
299 stars 186 forks source link

Uppercase/lowercase on linux server via SMB share #238

Open wkearney99 opened 1 year ago

wkearney99 commented 1 year ago

Ran into an odd problem. 1.11.1 crashed when it found a directory wrong (and I'm not sure how it did).

The media are on a linux server, and are shared via Samba. The directories in question both existed on the linux box, but with slightly different capitalization. Deleting one of the two eliminated the error.

The two directories, with their actual case were: \vision\video\tv shows\This is Us \vision\video\tv shows\This Is Us

Note the lower case 'i' in the first one. That contains all the media. Deleting the second one (via linux ssh) fixed the issue. The second directory had no files in it, just a thumbs.db file.

The use of a CIFS share, with it's case-insensitivity, could certainly be part of the problem. The server's smb.conf is configured with '[global] case sensitive = no'. The differently 'cased' directories all show up when viewing the share from Windows. I'm wondering if there's some case simplification going on in ember that then gets confused when "the same" folder name gets scanned, but are actually different due to letter case.

Log: 2023-01-06 09:54:13.1799,Ember_Media_Manager.My.MyApplication,Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException,1,ERROR,mscorlib,"EXCEPTION OCCURRED:System.ArgumentException: Item has already been added. Key in dictionary: '\vision\video\tv shows\this is us' Key being added: '\vision\video\tv shows\this is us' at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at EmberAPI.Database.GetAll_Paths_TVShow() at EmberAPI.Scanner.bwPrelim_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)* at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at EmberAPI.Database.GetAll_Paths_TVShow() at EmberAPI.Scanner.bwPrelim_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)"

wkearney99 commented 1 year ago

I have to correct myself, deleting the empty one DID NOT correct the problem. A subsequent library update still crashed.

I had to go into the TV Shows tab and delete the offending entries and re-scan.