home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
Moving Pictures cause MP to crash
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sebastiii" data-source="post: 1015912" data-attributes="member: 60104"><p>I have similar issues on my laptop (but on final folder)</p><p>I have try to add try / catch on movpic code and i can't reproduce it anymore. (lucky that i have trigger the issue with debug dll <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> )</p><p>This is strange because (but surely normal) i need to add the try/catch in existent try/catch <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p> </p><p>Now : </p><p>[CODE] // monitor existing paths for change</p><p> while (true) {</p><p> // if the filesystem scanner found any files, add them</p><p> lock (filesAdded.SyncRoot) {</p><p> try</p><p> {</p><p> if (filesAdded.Count > 0)</p><p> {</p><p> int processed = 0;</p><p> int total = filesAdded.Count;</p><p> foreach (object currFile in filesAdded)</p><p> {</p><p> DBLocalMedia addedFile = (DBLocalMedia) currFile;</p><p> if (!fileList.Contains(addedFile))</p><p> fileList.Add((DBLocalMedia) currFile);</p><p> </p><p> processed++;</p><p> if (Progress != null)</p><p> Progress((int) (processed*100.0/total), processed, total, "Queueing files..");</p><p> </p><p> }</p><p> </p><p> filesAdded.Clear();</p><p> Progress(100, processed, total, "Done!");</p><p> }</p><p> }</p><p> catch (Exception Ex)</p><p> {</p><p> logger.ErrorException("Exception import paths {0}.", Ex);</p><p> }</p><p> }</p><p> </p><p> // Process the new files[/CODE]</p><p> </p><p>Before : </p><p> </p><p>[CODE] // monitor existing paths for change</p><p> while (true) {</p><p> // if the filesystem scanner found any files, add them</p><p> lock (filesAdded.SyncRoot) {</p><p> if (filesAdded.Count > 0) {</p><p> int processed = 0;</p><p> int total = filesAdded.Count;</p><p> foreach (object currFile in filesAdded) {</p><p> DBLocalMedia addedFile = (DBLocalMedia)currFile;</p><p> if (!fileList.Contains(addedFile))</p><p> fileList.Add((DBLocalMedia)currFile);</p><p> </p><p> processed++;</p><p> if (Progress != null)</p><p> Progress((int)(processed * 100.0 / total), processed, total, "Queueing files..");</p><p> </p><p> }</p><p> </p><p> filesAdded.Clear();</p><p> Progress(100, processed, total, "Done!");</p><p> }</p><p> }</p><p> </p><p> // Process the new files[/CODE]</p></blockquote><p></p>
[QUOTE="Sebastiii, post: 1015912, member: 60104"] I have similar issues on my laptop (but on final folder) I have try to add try / catch on movpic code and i can't reproduce it anymore. (lucky that i have trigger the issue with debug dll :) ) This is strange because (but surely normal) i need to add the try/catch in existent try/catch :) Now : [CODE] // monitor existing paths for change while (true) { // if the filesystem scanner found any files, add them lock (filesAdded.SyncRoot) { try { if (filesAdded.Count > 0) { int processed = 0; int total = filesAdded.Count; foreach (object currFile in filesAdded) { DBLocalMedia addedFile = (DBLocalMedia) currFile; if (!fileList.Contains(addedFile)) fileList.Add((DBLocalMedia) currFile); processed++; if (Progress != null) Progress((int) (processed*100.0/total), processed, total, "Queueing files.."); } filesAdded.Clear(); Progress(100, processed, total, "Done!"); } } catch (Exception Ex) { logger.ErrorException("Exception import paths {0}.", Ex); } } // Process the new files[/CODE] Before : [CODE] // monitor existing paths for change while (true) { // if the filesystem scanner found any files, add them lock (filesAdded.SyncRoot) { if (filesAdded.Count > 0) { int processed = 0; int total = filesAdded.Count; foreach (object currFile in filesAdded) { DBLocalMedia addedFile = (DBLocalMedia)currFile; if (!fileList.Contains(addedFile)) fileList.Add((DBLocalMedia)currFile); processed++; if (Progress != null) Progress((int)(processed * 100.0 / total), processed, total, "Queueing files.."); } filesAdded.Clear(); Progress(100, processed, total, "Done!"); } } // Process the new files[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
Moving Pictures cause MP to crash
Contact us
RSS
Top
Bottom