jkaberg / tExtractor

Extract torrents upon completion
14 stars 4 forks source link

Help needed for setup #1

Closed MammothJerk closed 4 years ago

MammothJerk commented 4 years ago

Unraid: 6.8.1 Docker: 19.03.5 DelugeVPN: 2.0.4.dev23 Radarr: 0.2.0.1450 Sonarr: 2.0.0.5338

Each docker stores its script within the appdata sub-folder but it bound to the /config path for each container.

When i download a torrent with a bunch of .r# + 1 .rar file nothing seems to happen.

My downloads go into /mnt/torrents which is a cache share so that it doesnt keep ticking away on my HDDs constantly. when the torrent is finished downloading it gets moved to the /mnt/Media/.seeding share.

Does the script think that the is the /mnt/torrents folder? as in does the execute script run before the torrent moves to its "finished" folder? would adding a delay in the script fix this perhaps? or maybe a specific argument that waits for the move to finish?

should the sonar/radar_cleanup scripts have an extension? i added .sh to them although the github shows them w/o an extension.

Am i at least on the right track here? thanks.

jkaberg commented 4 years ago

Deluge will execute the script once the torrent has finished moving. Did you restart Deluge after setting up the Execute plugin?

The script will look for the following extensions, if you do not have any of them in your download directory it will not work. Remember to install unrar and unzip.

You don't need to add extensions on executables in Linux, as long as you made it executable (chmod +x filename).

EDIT:

If your unsure the script works just enter the docker (docker exec -it <container name> sh) and run the script /config/extract.py --verbose dummydata My.Torrent.Name /full/path/to/base/download/directory.

MammothJerk commented 4 years ago

I have restarted several times and the execute plugin with the correct command is still active

yes, there is a .rar file that links to multiple .r## which seems to be the default for certain trackers. I had NOT installed unrar on my on my unraid server, i've since installed it through the Nerd Pack


i went through the terminal and gave sonarr_cleanup, radarr_cleanup and extract.py execution rights.

i was getting permission denied when i was trying to run the test script and it turned out extract.py didnt have execution rights. fixed that and now the script runs smoothly, thanks for the help :)

MammothJerk commented 4 years ago

Sorry to reopen this but i seem to have run into a snag with the cleanup script. It is not deleting the __extracted folder and the extracted file after it has been imported into sonarr/radarr.

this is my log output during the import where you can see the cleanup script being ran but it doesn't do anything. the script has execution rights.

this is the script stored as "sonarr_cleanup" with no file extension, rwx permissions, within /config

#!/bin/bash
if [ -d "$sonarr_episodefile_sourcefolder" ] && [ "$(basename $sonarr_episodefile_sourcefolder)" = "__extracted" ] ; then
    /bin/rm -rf "$sonarr_episodefile_sourcefolder"
