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
 
Be honest 3rd party filebot is not my case. But Im trying to be a good guy sometimes and want to help you :)
Wanna some assist from me?
Install AnyDesk and gimme ID on PM. AnyDesk is something like TeamViewer but portable.
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}
You havent answered. I set topic rejected.
FYI: You are missing knowledge about bash things.
Looking for help on filebot forum makes no sense until you learn linux.
You miss quotation marks " in all arguments thats for sure.
musicFormat={albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}
How this could be a param? In your case its multiple param.
it should be:
musicFormat="{albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}"

Try to find what is wrong with your code first.
 
Sorry. i've only just got back on a computer. I've just tried something that the filebot dev has suggested to work out where the error is coming from. I have noticed that when the script is run it keeps going back to the rtorrent version of filebot, not the version i am trying to point to. I have filebot 4.9.0 installed but the script calls 4.8.5 from rtorrent-pro.
I will let you know if i need remote assistance
 
I am using the absolute path, it still happens. Even calling filebot outside of rtorrent-pro and in filebot-node (gui for filebot) it then calls the rtorrent version, then i reinstall 4.9.0 beta and its ok again until the script is run and goes back to the 4.8.5.
My script is calling
Kod:
/share/CACHEDEV1_DATA/.qpkg/filebot/bin/filebot.sh
 
We've created simple script /share/Rdownload/scripts/finished-filebot.sh
Bash:
#!/bin/sh

export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin"

_err() {
        echo $*
        exit 1
}

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

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

[ -d "$CONFIG_OUTPUT" ] || _err "Output directory does not exist ${CONFIG_OUTPUT}"

FILEBOT_PATH=$(getcfg -f /etc/config/qpkg.conf filebot Install_Path)
FILEBOT_BIN="${FILEBOT_PATH}/bin/filebot.sh"
${FILEBOT_BIN} -version | grep FileBot 2>/dev/null 1>/dev/null || _err Filebot not working

# OKAY HAVE IDEA LETS DONT SCRIPT TOO MUCH AND MAKE IT EASY TO RUN
${FILEBOT_BIN}                                          \
-script fn:amc                                          \
--output "${CONFIG_OUTPUT}"                             \
--actio/n test                                           \
--conflict auto                                         \
-non-strict                                             \
--order Airdate                                         \
--log all                                               \
--log-file "${CONFIG_OUTPUT}/amc.log"                   \
--def excludeList="${CONFIG_OUTPUT}/excludes.txt"       \
ut_label="${ARG_LABEL}"                                 \
ut_dir="${ARG_PATH}"                                    \
ut_kind="multi"                                         \
ut_title="${ARG_NAME}"                                  \
unsorted=y                                              \
music=y                                                 \
skipExtract=y                                           \
emby="192.168.1.2:7747cdf02cda4bb7910afd0e7927050b"     \
seriesFormat="{n}/Season {s}/{s00e00} - {t}"            \
movieFormat="{ny}/{n.space('.')}.{source}.{vc}.{ac}"    \
musicFormat="{albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}"       \
                 | tee -a "${CONFIG_OUTPUT}/filebot.log"

exit 0

This script executes external Filebot on each torrent downloading finish event.
Disadventage of this script?
- It does not use queue manager which means each finished events hold whole rtorrent downloading.

We've create another additional script which is basically the same called rescan_all_in_complete.sh
Bash:
#!/bin/sh

export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin"

_err() {
        echo $*
        exit 1
}

# TOLD YOU TO USE ABSOLUTE PATH!!!
#filebot -version > /tmp/filebot-version.txt 2>&1
#filebot -script fn:sysinfo > /tmp/filebot-sysinfo.txt 2>&1
#filebot -script fn:sysenv > /tmp/filebot-sysenv.txt 2>&1
#/share/CACHEDEV1_DATA/.qpkg/filebot/bin/filebot.sh -version > /tmp/filebot-version.txt 2>&1
#/share/CACHEDEV1_DATA/.qpkg/filebot/bin/filebot.sh -script fn:sysinfo > /tmp/filebot-sysinfo.txt 2>&1
#/share/CACHEDEV1_DATA/.qpkg/filebot/bin/filebot.sh -script fn:sysenv > /tmp/filebot-sysenv.txt 2>&1


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

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

[ -d "$CONFIG_OUTPUT" ] || _err "Output directory does not exist ${CONFIG_OUTPUT}"

FILEBOT_PATH=$(getcfg -f /etc/config/qpkg.conf filebot Install_Path)
FILEBOT_BIN="${FILEBOT_PATH}/bin/filebot.sh"
${FILEBOT_BIN} -version | grep FileBot 2>/dev/null 1>/dev/null || _err Filebot not working

# OKAY HAVE IDEA LETS DONT SCRIPT TOO MUCH AND MAKE IT EASY TO RUN
${FILEBOT_BIN}                                          \
-script fn:amc                                          \
/share/Rdownload/complete                               \
--output "${CONFIG_OUTPUT}"                             \
--action test                                           \
--conflict auto                                         \
-non-strict                                             \
--order Airdate                                         \
--log all                                               \
--log-file "${CONFIG_OUTPUT}/amc.log"                   \
--def excludeList="${CONFIG_OUTPUT}/excludes.txt"       \
ut_label="${ARG_LABEL}"                                 \
unsorted=y                                              \
music=y                                                 \
skipExtract=y                                           \
emby="192.168.1.2:7747cdf02cda4bb7910afd0e7927050b"     \
seriesFormat="{n}/Season {s}/{s00e00} - {t}"            \
movieFormat="{ny}/{n.space('.')}.{source}.{vc}.{ac}"    \
musicFormat="{albumArtist}/{album}/{media.PartPosition}{pi.pad(2)} - {t}"       \
                 | tee -a "${CONFIG_OUTPUT}/filebot.log"

exit 0
This script is used to rescan all content in complete directory.

Hint:
Coding in QNAP is bit tricky sometimes. QNAP is not a typical Linux so the environment differes from standard Linux distributions.
 

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

  1. rtorrent hard
  2. filebot rescan