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
V

varianjv

Guest
Hi guys,
I have written a script that, creates folders based on recorded show names and moves the show into its proper folder
Is runs via cron every ten minutes.
Could we add something like this to the build?
I will attach the script

View attachment organise.sh.zip

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

Its smart enough also not to try and move a file if its currently being recorded.
 
Thanks for this. Just couple of queries...

I haven't tried this yet but does this work silently in background (ie no messages)?

Also, I'm assuming it goes by programme name (eg "Cake Boss") but can you get it to ignore any entries beginning "New: " as some channels add this to the beginning of programme name to indicate when it's a new programme?
 
Thanks for this. Just couple of queries...

I haven't tried this yet but does this work silently in background (ie no messages)?

Also, I'm assuming it goes by programme name (eg "Cake Boss") but can you get it to ignore any entries beginning "New: " as some channels add this to the beginning of programme name to indicate when it's a new programme?

Works in the background with no messages
Doesn't allow for New: but if I get time later I will add in a substring to remove.
 
Sounds like a good idea, sadly it doesn't work for me :(
tries to move the files to the root '/' folder, i get and error like
Code:
“Processing Not Safe for Work - 20150804 2200_Channel 4 HD.ts”


mkdir: can't create directory '': No such file or directory
Not Safe for Work - 20150804 2200_Channel 4 HD
File NOT open
 
I worked it out, I think the issue is I have my box set to save recordings with the event name first.
Had to change line 6 to
Code:
filewithext=$(echo $f | awk -F '- ' '{print $1}')
Thanks for the script :)
 
I worked it out, I think the issue is I have my box set to save recordings with the event name first.
Had to change line 6 to
Code:
filewithext=$(echo $f | awk -F '- ' '{print $1}')
Thanks for the script :)

Excellent
I'm new to openvix and wasn't aware you could store your files like this
The guts are there though :-)
 
I´m not much of a code reader but if I understand correctly, script makes a own folder for every recorded program? Commenting code for us dummies would be nice. And isn´t every 10 min a bit overkill when shows tend to last from 30min up?
Thanks for the script. :)
 
Last edited:
I´m not much of a code reader but if I understand correctly, script makes a own folder for every recorded program? Commenting code for us dummies would be nice. And isn´t every 10 min a bit overkill when shows tend to last from 30min up?
Thanks for the script. :)

Say you have a show called breaking bad
It will create a folder called breaking bad and place all episodes of the show in that folder
It runs every ten minutes so a newly recorded show doesn't hang around for too long and gets tidied away
Also it's not any real overhead on the system

Sorry for the lack of comments but I wrote this on the fly today
I will add comments in the next version :-)
 
Say you have a show called breaking bad
It will create a folder called breaking bad and place all episodes of the show in that folder
It runs every ten minutes so a newly recorded show doesn't hang around for too long and gets tidied away
So if you have 1000 films on your HDD it creates 1000 directories and places 1 film in each?

And how does it deal with the built in sort functions?
 
So if you have 1000 films on your HDD it creates 1000 directories and places 1 film in each?

And how does it deal with the built in sort functions?

Yes
It's mainly for people like me who would record lots of soaps and TV series
Folders are marked simply as directories but in each folder they can be organised date etc
 
Last edited by a moderator:
Would be great if it didn't create a folder/directory for recordings where it is a one-off show or movie, and it only creates folder/directory for sieries.
 
I'm liking it, except for if I record several films then it will create folders for these films as well. Shame can't distinguish between films and soaps/tv series.

I believe those channels that mark something as new will have "New:" at beginning of programme name so just removing "New:" at the beginning and maybe removing any surplus spaces then at beginning and end (if there are any).

It's definitely a step in the right direction I believe, thank you.
 
Would be great if it didn't create a folder/directory for recordings where it is a one-off show or movie, and it only creates folder/directory for sieries.

That's a good idea
I'll take a look at scripting that
 
Yeah, if the script checks first if there are more than one file with the same name, then create a folder and move files there. Or if a folder exists, move files. Else leave as it is. That would be usefull.
 
Last edited:
Yeah, if the script checks first if there are more than one file with the same name, then create a folder and move files there. Or if a folder exists, move files. Else leave as it is. That would be usefull.

Or to distinguish between series and films, before making the directory and moving, check for the recorded time, f.e. something like: "IF longer than x (f.e. 65 minutes) do not make directory and move". Most series / soaps are max 60 minutes
 
The hardest bit I can imagine is trying to determine what is a series and what is a one-off recording all from within a script.

I was thinking, although not idea, is the script allows user to enter the name of the series they want grouping together into a variable field. So this variable would contain, "Cake Boss, Coronation Street, East Enders, etc..."

The script then checks recorded filename against this variable and then if there is a match will create folder and move file. If not, will leave it as it is.

I do like the idea so please keep it up.
 

OpenViX Feeds Status

Back
Top