[PP-Script] VideoSort - better video sorting

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 09 May 2017, 20:07

1. Open settings pages in web interface, section "PATHS", option "ScriptDir". That's where to put the scripts.
2. Put directory "videosort" (which contains file VideoSort.py and directory lib) into ScriptDir.

Deepestblue
Posts: 3
Joined: 09 May 2017, 19:22

Re: [PP-Script] VideoSort - better video sorting

Post by Deepestblue » 09 May 2017, 20:19

hugbug wrote:1. Open settings pages in web interface, section "PATHS", option "ScriptDir". That's where to put the scripts.
2. Put directory "videosort" (which contains file VideoSort.py and directory lib) into ScriptDir.
Thanks a lot for the quick reply!

I think I am officially too stupid. I tried on two (Ubuntu-16.04-)PCs: for one the script-dir is /opt/nzbget/scripts, on the other one it's /home/<user>/nzbget/scripts. In both of them there's the current videosort-dir including the specified file & diretory. Restarted both nzbgets (and actually rebooted the PCs afterwards too just to make sure), and on both PCs Settings->Web-Interface is completely the same as before. Both PCs have Python 2.7.12 installed.

I'll keep searching, probably it's something utterly stupid ...

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 09 May 2017, 20:31

What do you expect in webui after installing the script?
The right answer is: settings page should have new section "Videosort" at the left menu.
If that doesn't happen - check permissions for newely added dirs and files, maybe nzbget can't read them.

If nothing helps - Install nzbget using official installer package as explained in https://github.com/nzbget/nzbget/wiki/I ... n-on-Linux.
Everything should work after that. Do not reuse your old config file but you can import settings from certain settings sections, just try to keep settings in PATH section to defaults (except DestDir and InterDir which you should change as necessary).

Deepestblue
Posts: 3
Joined: 09 May 2017, 19:22

Re: [PP-Script] VideoSort - better video sorting

Post by Deepestblue » 09 May 2017, 20:41

hugbug wrote:What do you expect in webui after installing the script?
The right answer is: settings page should have new section "Videosort" at the left menu.
If that doesn't happen - check permissions for newely added dirs and files, maybe nzbget can't read them.

If nothing helps - Install nzbget using official installer package as explained in https://github.com/nzbget/nzbget/wiki/I ... n-on-Linux.
Everything should work after that. Do not reuse your old config file but you can import settings from certain settings sections, just try to keep settings in PATH section to defaults (except DestDir and InterDir which you should change as necessary).
Thanks again for taking your time, I knew it would be something utterly embarassing.

I was looking at the line "Open settings tab in NZBGet web-interface and define settings for VideoSort;" and always clicked on the "Web-Interface" entry within the settings tab, looking for VideoSort settings on the right side instead of scrolling down on the left side. Noob mistake. Thanks again, working fine now!

eidlo
Posts: 2
Joined: 14 May 2017, 20:23

Re: [PP-Script] VideoSort - better video sorting

Post by eidlo » 14 May 2017, 20:47

Hi, I'm having trouble getting videosort working - the download always ends up in pp-failure - videosort:failure.
No files are renamed.

The log shows:
error Sun May 14 2017 22:12:50 Post-process-script videosort/VideoSort.py for A.Free.Soul.1931.DVDRip.x264-DJ failed
error Sun May 14 2017 22:12:50 VideoSort: nothing to repeat
error Sun May 14 2017 22:12:50 VideoSort: Failed: A.Free.Soul.1931.DVDRip.x264-DJ.mkv

and:
Sun May 14 2017 22:12:50 INFO VideoSort: raise error, v # invalid expression
Sun May 14 2017 22:12:50 INFO VideoSort: error: nothing to repeat

I tried having the logger.py script running first, but then I got a errormsg from videosort complaining about _nzblog.txt

Here's a log with verbose enabled: https://pastebin.com/SQm01qjb

I've tried several paths here, but I can't seem to get it right.
What I have tried last:

