ghostserverd / mediaserver-docker

Docker compose for comprehensive autonomous media server
253 stars 42 forks source link

Sonarr Moving Completed Downloads to 'Unsorted' Directory Instead of TV Shows #5

Closed iamon13 closed 4 years ago

iamon13 commented 4 years ago

Hi there! First of all, thanks for the great write-up! I'm currently trying to set this up on my server, and I'm having some trouble with Sonarr/Filebot not moving completed TV shows to the TV Shows directory I set up in my .env file. In my .env file, I updated the directories section as follows:

CONFIG_DIR=/home/user_name/mediaserver-docker/config
DOWNLOAD_DIR=/mnt/data/downloads
MEDIA_DIR=/mnt/data/media
TV_DIR=/mnt/data/media/TV Shows
MOVIES_DIR=/mnt/data/media/Movies

With this directory setup, and following the convention of having the path in Sonarr set to /data/completed/tv, Sonarr and/or Filebot is unable to move the downloaded media from the 'complete' downloads directory to the 'TV Shows' directory specified in my .env file. Instead, a new directory in media is created called 'Unsorted', and the downloaded show is copied to this directory. The strange thing is that this is not an issue with Radarr, and movies are successfully populating on complete download to the MOVIES_DIR on completion of the download with the same configuration (/data/completed/movies). Any idea what issue I might be having here?

ghostserverd commented 4 years ago

Filebot will put files in that Unsorted folder if it fails to find metadata for them.

You should check in /<config_dir>/filebot/amc.log which should have a log from filebot as to why it was unable to name them properly. My hunch is that they're ending up there because filebot was unable to talk to thetvdb. I've been having problems with thetvdb recently as well, and others have too, as reported on the forums https://www.filebot.net/forums/viewtopic.php?f=11&t=11560

Filebot version 4.9 is supposed to have the ability to choose to use themoveidb instead of thetvdb even for TV shows, which I have found to be much more reliable. However, the last time I tried the 4.9 beta, it was too unstable. I did build a container version for it though if you want to try it out. It's tag 4.9.x. Maybe it will work for you.

To force 4.9.x to use themoviedb, you can set an environment variable for the container FILEBOT_SERIES_DB to TheMovieDB::TV which will be passed down to amc to override the database for TV shows.

iamon13 commented 4 years ago

I appreciate the response! I checked that file, and sure enough, I am seeing some errors with shows. They look like they may be different errors, though, compared to the errors reported in the forum you linked. If I'm reading the error correctly, it seems to actually be a problem with a missing end-tag for the \<hr> HTML element.

I'll include a copy of the amc.log with the error I am seeing. amc.log

iamon13 commented 4 years ago

An update:

I was able to successfully use Filebot 4.9.x and force it to use TheMovieDB instead for TV. Of note, I had to buy a Filebot license from the Filebot website in order to get this to work. I chose the one year universal license for $6, which I felt was a fair value to support the developer. I had to make one change in my .env file and two changes to the docker compose file in order to get Filebot to use TheMovieDB instead.

In the .env file, I added: FILEBOT_SERIES_DB=TheMovieDB::TV in the Filebot section.

In the docker compose file, I added: FILEBOT_SERIES_DB=${FILEBOT_SERIES_DB} and FILEBOT_LICENSE=${CONFIG_DIR}/filebot/config/Filebot_License_num.psm in the environment section of the Filebot container to specify to use TheMovieDB for TV shows and to activate the license for Filebot.

Thanks again for the help!

ghostserverd commented 4 years ago

Hey, glad you got it working with 4.9.x. I was looking into it today, and found this https://www.filebot.net/forums/viewtopic.php?f=8&t=11248&sid=e7c73907168d886b748303e307ebb35c

Looks like thetvdb broke backwards compatibility with their XML API, so 4.7.9 won't work for anyone anymore which is unfortunate, especially since that's what's latest on my container. I think I see a way to fix it in the amc script, but I'll need to find the old version of that script to package it with 4.7.9 since I'm pretty sure the latest amc script isn't compatible anymore.