• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

Folder Lock

marsha11

Member
Is it possible to have a folder lock facility on the WebIf OPT+ menu but still allow recordings in the folder to be deleted. SWMBO has a habit of deleting the folder as a means of deleting multiple files and with it go my C.F. package flags!
 
If you use the command line to remove delete privilege from the flag files, the Linux folder deletion process will fail to delete all the contents and therefore be unable to remove the folder.
 
Do you mean "fail to delete all the contents" deletes some but leaves some? Or doesn't delete any?
Not "The Arms", but ambiguity rules here.
 
The OS can't remove a directory if it isn't empty. By making some files undeleteable (and the flag files seem like the best target), the attempt to delete the folder will fail.
 
Yes, I fully understand that. :p I'll ask my question a different way.
If you make one (some) files undeletable will it delete the ones that you haven't made undeletable?
The OP is trying to stop HWMBO deleting all the files in the folder, including the unwatched ones by deleting the series folder instead of the recording, thus deleting the folder and everything in the folder.
What will happen when he tries to delete the file that he has flagged as undeletable?
 
The OP is trying to stop HWMBO deleting all the files in the folder, including the unwatched ones by deleting the series folder instead of the recording, thus deleting the folder and everything in the folder.
That's not what I was after as SWMBO only deletes the folder after watching all the recordings. I just need to prevent folder and flags being deleted so I'll implement Black Hole's suggestion. Thanks.
 
Ah. Of course undelete probably does a move, not delete.
I imagine that folder and the tagged files will remain in the Deleted Items folder forever now :)
 
You need to make the file immutable to stop them being deleted. Permissions won't do it because everything run as a root.
chattr +i "/path/to/.autodetectads"
 
Fair enough, I don't know that much about Linux and didn't realise the mode flags for a file are not the same as the attribute flags, or that the mode flags are ignored by root - but I didn't specify the implementation and it looks like I was on the right lines :)

Is there scope to add this functionality to the WebIF media browser (I suggest as an addition to the OPT+ button for folders): "Mark for no deletion"? I suggest it creates another flag file, and if present all flag files are made immutable.
 
You need to make the file immutable to stop them being deleted.
Wow that was scary!

I set the immutable flag on the .autodetectads flag file and deleted the folder from the SUI. The folder disappeared and the "* Deleting" was constantly showing on the SUI. Tried to shutdown the box to no avail so rebooted from the GUI but not sure if that worked as "* Deleting" was still showing when I checked the SUI. I then removed the immutable flag and deleted .autodetectads and the folder (this was still showing from the command line and GUI), no "* Deleting" this time. All the recordings in the root of My Video have been deleted, the majority of folder recording are OK except for three recordings in separate folders have been truncated to 80MiB. Incidentally, these three recordings are the only ones still showing in the [FlatView] folder.

I'm pleased to say that all recordings are backed up on my NAS.

Edit: All the recordings that I thought had been deleted had actually been truncated to 80MiB prior to "deletion" i.e. moved to [Deleted Items]/[Deleted Items].
 
Last edited:
Ouch! I guess these fiddles are upsetting the Humax code. Sorry about that!
 
Last edited:
@ marsha. Why do you want to leave the folder there when you have watched all the progs? The system just creates a new one if required.
 
Is there scope to add this functionality to the WebIF media browser (I suggest as an addition to the OPT+ button for folders): "Mark for no deletion"? I suggest it creates another flag file, and if present all flag files are made immutable.

Given how upset the Humax code got with the immutable flag it seems then that you need to allow the Humax to do its bidding. However there might still be a way to do this. You implement 'Mark for no deletion' in Webif OPT+, but this doesn't actually change or create any flags in-situ, it simply keeps track of folders that should be re-instated (the folder itself and package flags only, not media files) by auto-processing whenever they appear in [Deleted Items] (which would make the Undelete package a pre-requisite for it to work)
 
The way we keep track of these things is by creating a flag file. Assuming the OP has the undelete package installed, he has always had the possibility of rescuing things from the waste basket, but this idea would be an extension to the package to reinstate any folders moved to the waste basket that contain a "do not delete" flag (IIRC a deleted folder is moved intact).
 
Back
Top