Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £129! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £179! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[ViX_Misc] AutoOrganise Recorded Items Folder Solution

  • Thread starter Thread starter varianjv
  • Start date Start date
Usage
---------------------------------------------------
I placed the script in /home/root
its called organise.sh
i did a chmod a+x on the file to make it executable

I added the following line
*/10 * * * * /home/root/organise.sh
to the following file
/etc/cron/crontabs/root
----------------------------------------------------

Not sure how to turn this into an ipk to be honest
A reversal script would be easy, to iterate through the folders and move everything back up a level.


Also not sure how I will do Movie/Film seperation
The metadata attached to the files sometimes (I will do more testing) does not tell you that its a movie only what movie type it is, Drama , Horror etc
But I will keep looking at this one.

What do we do after this? Add a cron timer? Never used these before?
 
Well, the name format feature was added not too long ago. And sometimes I forget to change from the default.
 
When you add the line to the file /etc/cron/crontabs/root thats it scheduled

Thanks, I had a root file in cron but not is crontabs?

Also do I just run this in a telnet session? "i did a chmod a+x on the file to make it executable", if not how?

Thanks
 
Is this where you have to make a folder yourself and then tell the autotimer to put it in there? It's a bit more long-winded than this amazing script that the OP is working on.
Yes, I find that a few folders, together with tags and the move function keeps things tidy.
What would be handy would be if "move" offered the option of creating a folder based on the programme name if there wasn't one.
 
Well, the name format feature was added not too long ago. And sometimes I forget to change from the default.

The script is based on the default.
Where the dates etc are at the start and the program name at the end.
 
Thanks, I had a root file in cron but not is crontabs?

Also do I just run this in a telnet session? "i did a chmod a+x on the file to make it executable", if not how?

Thanks

What version are you running

I placed the organish.sh script in /home/root
i did a chmod a+x on the file to make it executable
chmod a+x organise.sh

I added the following line
*/10 * * * * /home/root/organise.sh
to the following file
/etc/cron/crontabs/root
 
What version are you running

I placed the organish.sh script in /home/root
i did a chmod a+x on the file to make it executable
chmod a+x organise.sh

I added the following line
*/10 * * * * /home/root/organise.sh
to the following file
/etc/cron/crontabs/root

Hades 18, I will have another look tonight
 
The script is based on the default.
Where the dates etc are at the start and the program name at the end.
There are 4 methods of naming recordings. I'm presuming that you are grouping things based on the event name. It would be great if you could adapt script to use whatever filename composition is being used. Alternatively a differnt one for those who have the event name first.
 
Is this working now? Could anyone give a steps but step of how to set it up please, new to this so most of what has been said has gone straight over my head.
 
There are 4 methods of naming recordings. I'm presuming that you are grouping things based on the event name. It would be great if you could adapt script to use whatever filename composition is being used. Alternatively a differnt one for those who have the event name first.

If you know your recordings have the event name first then modify the script as follows

# if only two dashes then it was recorded with the autotimer we we take the 3rd column as the file name (with extension)
filewithext=$(echo $f | awk -F '- ' '{print $3}')
else
# else assume recorded via the red button and now we need to ignore channel number
filewithext=$(echo $f | awk -F '- ' '{print $4}')

BECOMES

# if only two dashes then it was recorded with the autotimer we we take the 3rd column as the file name (with extension)
filewithext=$(echo $f | awk -F '- ' '{print $1}')
else
# else assume recorded via the red button and now we need to ignore channel number
filewithext=$(echo $f | awk -F '- ' '{print $1}')
 
Hi varianjv

Decided to give your scrip version 3 a try as like your idea now i have done the following

I placed organise.sh in /home/root
right clicked and changed all the permissions to all ticked so it can execute

I then went to /etc/cron/crontabs/ and made a file called root
I then added the following line to my new root file

*/10 * * * * /home/root/organise.sh

have rebooted the box but nothing is happening when i go to my recordings there all still individually there instead of in folders.

All my recordings have been done with autotimer dont know if that makes any difference
 
Many thanks, will test when I have some time.

Just to let you know, tha the "default" script moves the "event name" recordings onto the root of internal memory and system hangs because of lack of space . If you can add some checks to prevent this, it will be brilliant. Most people use the default naming, so not a widespread problem.
Perfection will be when it can detect the naming.:thumbsup:

Do you have any objection to making an ipk which installs the script in the script folder? People can then run manually via blue button > Vix > script runner without having to worry about crond timers. Crond timers can still be set with new location.
 
The following script could be used to check for something mounted to /hdd:-

Code:
if [ -d /hdd ]; then
    # something is mounted to /hdd
fi
 
I'm not sure if cron is on by default? maybe check it in Menu -> Timers -> CronTimers.

Also it would be better to create the crontab file by using
Code:
crontab -e
but then there is a chance you would need to get to know 'vi' so ignore that :)
 

OpenViX Feeds Status

Back
Top