my first python script to organise recordings into folders/directories

I'm now using the script grog and testing on 1 of my boxes, so far so good, just one question is how will it handle recordings with the word 'new' in front of the programme name? Will it move it to the same folder as the same programme without the word 'new' or will it create two seperate folders of the same programme?

Two word answer - "TRY IT". Then you can say what happens to Grog, maybe help him out with suggestions for what could maybe be done better, or differently.

Also, do not under any circumstances link people to other forums, Especially those that offer similar services to TechKings, it will earn you infractions, then bans. ( no need to reply to this post, thanks)
 
i've written my first ever python script for use on my zgemma, it's a simple script that runs via cron manager to create sub directories within the /media/hdd/movie directory for series that we have recorded, ie the boss records eastenders, so the script checks how many eastenders ts files are in the movie directory and if more than one (multiple recordings) it then creates an eastenders sub directory and moves all eastender files into it, If there is only one recording of a show then no directory is created. Each time it runs any recording that has a directory already created is moved into it's respective directory. It checks that the file has not been modified for at least 5 minutes so not to move files that are still being recorded.

It's not a plugin as such as I haven't looked at how to right a plugin yet.

Brilliant mate. I wish I was that clever
 
thanks for the update Grog.. I've updated to your latest version and will see how it goes.. I've got a lot of auto timers set, so instead of manually testing i am letting it work through them as they appear.. So far it's been great.

I saw that Whooshman had replied to you about making it in to a plugin at some point.. that would also be great!
 
I have no idea why because i've never used cron timers or done any programming in python.

My cron timer just says 'python' after it has run and not the full line.

In the cron you are basically loading 'python' (the script language) and then telling python the script to run, hence why it starts with the word python

I'm now using the script grog and testing on 1 of my boxes, so far so good, just one question is how will it handle recordings with the word 'new' in front of the programme name? Will it move it to the same folder as the same programme without the word 'new' or will it create two seperate folders of the same programme?
It is currently treated as a different show. So 'New_ The Big Bang Theory' would be in one folder and 'The Big Bang Theory' would have another.
 
I have mate - it doesn't show on there but there was definitely a space. (I know others have said the same about definitely putting a space but it not showing on the autocron manager)

Cheers,
 
BenH86123 mine looked the same after being saved, I deffo put the space in after python so its just how it is displayed once saved....also it doesnt take immediate effect I left it for a little over an hour then when I then checked it had place recordings in named folders it created
 
Yeh i've left it an hour mate and no change.
I've just deleted the py script, removed from cron manager and reset in a different location so hopefully this helps.

Can't see that I'm doing anything wrong so bit stumped.
 
are your recordings set to the default hdd/movie, if so it should work so check it after an hour or so, I dont recall needing to do a restart but you could try that then give it an hour then report back but from what I can see you have it entered correctly, its active & running so maybe just give it enough time to kick in & do its thing
 
Last edited:
Strange events

I've had a couple of strange things happening that coincide with me setting this up (and note I say coincide, so may not be related but possibly is).
If we have been watching a channel either FTA or other and hit the record button for the channel we are watching, it starts to record as normal. However, when we then try to select another channel, it skips several of them and those in between will not work giving an error message. I have tried to screen print but it has gone from the screen before I get to the PC :(.

This first happened when the wife was "driving" so as usual my reaction was "what have you done!". However it has since happened to me (much to her delight).

Just tried again this morning but cannot get it to replicate the fault so thinking it may have to be part of a sequence of events that the box doesn't like.

This has happened on my H2S running wooshbuild. I have also put it on my 2S running sucmnsee so I will try that box later and see if it happens on that one.
 
contracts34 that sounds more like its relating to your tuner signal than this script so id check your box feeds are good & you have decent signal to both tuners plus run a fresh scan to see If you get a tuner failed/lock error, IF you still have issues after that maybe start a fresh thread?
 
Nope still no good.. annoying having to wait until the next hour is up before I can see if it's fixed haha.

---------- Post Merged at 09:24 AM ----------

My recordings are set to /media/hdd/Recordings (this path has been set on line 8 in the py script)
 
well thats the only difference I can see, script is set for media/hdd/movie & you have media/hdd/recordings (if the path is correct it shouldn't be an issue just noticed your settings were different to the default)
 
when adding python scripts to your box you need to reboot or restart GUI for then to work correctly.
 
contracts34 that sounds more like its relating to your tuner signal than this script so id check your box feeds are good & you have decent signal to both tuners plus run a fresh scan to see If you get a tuner failed/lock error, IF you still have issues after that maybe start a fresh thread?

Hi BeakyFord
I know my connections are good having remade them a few weeks ago and replacing my LNB when I got the second box. my signal strength is over 85% on all channels and up to 95% on many so can't see that being an issue. I will keep monitoring it and try it on the 2S later, but thanks for the reply.
 
I dont understand python so possibly is related but I doubt it as your symptoms suggest only a single tuner is working hence you can record one channel but are limited on the 2nd channel you wish to watch (suggests you can only watch programs broadcast on same transponder as the channel you are recording)
 
Last edited:
Okay so from the beginning this is what I done... please correct me if I'm wrong.

Edited the .py file to my correct path (/media/hdd/Recordings) & saved.
Ftp'd the .py file to home/media/hdd
Rebooted box
Menu > Timers > CronTimers > Add
Hourly - Custom - python /media/hdd/ordermovies.py & save.
Rebooted box & wait until the next hour is up.

Nothing :boo:

Any help much appreciated.
 
Back
Top