mwheelerjr / mptvseries

Automatically exported from code.google.com/p/mptvseries
0 stars 0 forks source link

Additional debug logging when Tv-series does not find an existing file in the library #625

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm helping to debug the FlexRAID storage pool functionality (this is like the 
WHSv1 Drive Extender). In its current state there is some strange behaviour 
when used with Tv-series. (Randomly dropping series)

Unfortunately no errors appear on the FlexRAID side so it thinks everything is 
"business as usual" and we gain no insight from its own detailed logging.

Is it possible to add additional *debug* level logging during the TV-series 
run-time import (this only happens when MP is running, for some reason the 
config app import always works):

- When Tv-series marks a media item for removal
- due to not finding the file that already exists in the library
- why did it make this decision
- any error codes / security / permission / read errors? Any directory 
traversal errors?

This would help immensely.

Thanks

Original issue reported on code.google.com by web...@gmail.com on 11 Dec 2011 at 9:41

GoogleCodeExporter commented 9 years ago
While doing additional testing we find that FlexRAID is reporting/logging that 
a file is found , e.g. 

FR log on the server side:
[2011-12-13 21:30:23.863315][2408][OnEnumerateDirectory] 
\Videos\Series\House\House Series 6
[2011-12-13 21:30:23.863316][2408]      Found [\Videos\Series\House\House Series 
6]->[House S06E01.mkv]

Yet in the TV-series log it reports:

00000013 - 14/12/2011 8:30:37 AM - Episode is marked for removal from database, 
file: '\\niles\Videos\Series\House\House Series 6\House S06E01.mkv', volume 
label: '\\niles\Videos\Series'
00000013 - 14/12/2011 8:30:37 AM - Cache: DB Write operation: local_episodes

Not sure what is going on.

Very helpful if we can see what Tv-series is seeing on the client side.

Original comment by web...@gmail.com on 13 Dec 2011 at 9:52

GoogleCodeExporter commented 9 years ago
Hi webs0r, for network shares we get a list of files that exist in your folders 
using standard .net libraries: System.IO.Directory.GetFiles()

We then compare periodically the difference from previous scan and if there is 
new or removed files we take the appropriate action ie add run or remove run.

For Local folders we use standard filesystem watcher events but cant use these 
for network shares as its unreliable so we do periodic scans instead.

I have no insight as to why with Flex you are seeing files removed but the code 
in question that reads the files in y9our import paths is located here:
http://code.google.com/p/mptvseries/source/browse/trunk/MP-TVSeries/Local%20Pars
ing%20Classes/Filelister.cs#58

Original comment by damien.haynes@gmail.com on 19 Dec 2011 at 11:38

GoogleCodeExporter commented 9 years ago
Here is the code in question that does the checks:
http://code.google.com/p/mptvseries/source/browse/trunk/MP-TVSeries/Local%20Pars
ing%20Classes/Watcher.cs#644

m_PreviousScanRemovable is what would store files for network paths.

Hopefully this is of some help to you.

Original comment by damien.haynes@gmail.com on 19 Dec 2011 at 11:41

GoogleCodeExporter commented 9 years ago
Thankyou

Original comment by web...@gmail.com on 23 Dec 2011 at 9:48