This might be related to the split in the SickRage Dev team. This post has more info and a potential solution:
Beiträge von culprit
-
-
Late back to the party on this but just thought I'd chime in to say that the only recent thing that changed on my system was an auto-update to CouchPotato v2 and the usual daily cron jobs (log rotation etc).
Nothing other than standard operations.
-
Hi,
Thanks for the excellent work (as always) here ryecoaaron.
I followed the instructions you were providing and found exactly the same issues as the OP.
chmod 1777 got me back into the webGUI at the end as well.
Updates did't work though. "/var/lib/dpkg/updates" does not exist.
I ran :
mkdir /var/lib/dpkg/update
chmod 755 /var/lib/dpkg/update
apt-get upgradeAnd all appears normal again.
Is it a coinicidence for us to have the same issue at about the same time?
-
I have the same type of error with the web interface only SSH connection was being refused. I hooked up a monitor and keyboard to the server but couldn't see anything immediately wrong and issued a reboot.
SSH is back but the web interface gives the same type of error:
"session_start(): open(/var/lib/php5/sess_8a338an3kdntcfdnsmhncaclj0, O_RDWR) failed: No such file or directory (2)"
I've not upgraded OMV or changed the config in any way since the last update for 0.4
Puzzling.
-
Thank you. Done.
-
That's it!
Absolutely perfect.
Thank you so much for this ryecoaaron and Solo0815. My media server is now completely automated and I can be sure my kids are only viewing age appropriate movies. -
Here you go Solo0815:
Codefind: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `/media/unqiue-storage-identifier/video/moviedump/*/*.nfo'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `/media/bb09e796-5566-4eb2-8fc1-043a156233c4/video/moviedump/*/*.nfo''. Working on '' --- Folder = ''
-
I've tried running that. Added in full paths but still no luck.
I've dropped the "-s" option form grep and that outputs "/media/unique-storage-string/video/moviedump/Name Of Folder (2011)/*.nfo: no such file or directory" but I am 100% sure the file it's looking for exists. I am running the script from /scripts at the OS root.
If I navigate to the moviedump folder via CLI and run (as root):
I get the correct output of <certification>UK:12</certification>. It looks like grep in the script is not using the wildcard for some reason.
-
Hi,
Script isn't working for me I'm afraid. Here is the relevant folder structure:
/videos/movieshifter.sh
/videos/moviedump/Movie To Shift (2011)/Movie To Shift.avi
/videos/moviedump/Movie To Shift (2011)/Movie To Shift.nfo
/videos/moviedump/Movie To Shift (2011)/Movie To Shift.srt
/videos/moviedump/Movie To Shift (2011)/Movie To Shift.tbn
/videos/moviedump/Movie To Shift (2011)/folder.jpg
/videos/movies/u/
/videos/movies/pg
/videos/movies/12
/videos/movies/15
/videos/movies/18movieshifter.sh:
Bash
Alles anzeigen#!/bin/bash # Folder to search in FOLDER="moviedump" # Folders to place in FOLDER_U="movies/u" FOLDER_PG="movies/pg" FOLDER_12="movies/12" FOLDER_15="movies/15" FOLDER_18="movies/18" for D in "$(find $FOLDER -type d)" do if grep -s "UK:18" $D/*.nfo then mv $D $FOLDER_18 echo "moving $D to $FOLDER_18" elif grep -s "UK:15" $D/*.nfo then mv $D $FOLDER_15 echo "moving $D to $FOLDER_15" elif grep -s "UK:12" $D/*.nfo then mv $D $FOLDER_12 echo "moving $D to $FOLDER_12" elif grep -s "UK:PG" $D/*.nfo then mv $D $FOLDER_PG echo "moving $D to $FOLDER_PG" elif grep -s "UK:U" $D/*.nfo then mv $D $FOLDER_U echo "moving $D to $FOLDER_U" else echo "no rating found, skipping file" fi done
I've put the find condition in quotes as the script was not handling folder names with spaces. It treated each word as a folder to search.
My output is always "no rating found, skipping file".
If I echo out $D I get "moviedump moviedump/Movie To Shift (2011)".
If I change grep to recursive then it finds the string "<certification>UK:12</certification>" correctly but nothing gets moved.Still tinkering.
-
This is perfect. Thank you so much. I've set it up as a cron job and will throw some folders at it over the weekend to see how it gets on.
Thanks again.
-
Thanks for the help. Really is appreciated.
I don't know bash scripting syntax at all as yet. I can make out the logic of what you've written though. I'll learn some bash scripting and have another crack with this instead of Python.
Cheers.
-
I know PHP so I've started cobbling together bits of Python from around the web.
Below is my progress so far but I'm coming up against my rough and ready abilities so getting stuck.
I'm pretty sure my syntax is all to shite and the pyinotify stuff, while very neat and powerful, just looks like Hieroglyphics to me.
Any help appreciated.
Python
Alles anzeigen#!/usr/bin/python import fnmatch, os, shutil, xml.sax #detect new folder(target) in watch folder # [pyinotify snippet to go here] #enter that folder os.chdir(target) #find movie.nfo or target.nfo = file_name #if the file doesn't exist pull the data ourselves from IMDB. :( if file in os.listdir('.'): if fnmatch.fnmatch(file, 'movie\.nfo'): file_name = movie.nfo; elseif file in os.listdir('.'): if fnmatch.fnmatch(file, target.'\.nfo'): file_name = target.'\.nfo'; else: print('No matching nfo file found.'); #parse through movie.nfo and pull the certification value class MovieHandler( xml.sax.ContentHandler ): def __init__(self): self.CurrentData = "" self.certification = "" # Call when an element starts def startElement(self, tag, attributes): self.CurrentData = tag if tag == "movie": # print "*****Movie*****" title = attributes["title"] # print "Title:", title # Call when an elements ends def endElement(self, tag): if self.CurrentData == "certification": #print "Certification:", self.certification xml_certification = self.certification self.CurrentData = "" # Call when a character is read def characters(self, content): if self.CurrentData == "certification": self.certification = content if ( __name__ == "__main__"): # create an XMLReader parser = xml.sax.make_parser() # turn off namepsaces parser.setFeature(xml.sax.handler.feature_namespaces, 0) # override the default ContextHandler Handler = MovieHandler() parser.setContentHandler( Handler ) parser.parse(file_name) #pattern match the certification string for "UK:" #pull the two characters after the colon ukposition = certification.find('UK:') rating = certification[ukposition:2] #close nfo file and return to watch folder fileObject.close() os.chdir("../") #move new folder to correct movies sub folder if rating == 'U': shutil.move(target, 'u/') elseif rating == 'PG': shutil.move(target, 'pg/') elseif rating == '12A': shutil.move(target, '12/') elseif rating == '15': shutil.move(target, '15/') elseif rating == '18': shutil.move(target, '18/') else: #handle an error print('Rating value ='.rating.' for movie '.target.'\. Does not match certification folder');
-
Hi,
I'm a full on OMV convert. From using a Win7 PC with some external storage the NAS world looked scary as hell. OMV is making the transition amazingly smooth. I've put in about 20+ hours of config so far and got things tweaked satisfactorily for most of the popular services, but I've run up against something I could do with some help on.
I like to organise my movies by UK age certification as follows:
/video
->/movies
->/u
->/pg
->/12
->/15
->/18e.g. /video/movies/18/Expendables 2/movie.avi, movie.nfo, etc
This method allows simple access control levels for my kids and their XBMC libraries.
Couchpotato post-processing gives me perfect folder and file naming along with an XBMC compatible nfo file filled with IMDB data including <certification> tag.
Currently CouchPotato dumps the processed folder into /video/movies and I manually sort into the correct rating folder. What would completely automate this process is a perl or python script (along with a cron job) that watches for new movies turning up (perhaps a new folder like /video/movies/couchpotatodrop/), parses the nfo file for the certification value and then moves the movie folder to the appropriate rating folder.Sadly I don't know Perl or Python and while my PHP experience tells me this isn't a hugely complex script it is still beyond me. Is there any Perl or Python guru on the board who would write a little script to do this job?
nfo file can be named "movie.nfo" or <folder name>/nfo [e.g. Expendables 2 (2012).nfo] soetimes with both files being present.
IMDB certification tag values can be:
"UK:18", "UK:15", "UK:12A", "UK:PG", "UK:U"Some nfo files have certification data for lots of countires but the UK rating is always in the format above.
Any takers?