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
Support
General Support
Empty folders left behind on Recording drive
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="gibman" data-source="post: 659714" data-attributes="member: 25430"><p>ofcourse <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p>Ill just run a "format e:\" drive.</p><p></p><p>looking at the code we delete all files with the same name as the recording itself.</p><p>eg. myrecording.ts</p><p></p><p>it will then try and delete :</p><p>myrecording.jpg (thumb)</p><p>myrecording.xml (meta data)</p><p></p><p>it then queries folder containing the ts file.</p><p>does it anymore contain files ?</p><p>does it anymore contain subfolders ?</p><p></p><p>if no, then it tries do delete the folder.</p><p></p><p>So the code should handle it.</p><p></p><p>We could have a situation where we are unable to delete one or more of the files (due to file locks etc).</p><p>The delete-folder process then fails and never retries again. The user has to manually seek out those folders and delete them themselves.</p><p></p><p>how to handle this ?</p><p></p><p>1) Create a monitoring thread "recording cleanup" which has some public array/list where the failedrecording method is able to notify the thread, simply by inserting a recording object into this array. the monitor thread picks this up, and retries the process each 1 min. or so.. once properly deleted it will remove the recording from the array and cease any further actions.</p><p></p><p>cons: if you restart tvservice, it will be upon start of the service unaware of these failed-2-delete folders.</p><p></p><p>2) On tvservice start a method call will take care of the orphaned folders and delete those.</p><p></p><p>3) 1+2 (as combination.)</p><p></p><p>Using some SQL table to store this information seems overkill to me.</p><p></p><p>/gibman</p></blockquote><p></p>
[QUOTE="gibman, post: 659714, member: 25430"] ofcourse :) Ill just run a "format e:\" drive. looking at the code we delete all files with the same name as the recording itself. eg. myrecording.ts it will then try and delete : myrecording.jpg (thumb) myrecording.xml (meta data) it then queries folder containing the ts file. does it anymore contain files ? does it anymore contain subfolders ? if no, then it tries do delete the folder. So the code should handle it. We could have a situation where we are unable to delete one or more of the files (due to file locks etc). The delete-folder process then fails and never retries again. The user has to manually seek out those folders and delete them themselves. how to handle this ? 1) Create a monitoring thread "recording cleanup" which has some public array/list where the failedrecording method is able to notify the thread, simply by inserting a recording object into this array. the monitor thread picks this up, and retries the process each 1 min. or so.. once properly deleted it will remove the recording from the array and cease any further actions. cons: if you restart tvservice, it will be upon start of the service unaware of these failed-2-delete folders. 2) On tvservice start a method call will take care of the orphaned folders and delete those. 3) 1+2 (as combination.) Using some SQL table to store this information seems overkill to me. /gibman [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Empty folders left behind on Recording drive
Contact us
RSS
Top
Bottom