Page 37 of 47

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

Posted: 09 May 2017, 20:07
by hugbug
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.

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

Posted: 09 May 2017, 20:19
by Deepestblue
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 ...

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

Posted: 09 May 2017, 20:31
by hugbug
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).

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

Posted: 09 May 2017, 20:41
by Deepestblue
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!

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

Posted: 14 May 2017, 20:47
by eidlo
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...

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

Posted: 14 May 2017, 21:47
by hugbug
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

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

Posted: 15 May 2017, 01:37
by eidlo
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!

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

Posted: 05 Jun 2017, 12:42
by Prodeje79
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!

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

Posted: 05 Jun 2017, 15:42
by kloaknet
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)

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

Posted: 15 Jun 2017, 10:50
by reimgun
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