• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[flatten] Automatically Removing Programmes from Series Folders

flatten is old-school, in that it acts as a stand-alone package independent of the WebIF, and can be installed as a function on unmanaged 'FOXes. Perhaps it's time for a WebIF equivalent (as per unencrypt v WebIF Auto-decrypt).
 
I will probably start a new thread to discuss this at some point, but I do intend to extend the webif to be able to handle at least things like:
  • Sweep single recordings into folders based on criteria (original channel for example - classifier idea);
  • Flatten series folders into the root (replacing flatten);
  • Relocate series folders from the root to deeper in the tree (replacing series-filer).
I'm just having trouble finding time to look at it at the moment although my schedule should calm down in a week or so

Once it's a native webif function, it can be arranged that multiple events are scheduled in a sensible order.
 
I have just uploaded a new version of the flatten package to the test repository.

This new version is implemented as a hook into the web interface automatic processing system, rather than an independent script with a cron entry, so in most cases it will run once any automatic decryption is complete. It also has a couple of other improvements to bring it up to date and more consistent with the other processes.

I've tested it on my box but I don't generally use flatten so would appreciate wider testing before transferring it to the main repository.If you're willing to give it a go then install the update from the command line:

Code:
humax# opkg install http://hummypkg.org.uk/hdrfoxt2/test/flatten_1.0.0_mipsel.opk

Thanks.
 
Will it also run as an independent package? If not I think it should be named something else (flatten2?).
 
No, it won't, but I think the webif package is a reasonable dependency these days and I don't want to maintain both. The old flatten is already out of date and makes assumptions that have long been beaten out if other packages (such as that file.* is an appropriate way to find all sidecar files).

