Os.rename(largest_file, destination_folder "/" new_file_name) New_file_name = new_name "." largest_file New_name = movie_name " (" movie_year ")" #job_name = ".x264-Group"ĭestination_folder = "/share/Multimedia/Videos/Movies"ĭestination_folder = "/share/Multimedia/Videos/Kids"įind_year = re.search("\d\d\d\d", job_name).start() #full_path = "/share/Download/sabnzbd/complete/.x264-Group" Hopefully this helps someone looking for simple movie renaming. My movie library doesn't have separate folders like most people do, but this should be easily modified for different needs. I'm sure it's not perfect, and I'm not an expert with python, but it works for me. Also, it will trigger a plex library scan. Then removes the remaining files and folders. Then it moves it to a folder depending on the category name. Then it renames them by finding the 4 digit year, cuts off everything to the right, replaces the periods, and ends up with Movie Name (2014). So, what it does is find the largest file and any file extensions in the whitelist (subtitles). If you have an nzb downloading that doesn't match this pattern, you can rename the title yourself while it's in the queue. In my case, all of the movie nzbs have a format of .x264.Group. I don't like to use couch potato because I like to pick my own releases. So I learned a little python to create the movie renaming script I wanted. I recently migrated to a qnap nas server, and my old renaming script only worked on windows.
0 Comments
Leave a Reply. |