Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 1 of 9 123 ... LastLast
Results 1 to 15 of 128

Thread: AutoOrganise Recorded Items Folder Solution

  1. #1

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts

    AutoOrganise Recorded Items Folder Solution

    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

    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.

  2. The Following 7 Users Say Thank You to varianjv For This Useful Post:

    abu baniaz (28-01-23),ArowonA (08-08-15),Bangord30 (13-12-16),bbbuk (08-08-15),gerrykiddy (08-08-15),khan888 (08-08-15),zino (08-08-15)

  3. #2

    Title
    Forum Supporter
    Donated Member
    Join Date
    Jun 2014
    Posts
    1,321
    Thanks
    612
    Thanked 418 Times in 270 Posts
    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?

  4. The Following User Says Thank You to bbbuk For This Useful Post:

    varianjv (08-08-15)

  5. #3

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts
    Quote Originally Posted by bbbuk View Post
    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.

  6. The Following User Says Thank You to varianjv For This Useful Post:

    bbbuk (08-08-15)

  7. #4

    Title
    Senior Member
    Join Date
    Jun 2015
    Posts
    238
    Thanks
    53
    Thanked 90 Times in 64 Posts
    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

  8. #5

    Title
    Senior Member
    Join Date
    Jun 2015
    Posts
    238
    Thanks
    53
    Thanked 90 Times in 64 Posts
    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

  9. #6

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts
    Quote Originally Posted by ArowonA View Post
    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 :-)

  10. #7

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts
    Just to be clear is it in the format
    New: X
    or
    New:X

  11. #8

    Title
    Member
    Join Date
    Jun 2015
    Posts
    50
    Thanks
    4
    Thanked 13 Times in 9 Posts
    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 by Kojo_; 08-08-15 at 20:39.

  12. #9

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts
    Quote Originally Posted by Kojo_ View Post
    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 :-)

  13. #10
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Quote Originally Posted by varianjv View Post
    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?
    Help keep OpenViX servers online.Please donate!

  14. #11

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts
    Quote Originally Posted by Huevos View Post
    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 varianjv; 08-08-15 at 21:14.

  15. #12

    Title
    Senior Member
    Join Date
    Dec 2013
    Posts
    241
    Thanks
    22
    Thanked 26 Times in 20 Posts
    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.

  16. The Following User Says Thank You to zino For This Useful Post:

    abu baniaz (10-08-15)

  17. #13

    Title
    Forum Supporter
    Donated Member
    Join Date
    Jun 2014
    Posts
    1,321
    Thanks
    612
    Thanked 418 Times in 270 Posts
    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.

  18. #14

    Title
    Member
    Join Date
    Aug 2015
    Posts
    85
    Thanks
    14
    Thanked 25 Times in 10 Posts
    Quote Originally Posted by zino View Post
    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

  19. The Following User Says Thank You to varianjv For This Useful Post:

    bbbuk (08-08-15)

  20. #15

    Title
    Member
    Join Date
    Jun 2015
    Posts
    50
    Thanks
    4
    Thanked 13 Times in 9 Posts
    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 by Kojo_; 09-08-15 at 06:40.

Page 1 of 9 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.