Anyone upgrading the old package without webif will automatically get it on upgrade. If there is a demand (and I'd be surprised) I could make the standalone package available as something like legacy-flatten.


Posted on the move; please excuse any brevity.
 
So, if I were to add CF to an unmanaged HDR for specific functionality such as flatten, webif would be a dependency and included in the flatten bundle?
 
I have just uploaded a new version of the flatten package to the test repository.

This new version is implemented as a hook into the web interface automatic processing system, rather than an independent script with a cron entry, so in most cases it will run once any automatic decryption is complete. It also has a couple of other improvements to bring it up to date and more consistent with the other processes.

I've tested it on my box but I don't generally use flatten so would appreciate wider testing before transferring it to the main repository.If you're willing to give it a go then install the update from the command line:

Code:
humax# opkg install http://hummypkg.org.uk/hdrfoxt2/test/flatten_1.0.0_mipsel.opk

Thanks.
I am happy to give this a try, but don't use any of the web interface automatic processes, so will this still work OK for me?
 
I am happy to give this a try, but don't use any of the web interface automatic processes, so will this still work OK for me?
Yes it should be fine. It will be triggered from the automatic scan even though nothing else is.


Posted on the move; please excuse any brevity.
 
So, if I were to add CF to an unmanaged HDR for specific functionality such as flatten, webif would be a dependency and included in the flatten bundle?
Yes, although it always was as flatten has always used the libraries provided by webif


Posted on the move; please excuse any brevity.
 
I have now installed it on one box, my first attempt failed because I was still on webif 1.0.3-2. After upgrading to webif 1.0.3-3, installation was successful.
 
Nothing seems to be happening yet, how often does the automatic scan run? Do I have to reboot the box in order to make it work?
 
It should be every 10 minutes. You can increase the log level through the settings page, then monitor auto.log for activity.
 
I have rebooted my box since asking, and still have three folders waiting to be flattened.
My auto.log contains
Code:
>>> Contents of /mod/tmp/auto.log 251.00 bytes
02/07/2013 19:10 - Flatten failed to remove directory: couldn't delete file "/media/My Video/Emmerdale": Directory not empty
02/07/2013 19:30 - Flatten failed to remove directory: couldn't delete file "/media/My Video/EastEnders": Directory not empty
My flatten.log contains the following entries for today
Code:
[/media/My Video/Hollyoaks]
/media/My Video/Hollyoaks/Hollyoaks_20130702_1831
  Hollyoaks
    Recording has not yet ended.
Failed to remove directory: couldn't delete file "/media/My Video/Hollyoaks": Directory not empty
[/media/My Video/Hollyoaks]
/media/My Video/Hollyoaks/Hollyoaks_20130702_1831
  Hollyoaks
  File is in use.
Failed to remove directory: couldn't delete file "/media/My Video/Hollyoaks": Directory not empty
/bin/sh: /mod/sbin/flatten: not found
/bin/sh: /mod/sbin/flatten: not found
/bin/sh: /mod/sbin/flatten: not found
/bin/sh: /mod/sbin/flatten: not found
/bin/sh: /mod/sbin/flatten: not found
/bin/sh: /mod/sbin/flatten: not found
Does this help?
 
Could you increase the log level for the automatic processing and see what turns up in auto.log?
 
I have turned on Debugging information, and now have the following in my auto.log
Code:
02/07/2013 20:50 - Registered _flattenscan for postdecryptscan hook.
02/07/2013 20:50 - -------------------------------------------------------
02/07/2013 20:50 - DLNA Server is running.
02/07/2013 20:50 - Media scan starting, DLNA server status: 1
02/07/2013 20:50 - Dustbin: /media/My Video/[Recycle Bin]
02/07/2013 20:50 - Root device: 2050
02/07/2013 20:50 -  [/media/My Video]
02/07/2013 20:50 -    [/media/My Video/[Recycle Bin]]
02/07/2013 20:50 - Dustbin, skipping.
02/07/2013 20:50 -      [/media/My Video/Hollyoaks]
02/07/2013 20:50 -      [/media/My Video/EastEnders]
02/07/2013 20:50 -      [/media/My Video/Emmerdale]
02/07/2013 20:50 - decrypt scan completed in 0.09 seconds.
02/07/2013 20:50 -    [/media/My Video]
02/07/2013 20:50 -      [/media/My Video/[Recycle Bin]]
02/07/2013 20:50 - Dustbin, skipping.
02/07/2013 20:50 -        [/media/My Video/Hollyoaks]
02/07/2013 20:50 -        [/media/My Video/EastEnders]
02/07/2013 20:50 -        [/media/My Video/Emmerdale]
02/07/2013 20:50 - dedup scan completed in 0.071 seconds.
02/07/2013 20:50 -      [/media/My Video]
02/07/2013 20:50 -        [/media/My Video/[Recycle Bin]]
02/07/2013 20:50 - Dustbin, skipping.
02/07/2013 20:50 -          [/media/My Video/Hollyoaks]
02/07/2013 20:50 -          [/media/My Video/EastEnders]
02/07/2013 20:50 -          [/media/My Video/Emmerdale]
02/07/2013 20:50 - shrink scan completed in 0.069 seconds.
02/07/2013 20:50 -        [/media/My Video]
02/07/2013 20:50 -          [/media/My Video/[Recycle Bin]]
02/07/2013 20:50 - Dustbin, skipping.
02/07/2013 20:50 -            [/media/My Video/Hollyoaks]
02/07/2013 20:50 -            [/media/My Video/EastEnders]
02/07/2013 20:50 -            [/media/My Video/Emmerdale]
02/07/2013 20:50 - mpg scan completed in 0.069 seconds.
02/07/2013 20:50 -          [/media/My Video]
02/07/2013 20:50 -            [/media/My Video/[Recycle Bin]]
02/07/2013 20:50 - Dustbin, skipping.
02/07/2013 20:50 -              [/media/My Video/Hollyoaks]
02/07/2013 20:50 -              [/media/My Video/EastEnders]
02/07/2013 20:50 -              [/media/My Video/Emmerdale]
02/07/2013 20:50 - mp3 scan completed in 0.068 seconds.
02/07/2013 20:50 -            [/media/My Video]
02/07/2013 20:50 -              [/media/My Video/[Recycle Bin]]
02/07/2013 20:50 - Dustbin, skipping.
02/07/2013 20:50 -                [/media/My Video/Hollyoaks]
02/07/2013 20:50 -                [/media/My Video/EastEnders]
02/07/2013 20:50 -                [/media/My Video/Emmerdale]
02/07/2013 20:50 - expire scan completed in 0.069 seconds.
02/07/2013 20:50 - Media scan completed in 0.551 seconds.
02/07/2013 21:00 - Registered _flattenscan for postdecryptscan hook.
02/07/2013 21:00 - -------------------------------------------------------
02/07/2013 21:00 - DLNA Server is running.
02/07/2013 21:00 - Media scan starting, DLNA server status: 1
02/07/2013 21:00 - Dustbin: /media/My Video/[Recycle Bin]
02/07/2013 21:00 - Root device: 2050
02/07/2013 21:00 -  [/media/My Video]
02/07/2013 21:00 -    [/media/My Video/[Recycle Bin]]
02/07/2013 21:00 - Dustbin, skipping.
02/07/2013 21:00 -      [/media/My Video/Hollyoaks]
02/07/2013 21:00 -      [/media/My Video/EastEnders]
02/07/2013 21:00 -      [/media/My Video/Emmerdale]
02/07/2013 21:00 - decrypt scan completed in 0.091 seconds.
02/07/2013 21:00 -    [/media/My Video]
02/07/2013 21:00 -      [/media/My Video/[Recycle Bin]]
02/07/2013 21:00 - Dustbin, skipping.
02/07/2013 21:00 -        [/media/My Video/Hollyoaks]
02/07/2013 21:00 -        [/media/My Video/EastEnders]
02/07/2013 21:00 -        [/media/My Video/Emmerdale]
02/07/2013 21:00 - dedup scan completed in 0.069 seconds.
02/07/2013 21:00 -      [/media/My Video]
02/07/2013 21:00 -        [/media/My Video/[Recycle Bin]]
02/07/2013 21:00 - Dustbin, skipping.
02/07/2013 21:00 -          [/media/My Video/Hollyoaks]
02/07/2013 21:00 -          [/media/My Video/EastEnders]
02/07/2013 21:00 -          [/media/My Video/Emmerdale]
02/07/2013 21:00 - shrink scan completed in 0.066 seconds.
02/07/2013 21:00 -        [/media/My Video]
02/07/2013 21:00 -          [/media/My Video/[Recycle Bin]]
02/07/2013 21:00 - Dustbin, skipping.
02/07/2013 21:00 -            [/media/My Video/Hollyoaks]
02/07/2013 21:00 -            [/media/My Video/EastEnders]
02/07/2013 21:00 -            [/media/My Video/Emmerdale]
02/07/2013 21:00 - mpg scan completed in 0.069 seconds.
02/07/2013 21:00 -          [/media/My Video]
02/07/2013 21:00 -            [/media/My Video/[Recycle Bin]]
02/07/2013 21:00 - Dustbin, skipping.
02/07/2013 21:00 -              [/media/My Video/Hollyoaks]
02/07/2013 21:00 -              [/media/My Video/EastEnders]
02/07/2013 21:00 -              [/media/My Video/Emmerdale]
02/07/2013 21:00 - mp3 scan completed in 0.073 seconds.
02/07/2013 21:00 -            [/media/My Video]
02/07/2013 21:00 -              [/media/My Video/[Recycle Bin]]
02/07/2013 21:00 - Dustbin, skipping.
02/07/2013 21:00 -                [/media/My Video/Hollyoaks]
02/07/2013 21:00 -                [/media/My Video/EastEnders]
02/07/2013 21:00 -                [/media/My Video/Emmerdale]
02/07/2013 21:00 - expire scan completed in 0.066 seconds.
02/07/2013 21:00 - Media scan completed in 0.549 seconds.
02/07/2013 21:10 - Registered _flattenscan for postdecryptscan hook.
02/07/2013 21:10 - -------------------------------------------------------
02/07/2013 21:10 - DLNA Server is running.
02/07/2013 21:10 - Media scan starting, DLNA server status: 1
02/07/2013 21:10 - Dustbin: /media/My Video/[Recycle Bin]
02/07/2013 21:10 - Root device: 2050
02/07/2013 21:10 -  [/media/My Video]
02/07/2013 21:10 -    [/media/My Video/[Recycle Bin]]
02/07/2013 21:10 - Dustbin, skipping.
02/07/2013 21:10 -      [/media/My Video/Hollyoaks]
02/07/2013 21:10 -      [/media/My Video/EastEnders]
02/07/2013 21:10 -      [/media/My Video/Emmerdale]
02/07/2013 21:10 - decrypt scan completed in 0.077 seconds.
02/07/2013 21:10 -    [/media/My Video]
02/07/2013 21:10 -      [/media/My Video/[Recycle Bin]]
02/07/2013 21:10 - Dustbin, skipping.
02/07/2013 21:10 -        [/media/My Video/Hollyoaks]
02/07/2013 21:10 -        [/media/My Video/EastEnders]
02/07/2013 21:10 -        [/media/My Video/Emmerdale]
02/07/2013 21:10 - dedup scan completed in 0.07 seconds.
02/07/2013 21:10 -      [/media/My Video]
02/07/2013 21:10 -        [/media/My Video/[Recycle Bin]]
02/07/2013 21:10 - Dustbin, skipping.
02/07/2013 21:10 -          [/media/My Video/Hollyoaks]
02/07/2013 21:10 -          [/media/My Video/EastEnders]
02/07/2013 21:10 -          [/media/My Video/Emmerdale]
02/07/2013 21:10 - shrink scan completed in 0.074 seconds.
02/07/2013 21:10 -        [/media/My Video]
02/07/2013 21:10 -          [/media/My Video/[Recycle Bin]]
02/07/2013 21:10 - Dustbin, skipping.
02/07/2013 21:10 -            [/media/My Video/Hollyoaks]
02/07/2013 21:10 -            [/media/My Video/EastEnders]
02/07/2013 21:10 -            [/media/My Video/Emmerdale]
02/07/2013 21:10 - mpg scan completed in 0.073 seconds.
02/07/2013 21:10 -          [/media/My Video]
02/07/2013 21:10 -            [/media/My Video/[Recycle Bin]]
02/07/2013 21:10 - Dustbin, skipping.
02/07/2013 21:10 -              [/media/My Video/Hollyoaks]
02/07/2013 21:10 -              [/media/My Video/EastEnders]
02/07/2013 21:10 -              [/media/My Video/Emmerdale]
02/07/2013 21:10 - mp3 scan completed in 0.067 seconds.
02/07/2013 21:10 -            [/media/My Video]
02/07/2013 21:10 -              [/media/My Video/[Recycle Bin]]
02/07/2013 21:10 - Dustbin, skipping.
02/07/2013 21:10 -                [/media/My Video/Hollyoaks]
02/07/2013 21:10 -                [/media/My Video/EastEnders]
02/07/2013 21:10 -                [/media/My Video/Emmerdale]
02/07/2013 21:10 - expire scan completed in 0.067 seconds.
02/07/2013 21:10 - Media scan completed in 0.55 seconds.
 
Odd - I'll update the package with more debugging to see why it's skipping the folders.
 
Thanks for testing. Could you update to 1.0.1? It will log more detail at the debugging level.

Code:
humax# opkg install http://hummypkg.org.uk/hdrfoxt2/test/flatten_1.0.1_mipsel.opk
 
Back
Top