my first python script to organise recordings into folders/directories

i have my set at program name only.
would that cause a problem
I have my recordings set to use the standard filenames and that is what the script works with, I don't know what the other filename options look like so will need to take a look at some point but chances are it won't work as it stands if set to short file names etc.
 
i have my set at program name only.
would that cause a problem
I have my recordings set to use the standard filenames and that is what the script works with, I don't know what the other filename options look like so will need to take a look at some point but chances are it won't work as it stands if set to short file names etc.

How do you set the filenames? I haven't noticed this before so I'm not sure if it's naming them differently
 
Ah I didn't know a plugin existed, although I am not surprised that one does. No point reinventing the wheel,

I think there is every point in reinventing the wheel mate as you have started with your own fresh ideas. Your code is immaculate, you have not been influenced by any other code or a way to do things which for someone who hasn't programmed in python before is great. We need more like you on TechKings to help move these boxes forwards instead of the same plugins from build to build.

Also I am new to IPKs, but yours can be turned into one without an issue and installable like other plugins. Menus and options will come in time as you need them, I have no idea what I am doing but I manage it and looking at your clean code I know you will walk it.

Keep working on your version, think how it can have options like you see with other things, location, run every x, type of options. Everything you need is all in the box just waiting to be released and enigma2 is the key to that side of it.
 
i have my set at program name only.
would that cause a problem
I have my recordings set to use the standard filenames and that is what the script works with, I don't know what the other filename options look like so will need to take a look at some point but chances are it won't work as it stands if set to short file names etc.

How do you set the filenames? I haven't noticed this before so I'm not sure if it's naming them differently

Menu -> Setup -> Recordings & Timeshift -> Recording settings -> scroll down to 'Composition of the recording filenames'

Mine is set to standard
 
It's set to standard but hasn't created a folder

Can you ftp to your box to /media/hdd/movie and cut and paste the directory listing, or part of it so I can see the file names?

Also are these one off recordings or auto timers?

Thanks
 
It's set to standard but hasn't created a folder

Can you ftp to your box to /media/hdd/movie and cut and paste the directory listing, or part of it so I can see the file names?

Also are these one off recordings or auto timers?

Thanks

im sorry im not sure what you mean cut and past the directory with filezilla the directory shows /media/hdd/movie and the files in a box under that so ill past the fileanmes

20160610 1553 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts.cuts
20160610 1554 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts
20160610 1553 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts.sc
20160610 1553 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts

these are 2 one off recordings for 10 minutes of the same program
 
It's set to standard but hasn't created a folder

Can you ftp to your box to /media/hdd/movie and cut and paste the directory listing, or part of it so I can see the file names?

Also are these one off recordings or auto timers?

Thanks

im sorry im not sure what you mean cut and past the directory with filezilla the directory shows /media/hdd/movie and the files in a box under that so ill past the fileanmes

20160610 1553 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts.cuts
20160610 1554 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts
20160610 1553 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts.sc
20160610 1553 - ITV Yorkshire HD - New_ Dickinson's Real Deal.ts

these are 2 one off recordings for 10 minutes of the same program

Ah I wonder if its down to the ' in the program name, give me a little time and i'll get that fixed
 
It should work for all recordings, it's just based on the program name, looking at dsayers2014 posts there is no reason why it wouldn't work with one off recordings, i think dsayers problem is due to me not allowing for non alphanumeric characters which I am looking at now.
 
Last edited by a moderator:
UPDATE:

I have made some updates to the script which can be downloaded at https://goo.gl/opveNE

1. program names are escaped when script needs to move recordings so program names that include a ', ? or a # should now also be stored into folders when there are more than two recordings, thanks to dsayers2014 for highlighting this.

2. if you had 3 recordings of eastenders and watched/deleted two of them the one remaining would be moved back to the main list and the eastenders folder removed

Again thanks for previous feedback and if you have any more I am always interested. I am not going to be back online until Sunday evening but will respond to feedback as soon as I am back online.
 
ok if you downloaded overnight then please either download again or edit your copy (keeping indents as they are) and look for line 24

esc = mk_esc("&#'?\" ")

and remove the ? leaving the line looking like

esc = mk_esc("&#'\" ")

the ? doesn't need escaping apparently and for some reason by including it the files where not being moved.

Sorry for inconvenience and thanks for your patience
 
ok im having another go at this deleted the py from box then re ftpd the py deleted the cron timer and set it backup can anyone tell me if the cron manager screen stays on H: 00:00 python/home/root/ordermovies.py

cron manager.jpg

---------- Post Merged at 12:34 PM ----------

just one more thing whys it directing python/home/root/ordermovies.py when it states to ftp it to /home/root? im going to wait till the hours up if it doesn't create the folders i will try /home/root/ordermovies.py
 
just one more thing whys it directing python/home/root/ordermovies.py

I think there's supposed to be a gap between python and / so it's python /home/root/ordermovies.py

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.

Will have to have a further play when I get home from work.
 
just one more thing whys it directing python/home/root/ordermovies.py

I think there's supposed to be a gap between python and / so it's python /home/root/ordermovies.py

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.

Will have to have a further play when I get home from work.

thanks working a treat it was the space. it still shows the full line but working
 
I put the space after python too....once saved the space vanishes...I entered it a second time just to be sure it wasnt me that missed the space, left the box for an hour or so to see If it would create folders & move recordings which it did.... top marks grog68 :)
 
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?
 
Back
Top