Paths:
MainDir: /mnt/incoming
DestDir: ${MainDir}/d_finished
InterDir: ${MainDir}/d_incoming

Categories:
Name: movies
DestDir: ${DestDir}/movies/incoming
Extensions: FakeDetector.py, videosort/VideoSort.py
Aliases: movies*, Movies*, MOVIES*

Videosort:
MoviesDir: Category1.DestDir
VideoExtensions: .mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg,.vob,.iso,.ts
MoviesFormat: %t (%y)


Python ver: 2.7.9

The IQ is there - I'm just having trouble accessing it...

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] VideoSort - better video sorting

Post by hugbug » 14 May 2017, 21:47

If you changed option LowerWords set it to default:

Code: Select all

LowerWords=the,of,and,at,vs,a,an,but,nor,for,on,so,yet

eidlo
Posts: 2
Joined: 14 May 2017, 20:23

Re: [PP-Script] VideoSort - better video sorting

Post by eidlo » 15 May 2017, 01:37

Thanks for the quick reply.

For some reason there was a *, at the beginning of LowerWords, and I can not remember doing that..
I would never guessed this from the logs.
Spent a whole week on this and you solved in in a blink. Thanks a bunch!

Prodeje79
Posts: 2
Joined: 05 Jun 2017, 12:13

Re: [PP-Script] VideoSort - better video sorting

Post by Prodeje79 » 05 Jun 2017, 12:42

hugbug wrote:
17 Feb 2015, 21:30
Just got an idea that I could add an option to define "default" category to use for %cat, if current download has empty category.
Would decrease the risk for downloads to land in the root of MoviesDir.
I am currently in the process of migrating from a Synology DS211j to a DS916+. I am also moving from SAB/Sick to NZBGet/Sonarr. In addition I am going from using the SynoCommunity packages to use Docker images from LinuxServer.io.

I found some great dialogue between you and passie trying to do something similar. My library is basically:
/volume1/video/ with 4 folders: kids_movies, kids_tv, movies, and tv

Between Sonarr, Radarr, and NZBGet, I'd like everything to be placed correctly into each folder for kids vs adults. What is the best way to accomplish this? Having two VideoSorts or the category route?

In addition, I'd like to implement some other useful things like "Completion-Propagation/DMCA/Retention check" and un-needed file cleanup (such as sample vids, and other junk).

I am undergoing a lot of change and trying to readup. Unfortunately it is like drinking from a fire hose. Thank you!

kloaknet
Posts: 337
Joined: 23 Jul 2014, 08:52

Re: [PP-Script] VideoSort - better video sorting

Post by kloaknet » 05 Jun 2017, 15:42

Some cleaning help, although videosort does some cleaning too:
viewtopic.php?f=8&t=1975

other options to sort media, no experience with it (more intended for sab/sick):
viewtopic.php?f=8&t=745

and Sonarr can do all the sorting for series already (specify typical folders for each show), then you dont need videosort for series.
Maybe the same applies for movies, when you use Radarr (thats something in development, a spinoff copy of Sonarr)

reimgun
Posts: 1
Joined: 15 Jun 2017, 10:32

Re: [PP-Script] VideoSort - better video sorting

Post by reimgun » 15 Jun 2017, 10:50

Hi,


I have the following setup runnning:

Qnap TS451
python 2.7.12
NZBGet 15.0
Videosort PP-Script Version: 7.0-testing.

it worked always great but after the last Qnap upgrade to 4.3.3 the following Problem occur:

VideoSort: ImportError: /opt/lib/python2.7/lib-dynload/_collections.so: wrong ELF class: ELFCLASS32
VideoSort: from _collections import deque, defaultdict
VideoSort: File "/opt/lib/python2.7/collections.py", line 8, in <module>
VideoSort: import collections
VideoSort: File "/opt/lib/python2.7/shutil.py", line 12, in <module>
VideoSort: import shutil
VideoSort: File ..../VideoSort.py", line 260

any Ideas ?

best regards

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests