Pomoc Medialibrary and existing files (external Filebot)

alexsmith2709

Passing Basics
Beginner
1 Listopad 2015
24
0
1
37
QNAP
TS-x53
Ethernet
1 GbE
Hi,
I installed new hard drives in my NAS and have copy all downloads back to the new drive in /share/Rdownload/downloads/{label}. I want all these files to be hard-linked to medialibrary. Some of these files i am no longer seeding anywhere and even ones i am dont always copy to complete or medialibrary.
I tried using:
/usr/bin/rtorrent/bin/filebot-postprocess.sh [path_to__download_dir] but i get a permission denied error. Here is the full error:
Kod:
------------------------------------------------------------------------------
(medialibrary-postprocess) PID: 16215; (parent:15039)
---------------------------------------------------------- || Hello World! ---
touch: /share/Rdownload/logs/medialib.log: Permission denied
/usr/bin/rtorrent/bin/filebot-postprocess.sh: line 237: /share/Rdownload/logs/medialib.log: Permission denied
/usr/bin/rtorrent/bin/filebot-postprocess.sh: line 238: /share/Rdownload/logs/medialib.log: Permission denied
/usr/bin/rtorrent/bin/filebot-postprocess.sh: line 239: /share/Rdownload/logs/medialib.log: Permission denied
/usr/bin/rtorrent/bin/filebot-postprocess.sh: line 240: /share/Rdownload/logs/medialib.log: Permission denied
/usr/bin/rtorrent/bin/filebot-postprocess.sh: line 263: /share/Rdownload/logs/medialib.log: Permission denied
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:17)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:19)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:21)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:23)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

Error during startup
java.lang.ExceptionInInitializerError
        at net.filebot.Main.main(Main.java:115)
Caused by: net.sf.ehcache.CacheException: java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.CacheManager.<init>(CacheManager.java:36)
        at net.filebot.CacheManager.<clinit>(CacheManager.java:22)
        ... 1 more
Caused by: java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.util.FileUtilities.createFolders(FileUtilities.java:191)
        at net.filebot.CacheManager.acquireDiskStore(CacheManager.java:86)
        at net.filebot.CacheManager.<init>(CacheManager.java:33)
        ... 2 more

LIC FOUND
try_fix_kodi_tv_shows enabled
Will extract archives content in movie, tv, 4k, kids, xxx and etc but will not delete content
/usr/bin/rtorrent/bin/filebot-postprocess.sh: line 392: /share/Rdownload/logs/medialib.log: Permission denied
tee: /share/Rdownload/logs/medialib.log: Permission denied
20191124_094920 - STEP [ 7/xx] - postrun  - (exec)
# /usr/bin/rtorrent/bin/filebot -script fn:amc --action hardlink      --def artwork=y                --def extras=y                  --def backdrops=y      --def music=y                    --def tmdbTV=y                  --def nfoOnly=n --lang en --output /share/CACHEDEV1_DATA/Rdownload/medialibrary                -mediainfo                                                                      --encoding UTF-8                                                                -non-strict                                                                    --conflict override                                                            --def clean=y                                                                  --def unsorted=y                                                                --log-file /share/Rdownload/logs/medialib.log                                  --def excludeList=/share/Rdownload/settings/filebot/amc.txt  --def deleteAfterExtract=n --def subtitles=en --def plex=192.168.1.2:32400 --def emby=192.168.1.2:c2a9e7ff371c4c89b2e31411101d546a
  ut_dir="/share/CACHEDEV1_DATA/Rdownload/downloads/movie" ut_kind=multi ut_title="" ut_label="movie"

------------------------------------------------------------------------------
(filebot) PID: 16334; (parent:16215)
---------------------------------------------------------- || Hello World! ---
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:17)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:19)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:21)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
java.nio.file.AccessDeniedException: /share/CACHEDEV1_DATA/.qpkg/rtorrent/filebot/data/username
        at net.filebot.ApplicationFolder.<init>(ApplicationFolder.java:34)
        at net.filebot.ApplicationFolder.<clinit>(ApplicationFolder.java:23)
        at net.filebot.Main.initializeSystemProperties(Main.java:405)
        at net.filebot.Main.main(Main.java:111)

Error during startup
java.nio.file.AccessDeniedException: /share/Rdownload/logs/medialib.log
        at net.filebot.Logging.createLogFileHandler(Logging.java:69)
        at net.filebot.Main.initializeLogging(Main.java:455)
        at net.filebot.Main.main(Main.java:112)

find: /share/CACHEDEV1_DATA/Rdownload/medialibrary/TV Shows/: No such file or directory
I do not have any TV shows in my movie folder so not sure why the last line is appearing.

I assume the filebot-postprocess.sh script only scans complete, not downloads? What is the best way to hard-link all these files to complete and then get the permissions error sorted?

Firmware version: 4.4.1.1117 Build 20191109
Model name: QNAP TS-253 Pro
I sorted this. I disabled my admin account and created a new one with a different name for security reasons. Enabling the default admin account and running this again works.

My question now is how do i modify how folders/files are detected, most of my downloads have done into "Unsorted". I've tried understanding the postprocess script and reading on the filebot forums but i dont really understand it, i dont know where to add any of the expressions
 
all items (folders/files) in folder
/share/CACHEDEV1_DATA/Rdownload/downloads/movie
are going to be renamed (using hardlinks) to detected names from Internets (with lot of options set in commandline ) by filebot's script Automated Media Center - FileBot
I understand this, but how do i fix ones that go into "Unsorted" folder when these movies definitely exists on tmdb. I assume i need to edit the options in the script but i dont know how
 
Using Rdownload. If you hadnt seen my edit, the first problem is now fixed, its now about fixing the Unsorted folder in medialibrary. How do i add/edit filters and options for filebot/amc? Most of my films (havent tested TV shows yet but this is currently running) end up in "Unsorted" even though i have checked with TMDB and the films are listed on there. I dont understand how to use the instructions on the filebot/amc help in the rtorrent script
 
First of all please understand that Filebot in rtorrent-Pro is not so flexible yet like a standalone filebot. It is using common scenario known as AMC. If you are looking for custom usage, then It's better to disable rTorrent-Pro MediaLibrary functionality and replace it with commercial Filebot with custom scripts.

The second part is...
Show me example of what dirnames and filenames are not resolved by built-in MediaLibrary Filebot.
 
First of all please understand that Filebot in rtorrent-Pro is not so flexible yet like a standalone filebot. It is using common scenario known as AMC. If you are looking for custom usage, then It's better to disable rTorrent-Pro MediaLibrary functionality and replace it with commercial Filebot with custom scripts.

The second part is...
Show me example of what dirnames and filenames are not resolved by built-in MediaLibrary Filebot.
One example is A.Fantastic.Fear.Of.Everything.2012.1080p.BluRay.x264-BRMP with a filename inside that of a.fantastic.fear.of.everything.2012.1080p.bluray.x264-brmp.mkv
It is not limited to whether there are "." or spaces.
Also some music has gone to my unsorted folder even though it has all the information in the metadata of the file.
If there isnt this much customisation by using the built in one i will consider buying the standalone filebot
 
I have bought the standalone filebot and its working great. How do i run the amc script when rtorrent finishes a download? The filebot website mentions editing the .rtorrent.rc file but i cant find it anywhere.
 
Thats not very helpful. I have found a config file (rtorrent.conf) but it says not to edit it and any edits will be lost the next time it is generated which doesnt help but does look like the correct file.
I have also tried creating a script and putting it in the scripts directory, setting it as executable but that doesnt seem to be called.
 
If you wish to edit config then you have to edit template.
The correct way is external script which is called when correct name is set. An example script should be there.
Screenshot_2019-11-30-14-48-52-828_com.android.chrome.jpg
 
This is what i tried and called it finished-filebot.sh and set it to executable but it doesnt seem to be called. I found a template for a script and used it. This si what i used:
Kod:
#!/bin/sh

# Input Parameters
ARG_PATH="$3"
ARG_NAME="$2"
ARG_LABEL="$4"

# Configuration
CONFIG_OUTPUT="/share/Rdownload/medialibrary/"

filebot -script fn:amc /share/Rdownload/complete --output "$CONFIG_OUTPUT" --action test --conflict auto -non-strict --order Airdate --log all --log-file ~/amc.log --def unsorted=y music=y skipExtract=y excludeList="$CONFIG_OUTPUT/excludes.txt" emby="host:api" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" seriesFormat="{n}/Season {s}/{s00e00} - {t}" movieFormat="{ny}/{n.space('.')}.{source}.{vc}.{ac}" musicFormat="{albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}"

exit 0
Obviously this is just a dry run, but the log isnt create and there is no sign of this script being called in execute.log. If anything is wrong with this please let me know but the filebot command works fine outside of this script.
What did happen was that rtorrent deleted my installed version of filebot back to its version with this error:
Kod:
(warn) rtorrent: Deleting existing file in place of target symlink: /usr/bin/filebot.
Now i have to reinstall filebot and my license
 
This is what i tried and called it finished-filebot.sh and set it to executable but it doesnt seem to be called. I found a template for a script and used it. This si what i used:
Kod:
#!/bin/sh

# Input Parameters
ARG_PATH="$3"
ARG_NAME="$2"
ARG_LABEL="$4"

# Configuration
CONFIG_OUTPUT="/share/Rdownload/medialibrary/"

filebot -script fn:amc /share/Rdownload/complete --output "$CONFIG_OUTPUT" --action test --conflict auto -non-strict --order Airdate --log all --log-file ~/amc.log --def unsorted=y music=y skipExtract=y excludeList="$CONFIG_OUTPUT/excludes.txt" emby="host:api" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" seriesFormat="{n}/Season {s}/{s00e00} - {t}" movieFormat="{ny}/{n.space('.')}.{source}.{vc}.{ac}" musicFormat="{albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}"

exit 0
Obviously this is just a dry run, but the log isnt create and there is no sign of this script being called in execute.log. If anything is wrong with this please let me know but the filebot command works fine outside of this script.
Its better to replace this line with echo prefix and see what exactly it generates and check if thats fine.
Bash:
echo filebot -script fn:amc /share/Rdownload/complete --output "$CONFIG_OUTPUT" --action test --conflict auto -non-strict --order Airdate --log all --log-file ~/amc.log --def unsorted=y music=y skipExtract=y excludeList="$CONFIG_OUTPUT/excludes.txt" emby="host:api" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" seriesFormat="{n}/Season {s}/{s00e00} - {t}" movieFormat="{ny}/{n.space('.')}.{source}.{vc}.{ac}" musicFormat="{albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}" >> /share/Public/finish.txt
What did happen was that rtorrent deleted my installed version of filebot back to its version with this error:
Kod:
(warn) rtorrent: Deleting existing file in place of target symlink: /usr/bin/filebot.
Now i have to reinstall filebot and my license
Not really. It replace symlink only. You have to use absolute path anyway.
 
I fixed a few things with my test script and ran it "live" but it doesnt work (either as test or live). This is the output to the file finish.txt but no files are copied to the medialibrary and no amc.log file is created. This output looks correct.

Kod:
usr/bin/filebot -script fn:amc /share/Rdownload/complete --output /share/Rdownload/medialibrary/ --action hardlink --conflict auto -non-strict --order Airdate --log all --log-file /share/Rdownload/medialibrary/amc.log --def unsorted=y music=y skipExtract=y excludeList=/share/Rdownload/medialibrary/excludes.txt emby=host:api ut_label=tv seriesFormat={n}/Season {s}/{s00e00} - {t} movieFormat={ny}/{n.space('.')}.{source}.{vc}.{ac} musicFormat={albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}

amc.log was created in /usr/bin/rtorrent/root/amc.log during an earlier test but failed with an error which is what i fixed. As it does appear that rtorrent is calling the script because it output to the finish.txt i'll go back to the filebot forums to figure this out
 
i realised about the missing / just after posting so fixed that. I also thought /usr/bin/filebot was the path. Thanks for helping me find the real path.
Now my output to finish.txt is:
Kod:
/share/CACHEDEV1_DATA/.qpkg/filebot/bin/filebot.sh -script fn:amc /share/Rdownload/complete --output /share/Rdownload/medialibrary/ --action hardlink --conflict auto -non-strict --order Airdate --log all --log-file /share/Rdownload/medialibrary/amc.log --def unsorted=y music=y skipExtract=y excludeList=/share/Rdownload/medialibrary/excludes.txt emby=host:api ut_label=tv seriesFormat={n}/Season {s}/{s00e00} - {t} movieFormat={ny}/{n.space('.')}.{source}.{vc}.{ac} musicFormat={albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}
but im still not getting any files copied or a log file created.
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. filebot rescan
  2. rtorrent hard