fi
20-1-23 00:50:19.8|Debug|Parser|Parsing string 'Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME'
20-1-23 00:50:19.8|Trace|Parser|^(?<title>.+?)(?:(?:[-_\W](?<![()\[!]))+S?(?<season>(?<!\d+)(?:\d{1,2})(?!\d+))(?:[ex]|\W[ex]){1,2}(?<episode>\d{2,3}(?!\d+))(?:(?:\-|[ex]|\W[ex]|_){1,2}(?<episode>\d{2,3}(?!\d+)))*)\W?(?!\\)
20-1-23 00:50:19.8|Debug|Parser|Episode Parsed. Isekai Quartet - S02E01 
20-1-23 00:50:19.9|Debug|Parser|Language parsed: English
20-1-23 00:50:19.9|Debug|QualityParser|Trying to parse quality for Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME
20-1-23 00:50:19.9|Debug|Parser|Quality parsed: WEBDL-1080p v1
20-1-23 00:50:19.9|Debug|Parser|Release Group parsed: URANiME
20-1-23 00:50:19.9|Debug|UpgradeMediaFileService|Removing existing episode file: [70096] Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv
20-1-23 00:50:19.9|Debug|RecycleBinProvider|Attempting to send '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv' to recycling bin
20-1-23 00:50:19.9|Debug|RecycleBinProvider|Moving '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv' to '/mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv'
20-1-23 00:50:19.9|Debug|DiskTransferService|Move [/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv] > [/mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv]
20-1-23 00:50:19.9|Trace|SymbolicLinkResolver|Checking path /mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv for symlink returned error ENOENT, assuming it's not a symlink.
20-1-23 00:50:19.9|Trace|DiskTransferService|Attempting to move hardlinked backup.
20-1-23 00:50:19.9|Trace|DiskTransferService|Hardlink move succeeded, deleting source.
20-1-23 00:50:20.0|Trace|DiskProviderBase|Deleting file: /mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv
20-1-23 00:50:20.0|Debug|RecycleBinProvider|File has been moved to the recycling bin: /mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv
20-1-23 00:50:20.0|Trace|EventAggregator|Publishing EpisodeFileDeletedEvent
20-1-23 00:50:20.0|Trace|EventAggregator|EpisodeFileDeletedEvent -> EpisodeService
20-1-23 00:50:20.0|Debug|EpisodeService|Detaching episode 16034 from file.
20-1-23 00:50:20.0|Trace|EventAggregator|EpisodeFileDeletedEvent <- EpisodeService
20-1-23 00:50:20.0|Trace|EventAggregator|EpisodeFileDeletedEvent -> HistoryService
20-1-23 00:50:20.1|Trace|EventAggregator|EpisodeFileDeletedEvent <- HistoryService
20-1-23 00:50:20.1|Trace|EventAggregator|EpisodeFileDeletedEvent -> SubtitleFileService
20-1-23 00:50:20.1|Debug|SubtitleFileService|Deleting Extra from database for episode file: [70096] Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv
20-1-23 00:50:20.1|Trace|EventAggregator|EpisodeFileDeletedEvent <- SubtitleFileService
20-1-23 00:50:20.1|Trace|EventAggregator|EpisodeFileDeletedEvent -> OtherExtraFileService
20-1-23 00:50:20.1|Debug|OtherExtraFileService|Deleting Extra from database for episode file: [70096] Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv
20-1-23 00:50:20.1|Trace|EventAggregator|EpisodeFileDeletedEvent <- OtherExtraFileService
20-1-23 00:50:20.1|Trace|EventAggregator|EpisodeFileDeletedEvent -> MetadataFileService
20-1-23 00:50:20.2|Debug|RecycleBinProvider|Attempting to send '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo' to recycling bin
20-1-23 00:50:20.2|Debug|RecycleBinProvider|Moving '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo' to '/mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo'
20-1-23 00:50:20.2|Debug|DiskTransferService|Move [/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo] > [/mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo]
20-1-23 00:50:20.2|Trace|SymbolicLinkResolver|Checking path /mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo for symlink returned error ENOENT, assuming it's not a symlink.
20-1-23 00:50:20.2|Trace|DiskTransferService|Attempting to move hardlinked backup.
20-1-23 00:50:20.3|Trace|DiskTransferService|Hardlink move succeeded, deleting source.
20-1-23 00:50:20.3|Trace|DiskProviderBase|Deleting file: /mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo
20-1-23 00:50:20.3|Debug|RecycleBinProvider|File has been moved to the recycling bin: /mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.nfo
20-1-23 00:50:20.3|Debug|RecycleBinProvider|Attempting to send '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg' to recycling bin
20-1-23 00:50:20.3|Debug|RecycleBinProvider|Moving '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg' to '/mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg'
20-1-23 00:50:20.3|Debug|DiskTransferService|Move [/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg] > [/mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg]
20-1-23 00:50:20.4|Trace|SymbolicLinkResolver|Checking path /mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg for symlink returned error ENOENT, assuming it's not a symlink.
20-1-23 00:50:20.4|Trace|DiskTransferService|Attempting to move hardlinked backup.
20-1-23 00:50:20.4|Trace|DiskTransferService|Hardlink move succeeded, deleting source.
20-1-23 00:50:20.4|Trace|DiskProviderBase|Deleting file: /mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg
20-1-23 00:50:20.4|Debug|RecycleBinProvider|File has been moved to the recycling bin: /mnt/user/Media/.Recycle.Bin/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas-thumb.jpg
20-1-23 00:50:20.4|Debug|MetadataFileService|Deleting Extra from database for episode file: [70096] Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileDeletedEvent <- MetadataFileService
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileDeletedEvent -> SeriesModule
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileDeletedEvent <- SeriesModule
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileDeletedEvent -> MediaFileDeletionService
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileDeletedEvent <- MediaFileDeletionService
20-1-23 00:50:20.5|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:20.5|Trace|ConfigService|Using default config value for 'copyusinghardlinks' defaultValue:'True'
20-1-23 00:50:20.5|Debug|EpisodeFileMovingService|Hardlinking episode file: /mnt/user/Media/.Seeding/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME/__extracted/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME.mkv to /mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv
20-1-23 00:50:20.5|Debug|DiskTransferService|HardLinkOrCopy [/mnt/user/Media/.Seeding/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME/__extracted/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME.mkv] > [/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv]
20-1-23 00:50:20.5|Debug|UpdateEpisodeFileService|Date of file [/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv] changed from '14/01/2020 23:00:01' to '15/01/2020 00:00:00'
20-1-23 00:50:20.5|Trace|ConfigService|Using default config value for 'filechmod' defaultValue:'0644'
20-1-23 00:50:20.5|Trace|ConfigService|Using default config value for 'setpermissionslinux' defaultValue:'False'
20-1-23 00:50:20.5|Trace|EventAggregator|Publishing EpisodeFileAddedEvent
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileAddedEvent -> EpisodeService
20-1-23 00:50:20.5|Debug|EpisodeService|Linking [Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv] > [[16034]Join the Fight! Transfer Student]
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileAddedEvent <- EpisodeService
20-1-23 00:50:20.5|Trace|EventAggregator|EpisodeFileAddedEvent -> EpisodeFileModule
20-1-23 00:50:20.6|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:20.6|Trace|EventAggregator|EpisodeFileAddedEvent <- EpisodeFileModule
20-1-23 00:50:20.6|Debug|XbmcMetadata|Generating Episode Metadata for: /mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv
20-1-23 00:50:20.6|Debug|MetadataService|Writing Episode Metadata to: /mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.nfo
20-1-23 00:50:20.6|Trace|ConfigService|Using default config value for 'filechmod' defaultValue:'0644'
20-1-23 00:50:20.6|Trace|ConfigService|Using default config value for 'setpermissionslinux' defaultValue:'False'
20-1-23 00:50:20.6|Debug|HttpClient|Downloading [https://artworks.thetvdb.com/banners/series/357471/episodes/7483676.jpg] to [/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME-thumb.jpg]
20-1-23 00:50:21.6|Debug|HttpClient|Downloading Completed. took 1s
20-1-23 00:50:21.6|Trace|ConfigService|Using default config value for 'filechmod' defaultValue:'0644'
20-1-23 00:50:21.7|Trace|ConfigService|Using default config value for 'setpermissionslinux' defaultValue:'False'
20-1-23 00:50:21.7|Trace|EventAggregator|Publishing EpisodeImportedEvent
20-1-23 00:50:21.7|Trace|EventAggregator|EpisodeImportedEvent -> NotificationService
20-1-23 00:50:21.7|Debug|NotificationService|No tags set for this notification.
20-1-23 00:50:21.7|Debug|PlexServerService|Sending Update Request to Plex Server
20-1-23 00:50:21.7|Debug|PlexServerService|Getting sections from Plex host: 192.168.1.111
20-1-23 00:50:21.7|Trace|PlexServerProxy|Sections response: {"MediaContainer":{"size":5,"allowSync":false,"identifier":"com.plexapp.plugins.library","mediaTagPrefix":"/system/bundle/media/flags/","mediaTagVersion":1576869286,"title1":"Plex Library","Directory":[{"allowSync":true,"art":"/:/resources/show-fanart.jpg","composite":"/library/sections/6/composite/1579734204","filters":true,"refreshing":false,"thumb":"/:/resources/show.png","key":"6","type":"show","title":"Anime","agent":"com.plexapp.agents.thetvdb","scanner":"Plex Series Scanner","language":"en","uuid":"668fc4b9-4673-4986-8a1f-3f35bc1869e2","updatedAt":1574300699,"createdAt":1568051525,"scannedAt":1579734204,"content":true,"directory":true,"contentChangedAt":1410553,"Location":[{"id":12,"path":"/mnt/user/Media/Anime"}]},{"allowSync":true,"art":"/:/resources/show-fanart.jpg","composite":"/library/sections/10/composite/1579734298","filters":true,"refreshing":false,"thumb":"/:/resources/show.png","key":"10","type":"show","title":"Cartoons","agent":"com.plexapp.agents.thetvdb","scanner":"Plex Series Scanner","language":"en","uuid":"5b15f155-c39a-49e1-8e2a-37f917f48c8a","updatedAt":1574300767,"createdAt":1574300752,"scannedAt":1579734298,"content":true,"directory":true,"contentChangedAt":1411039,"Location":[{"id":13,"path":"/mnt/user/Media/Cartoons"}]},{"allowSync":true,"art":"/:/resources/movie-fanart.jpg","composite":"/library/sections/9/composite/1579735183","filters":true,"refreshing":false,"thumb":"/:/resources/movie.png","key":"9","type":"movie","title":"Movies","agent":"com.plexapp.agents.imdb","scanner":"Plex Movie Scanner","language":"en","uuid":"e164d4b7-706a-4ca2-ab16-d9a60eca10d2","updatedAt":1574300619,"createdAt":1568311374,"scannedAt":1579735183,"content":true,"directory":true,"contentChangedAt":1411260,"Location":[{"id":11,"path":"/mnt/user/Media/Movies"}]},{"allowSync":true,"art":"/:/resources/artist-fanart.jpg","composite":"/library/sections/11/composite/1579655204","filters":true,"refreshing":false,"thumb":"/:/resources/artist.png","key":"11","type":"artist","title":"Music","agent":"tv.plex.agents.music","scanner":"Plex Music","language":"en","uuid":"5ddaff45-cd99-4e47-833e-68fb5a530b38","updatedAt":1574313689,"createdAt":1574300794,"scannedAt":1579655204,"content":true,"directory":true,"contentChangedAt":1350757,"Location":[{"id":14,"path":"/mnt/user/Media/Music"}]},{"allowSync":true,"art":"/:/resources/show-fanart.jpg","composite":"/library/sections/7/composite/1579734418","filters":true,"refreshing":false,"thumb":"/:/resources/show.png","key":"7","type":"show","title":"TV Series","agent":"com.plexapp.agents.thetvdb","scanner":"Plex Series Scanner","language":"en","uuid":"d80adf41-2bcc-475d-9ad7-0e7367cef811","updatedAt":1574300606,"createdAt":1568051542,"scannedAt":1579734418,"content":true,"directory":true,"contentChangedAt":1343975,"Location":[{"id":10,"path":"/mnt/user/Media/TV Series"}]}]}}
20-1-23 00:50:21.7|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.7|Trace|PlexServerProxy|No error detected
20-1-23 00:50:21.7|Debug|PlexServerService|Getting metadata from Plex host: 192.168.1.111 for series: [357471][Isekai Quartet]
20-1-23 00:50:21.8|Trace|PlexServerProxy|Sections response: {"MediaContainer":{"size":0,"allowSync":true,"art":"/:/resources/show-fanart.jpg","identifier":"com.plexapp.plugins.library","librarySectionID":6,"librarySectionTitle":"Anime","librarySectionUUID":"668fc4b9-4673-4986-8a1f-3f35bc1869e2","mediaTagPrefix":"/system/bundle/media/flags/","mediaTagVersion":1576869286,"nocache":true,"thumb":"/:/resources/show.png","title1":"Anime","title2":"All Shows","viewGroup":"show","viewMode":65592}}
20-1-23 00:50:21.8|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.8|Trace|PlexServerProxy|No error detected
20-1-23 00:50:21.8|Debug|PlexServerService|Getting metadata from Plex host: 192.168.1.111 for series: [357471][Isekai Quartet]
20-1-23 00:50:21.8|Trace|PlexServerProxy|Sections response: {"MediaContainer":{"size":0,"allowSync":true,"art":"/:/resources/show-fanart.jpg","identifier":"com.plexapp.plugins.library","librarySectionID":10,"librarySectionTitle":"Cartoons","librarySectionUUID":"5b15f155-c39a-49e1-8e2a-37f917f48c8a","mediaTagPrefix":"/system/bundle/media/flags/","mediaTagVersion":1576869286,"nocache":true,"thumb":"/:/resources/show.png","title1":"Cartoons","title2":"All Shows","viewGroup":"show","viewMode":65592}}
20-1-23 00:50:21.8|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.8|Trace|PlexServerProxy|No error detected
20-1-23 00:50:21.8|Debug|PlexServerService|Getting metadata from Plex host: 192.168.1.111 for series: [357471][Isekai Quartet]
20-1-23 00:50:21.8|Trace|PlexServerProxy|Sections response: {"MediaContainer":{"size":0,"allowSync":true,"art":"/:/resources/show-fanart.jpg","identifier":"com.plexapp.plugins.library","librarySectionID":7,"librarySectionTitle":"TV Series","librarySectionUUID":"d80adf41-2bcc-475d-9ad7-0e7367cef811","mediaTagPrefix":"/system/bundle/media/flags/","mediaTagVersion":1576869286,"nocache":true,"thumb":"/:/resources/show.png","title1":"TV Series","title2":"All Shows","viewGroup":"show","viewMode":65592}}
20-1-23 00:50:21.8|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.8|Trace|PlexServerProxy|No error detected
20-1-23 00:50:21.8|Debug|PlexServerService|Unable to update partial section, updating all TV sections
20-1-23 00:50:21.8|Debug|PlexServerService|Updating Plex host: 192.168.1.111, Section: 6
20-1-23 00:50:21.8|Trace|PlexServerProxy|Update response: 
20-1-23 00:50:21.8|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.8|Trace|PlexServerProxy|No response body returned, no error detected
20-1-23 00:50:21.8|Debug|PlexServerService|Updating Plex host: 192.168.1.111, Section: 10
20-1-23 00:50:21.8|Trace|PlexServerProxy|Update response: 
20-1-23 00:50:21.8|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.8|Trace|PlexServerProxy|No response body returned, no error detected
20-1-23 00:50:21.8|Debug|PlexServerService|Updating Plex host: 192.168.1.111, Section: 7
20-1-23 00:50:21.9|Trace|PlexServerProxy|Update response: 
20-1-23 00:50:21.9|Trace|PlexServerProxy|Checking for error
20-1-23 00:50:21.9|Trace|PlexServerProxy|No response body returned, no error detected
20-1-23 00:50:21.9|Debug|NotificationService|No tags set for this notification.
20-1-23 00:50:21.9|Debug|CustomScript|Executing external script: /config/sonarr_cleanup
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_episodetitles' to 'Join the Fight! Transfer Student'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_sourcefolder' to '/mnt/user/Media/.Seeding/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME/__extracted'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_episodenumbers' to '1'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_deletedrelativepaths' to 'Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_tvdbid' to '357471'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_episodecount' to '1'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_id' to '95'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_quality' to 'WEBDL-1080p'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_title' to 'Isekai Quartet'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_releasegroup' to 'URANiME'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_sourcepath' to '/mnt/user/Media/.Seeding/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME/__extracted/Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME.mkv'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_eventtype' to 'Download'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_imdbid' to 'tt9193770'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_seasonnumber' to '2'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_episodeairdates' to '2020-01-15'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_relativepath' to 'Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_path' to '/mnt/user/Media/Anime/Isekai Quartet'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_episodeairdatesutc' to '14/01/2020 15:00:00'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_deletedpaths' to '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Episode 1 [HDTV-1080p (x265 10bit)] {Opus 2.0 [EN]} -Judas.mkv'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_isupgrade' to 'True'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_download_id' to '6125431D760BD5CEA77C2446FBB2C0C56DE40AFD'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_scenename' to 'Isekai.Quartet.S02E01.1080p.WEB.x264-URANiME'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_qualityversion' to '1'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_download_client' to 'Deluge'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_id' to '71735'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_path' to '/mnt/user/Media/Anime/Isekai Quartet/Season 02/Isekai Quartet - S02E01 (13) - Join the Fight! Transfer Student [WEBDL-1080p (x264 8bit)] {AAC 2.0 [EN]} -URANiME.mkv'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_tvmazeid' to '41447'
20-1-23 00:50:21.9|Trace|ProcessProvider|Setting environment variable 'sonarr_series_type' to 'Anime'
20-1-23 00:50:21.9|Debug|sonarr_cleanup|Starting /config/sonarr_cleanup 
20-1-23 00:50:22.1|Debug|CustomScript|Executed external script: /config/sonarr_cleanup - Status: 255
20-1-23 00:50:22.1|Debug|CustomScript|Script Output: 

20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent <- NotificationService
20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent -> HistoryService
20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent <- HistoryService
20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent -> DownloadMonitoringService
20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent <- DownloadMonitoringService
20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent -> CutoffModule
20-1-23 00:50:22.1|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.1|Trace|EventAggregator|EpisodeImportedEvent <- CutoffModule
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent -> MissingModule
20-1-23 00:50:22.2|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent <- MissingModule
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent -> SeriesModule
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent <- SeriesModule
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent -> EpisodeModule
20-1-23 00:50:22.2|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent <- EpisodeModule
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent -> CalendarModule
20-1-23 00:50:22.2|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.2|Trace|EventAggregator|EpisodeImportedEvent <- CalendarModule
20-1-23 00:50:22.2|Trace|EventAggregator|Publishing DownloadCompletedEvent
20-1-23 00:50:22.2|Trace|EventAggregator|Publishing HealthCheckCompleteEvent
20-1-23 00:50:22.2|Trace|EventAggregator|HealthCheckCompleteEvent -> HealthModule
20-1-23 00:50:22.2|Trace|EventAggregator|DownloadCompletedEvent -> DownloadEventHub
20-1-23 00:50:22.2|Trace|EventAggregator|HealthCheckCompleteEvent <- HealthModule
20-1-23 00:50:22.2|Trace|EventAggregator|DownloadCompletedEvent <- DownloadEventHub
20-1-23 00:50:22.3|Trace|Http|Req: 208289 [GET] /api/episode?seriesId=95
20-1-23 00:50:22.3|Trace|Http|Req: 208290 [GET] /api/episodefile?seriesId=95
20-1-23 00:50:22.3|Trace|EventAggregator|Publishing TrackedDownloadRefreshedEvent
20-1-23 00:50:22.3|Trace|EventAggregator|TrackedDownloadRefreshedEvent -> QueueService
20-1-23 00:50:22.3|Trace|EventAggregator|Publishing QueueUpdatedEvent
20-1-23 00:50:22.3|Trace|EventAggregator|QueueUpdatedEvent -> QueueModule
20-1-23 00:50:22.3|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.3|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.3|Trace|EventAggregator|QueueUpdatedEvent <- QueueModule
20-1-23 00:50:22.3|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.3|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.3|Trace|EventAggregator|TrackedDownloadRefreshedEvent <- QueueService
20-1-23 00:50:22.3|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.3|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.4|Trace|CommandQueueManager|Updating command status
20-1-23 00:50:22.4|Trace|Http|Req: 208291 [GET] /api/health
20-1-23 00:50:22.4|Trace|Owin|SQLite error (5): database is locked in "PRAGMA cache_size=-10000"

20-1-23 00:50:22.4|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.4|Trace|Owin|SQLite error (5): database is locked in "PRAGMA cache_size=-10000"

20-1-23 00:50:22.4|Trace|Http|Res: 208291 [GET] /api/health: 200.OK (25 ms)
20-1-23 00:50:22.4|Debug|MediaInfoFormatter|Formatting audio channels using 'AudioChannelPositions', with a value of: '2/0/0'
20-1-23 00:50:22.4|Trace|Http|Req: 208292 [GET] /api/queue?sort_by=timeleft&order=asc
20-1-23 00:50:22.4|Debug|Api|[GET] /api/health: 200.OK (25 ms)

Changing the arguments like this (setting the path to /bin/bash and arguments to script path)

as i found from this topic https://forums.sonarr.tv/t/why-wont-sonarr-run-this-custom-script/13963 Does not fix it either, and it throws this error at me

20-1-23 03:56:03.4|Debug|NotificationService|No tags set for this notification.
20-1-23 03:56:03.4|Debug|CustomScript|Executing external script: /bin/bash
20-1-23 03:56:03.4|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_quality' to 'WEBDL-2160p'
20-1-23 03:56:03.4|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_sourcepath' to '/mnt/user/Media/.Seeding/6.Underground.2019.HDR.2160p.WEBRip.x265-iNTENSO/__extracted/6.Underground.2019.HDR.2160p.WEBRip.x265-iNTENSO.mkv'
20-1-23 03:56:03.4|Trace|ProcessProvider|Setting environment variable 'radarr_deletedrelativepaths' to '6 Underground (2019) [WEBDL-2160p (x264 8bit)] {EAC3 5.1 [EN]} -AJP69.mkv'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_movie_title' to '6 Underground'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_movie_path' to '/mnt/user/Media/Movies/6 Underground (2019) [tt8106534]'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_download_id' to '3353D7F6C2E77CAE20A95BAB71E395158B4EAEC7'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_movie_imdbid' to 'tt8106534'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_eventtype' to 'Download'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_id' to '2341'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_deletedpaths' to '/mnt/user/Media/Movies/6 Underground (2019) [tt8106534]/6 Underground (2019) [WEBDL-2160p (x264 8bit)] {EAC3 5.1 [EN]} -AJP69.mkv'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_path' to '/mnt/user/Media/Movies/6 Underground (2019) [tt8106534]/6 Underground (2019) [WEBDL-2160p (x265 [HDR] 10bit)] {EAC3 5.1 [EN]} -iNTENSO.mkv'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_scenename' to '6.Underground.2019.HDR.2160p.WEBRip.x265-iNTENSO'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_sourcefolder' to '/mnt/user/Media/.Seeding/6.Underground.2019.HDR.2160p.WEBRip.x265-iNTENSO/__extracted'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_isupgrade' to 'True'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_movie_id' to '1302'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_releasegroup' to 'iNTENSO'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_movie_tmdbid' to '509967'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_relativepath' to '6 Underground (2019) [WEBDL-2160p (x265 [HDR] 10bit)] {EAC3 5.1 [EN]} -iNTENSO.mkv'
20-1-23 03:56:03.5|Trace|ProcessProvider|Setting environment variable 'radarr_moviefile_qualityversion' to '1'
20-1-23 03:56:03.5|Debug|bash|Starting /bin/bash /config/radarr_cleanup
20-1-23 03:56:03.9|Error|bash|/config/radarr_cleanup: line 4: syntax error near unexpected token `fi'
20-1-23 03:56:03.9|Error|bash|/config/radarr_cleanup: line 4: `fi'
20-1-23 03:56:03.9|Debug|CustomScript|Executed external script: /bin/bash - Status: 2
20-1-23 03:56:03.9|Debug|CustomScript|Script Output: 
23/01/2020 02:56:03 - Error - /config/radarr_cleanup: line 4: syntax error near unexpected token `fi'
23/01/2020 02:56:03 - Error - /config/radarr_cleanup: line 4: `fi'
20-1-23 03:56:03.9|Trace|EventAggregator|MovieDownloadedEvent <- NotificationService
20-1-23 03:56:03.9|Trace|EventAggregator|MovieDownloadedEvent -> MovieCutoffModule
20-1-23 03:56:03.9|Trace|EventAggregator|MovieDownloadedEvent <- MovieCutoffModule
20-1-23 03:56:03.9|Trace|EventAggregator|MovieDownloadedEvent -> MovieMissingModule
20-1-23 03:56:03.9|Trace|EventAggregator|MovieDownloadedEvent <- MovieMissingModule

I also noticed when the extractor runs on a big file it can take a couple of minutes for the file to be completely extracted, and if the radarr/sonarr import runs during the extraction process it will import the incomplete file and do nothing when the extraction finishes.

jkaberg commented 4 years ago

Are the cleanup scripts executable?

MammothJerk commented 4 years ago

Are the cleanup scripts executable?

yep

root@Mammoth:/mnt/user/appdata/binhex-radarr# ls -la radarr_cleanup
-rwxrwxrwx 1 MammothJerk users 184 Jan 17 03:49 radarr_cleanup*
root@Mammoth:/mnt/user/appdata/binhex-sonarr# ls -la sonarr_cleanup
-rwxrwxrwx 1 MammothJerk users 190 Jan 18 15:24 sonarr_cleanup*
jkaberg commented 4 years ago

Are the file endings CRLF or LF? aka did you save/create the files on Windows and then moved them to a Linux machine?

Also you don't need to specify /bin/bash as the files have shebangs.

MammothJerk commented 4 years ago

Im not quite sure what these file endings are that you are talking about. I did create the text files through windows and then i removed the extension and moved them to their current folder on my unraid array, and then finally made them executable. I can recreate the scripts through the unraid terminal if you think that will fix it?

I didn't think it did, but it was given as one possible solution while i was googling around so i thought i might as well try it.


i changed the method of creating the script to go through the terminal instead, this changed the owner and group of the file to root, i'll give it a try and see if it works.

jkaberg commented 4 years ago

Make sure you change owner/group to whatever Radarr/Sonarr is running as.

More info about CRLF and LF. This does matter.

MammothJerk commented 4 years ago

It is set to LF after creating the scripts through the unraid terminal, i'm assuming that's what i want


any thoughts on this btw?

I also noticed when the extractor runs on a big file it can take a couple of minutes for the file to be completely extracted, and if the radarr/sonarr import runs during the extraction process it will import the incomplete file and do nothing when the extraction finishes.

jkaberg commented 4 years ago

Are you using the linking functionality in Radarr/Sonarr? That should mitigate it somewhat. I myself haven't had any trouble with the extraction process takeing a while, so you might have better luck on the community forums.

MammothJerk commented 4 years ago

yes i'm using hardlinking in sonarr/radarr, this only happens on big files (think 10GB+) since radarr scans the torrent client every minute.

i suppose i could change that to only scan the client every 5 minutes, but that would still give me the problem sometimes if say the torrent finished at 4:30 in the cycle then it would still only have 30s to extract the file.

jkaberg commented 4 years ago

I got mine at 1 min polling intervalls, no issues. Don't really know how to help you on that one as its Sonarr/Radarr doing the moving/linking as soon as it see's something it likes.

MammothJerk commented 4 years ago

Maybe if the script moves it to a separate folder as it is extracting and then moves it to the correct folder when it completes the extract? not sure if that would work well with sonarr/radarr though.

You might just have a much better CPU than me so it extracts faster

jkaberg commented 4 years ago

Try that, let me know how it goes.