nandyalu / trailarr

Trailarr is a Docker application to download and manage trailers for your Radarr and Sonarr libraries.
GNU General Public License v3.0
111 stars 7 forks source link

[Bug] Failed to move trailer to folder: [Errno 13] Permission denied #28

Closed rbrowning85 closed 2 months ago

rbrowning85 commented 2 months ago

Describe the bug I get the following errors when I try to download trailers. The first example is when I set my Radarr connection to "missing" and let Trailarr search for the missing trailers on its own. I continue to get the same error set for every movie in my collection. I have no way to stop the script from running.

The second error example is when I try to download a single trailer file using the download button.

In both cases the problem appears to be related to a permission error.

Error Example 1 2024-08-26T22:15:20-0400 [INFO|trailer|L234]: TrailersDownloader: Downloading trailer for '[283]PAW Patrol: The Mighty Movie'... INFO: 127.0.0.1:49948 - "GET /status HTTP/1.1" 200 OK INFO: 127.0.0.1:36206 - "GET /status HTTP/1.1" 200 OK 2024-08-26T22:16:18-0400 [ERROR|trailer|L143]: TrailersDownloader: Failed to move trailer to folder: [Errno 13] Permission denied: '/media/PAW Patrol The Mighty Movie (2023)' 2024-08-26T22:16:18-0400 [INFO|trailer|L242]: TrailersDownloader: Trailer download failed for '[283]PAW Patrol: The Mighty Movie' 2024-08-26T22:16:18-0400 [INFO|trailer|L234]: TrailersDownloader: Downloading trailer for '[284]Untitled third PAW Patrol film'... INFO: 127.0.0.1:43596 - "GET /status HTTP/1.1" 200 OK INFO: 127.0.0.1:48392 - "GET /status HTTP/1.1" 200 OK INFO: 127.0.0.1:49192 - "GET /status HTTP/1.1" 200 OK 2024-08-26T22:17:58-0400 [ERROR|trailer|L143]: TrailersDownloader: Failed to move trailer to folder: [Errno 13] Permission denied: '/media/Untitled third PAW Patrol film ()' 2024-08-26T22:17:58-0400 [INFO|trailer|L242]: TrailersDownloader: Trailer download failed for '[284]Untitled third PAW Patrol film'

Error Example 2 2024-08-26T22:25:43-0400 [INFO|movies|L088]: Downloading trailer for movie with ID: 399 from [qiuSBWVdgLI] 2024-08-26T22:25:43-0400 [INFO|download_trailers|L122]: TrailerDownloadTasks: Downloading trailer for movie ID: 399 2024-08-26T22:25:43-0400 [INFO|base|L895]: Added job "Download Trailer for Oppenheimer" to job store "default" 2024-08-26T22:25:43-0400 [INFO|download_trailers|L162]: TrailerDownloadTasks: Trailer download started in background for movie: 'Oppenheimer' (ID: 399) from [qiuSBWVdgLI] INFO: 172.17.0.1:55481 - "POST /api/v1/movies/399/download?yt_id=qiuSBWVdgLI HTTP/1.1" 200 OK 2024-08-26T22:25:44-0400 [INFO|base|L641]: Removed job download_trailer_by_id_399_True 2024-08-26T22:25:44-0400 [INFO|base|L123]: Running job "Download Trailer for Oppenheimer (trigger: date[2024-08-26 22:25:44 EDT], next run at: 2024-08-26 22:25:44 EDT)" (scheduled at 2024-08-26 22:25:44.462937-04:00) 2024-08-26T22:25:44-0400 [INFO|trailer|L222]: TrailersDownloader: Downloading trailers for 1 monitored movies... 2024-08-26T22:25:44-0400 [INFO|trailer|L234]: TrailersDownloader: Downloading trailer for '[399]Oppenheimer'... INFO: 172.17.0.1:55481 - "GET /api/v1/movies/399 HTTP/1.1" 200 OK INFO: 172.17.0.1:55479 - "GET /api/v1/movies/399/files HTTP/1.1" 200 OK INFO: 127.0.0.1:42896 - "GET /status HTTP/1.1" 200 OK INFO: 127.0.0.1:60148 - "GET /status HTTP/1.1" 200 OK INFO: 127.0.0.1:37286 - "GET /status HTTP/1.1" 200 OK ERROR: TrailersDownloader: Failed to move trailer to folder: [Errno 13] Permission denied: '/media/Oppenheimer (2023)' 2024-08-26T22:27:10-0400 [ERROR|trailer|L143]: TrailersDownloader: Failed to move trailer to folder: [Errno 13] Permission denied: '/media/Oppenheimer (2023)' 2024-08-26T22:27:10-0400 [INFO|trailer|L242]: TrailersDownloader: Trailer download failed for '[399]Oppenheimer' 2024-08-26T22:27:10-0400 [INFO|trailer|L244]: TrailersDownloader: Downloaded trailers for 0 movies 2024-08-26T22:27:10-0400 [INFO|download_trailers|L098]: TrailerDownloadTasks: No trailers downloaded 2024-08-26T22:27:10-0400 [INFO|base|L144]: Job "Download Trailer for Oppenheimer (trigger: date[2024-08-26 22:25:44 EDT], next run at: 2024-08-26 22:25:44 EDT)" executed successfully

Jdiesel87 commented 2 months ago

Are your paths in Trailarr and Radarr exactly the same? Can you share your docker configs?

You can also check by going into a movie in Trailarr so see if the folder and files are being identified. If the movie doesn't show the folder and folder contents then you probably have a path discrepancy.

Screenshot 2024-08-26 9 41 02 PM

rbrowning85 commented 2 months ago

I understand now. You are correct it is a path discrepancy. However, the path to my movie folder in Radarr is mapped to /media and the path to my series folder in Sonarr is also mapped to /media. Unfortunately, Trailarr doesnt allow me to have Radarr and Sonarr mapped to the same /media path.

Radarr /mnt/user/Movies : /media Sonarr /mnt/user/Series : /media

I assume I will have to add the path mapping inside of the app?

Jdiesel87 commented 2 months ago

Screenshot_20240827-101626 Screenshot_20240827-101655 Screenshot_20240827-101713

Here is how my paths are setup. As long as Trailarr sees the full path the same as Sonarr and Radarr it should work. I use a single path for the Trailarr Docker. You can remove one of the default paths.

nandyalu commented 2 months ago

I understand now. You are correct it is a path discrepancy. However, the path to my movie folder in Radarr is mapped to /media and the path to my series folder in Sonarr is also mapped to /media. Unfortunately, Trailarr doesnt allow me to have Radarr and Sonarr mapped to the same /media path.

Radarr /mnt/user/Movies : /media Sonarr /mnt/user/Series : /media

I assume I will have to add the path mapping inside of the app?

You need path mappings for this to work properly. What you can do is leave Radarr as is, map Sonarr media to /media_tv. Your volume mapping would look like this:

/mnt/user/Movies:/media
/mnt/user/Series:/media_tv

Now open the app in browser, go into Settings > Connections, edit Sonarr connection, and add a path mapping like:

Path From: /media
Path To: /media_tv

image

Now go to Tasks and click the play button on Arr Data Refresh task to run it, wait for it to finish and open any movie and series items to check if you can see the actual files listed in there.

rbrowning85 commented 2 months ago

I understand now. You are correct it is a path discrepancy. However, the path to my movie folder in Radarr is mapped to /media and the path to my series folder in Sonarr is also mapped to /media. Unfortunately, Trailarr doesnt allow me to have Radarr and Sonarr mapped to the same /media path. Radarr /mnt/user/Movies : /media Sonarr /mnt/user/Series : /media I assume I will have to add the path mapping inside of the app?

You need path mappings for this to work properly. What you can do is leave Radarr as is, map Sonarr media to /media_tv. Your volume mapping would look like this:

/mnt/user/Movies:/media
/mnt/user/Series:/media_tv

Now open the app in browser, go into Settings > Connections, edit Sonarr connection, and add a path mapping like:

Path From: /media
Path To: /media_tv

image

Now go to Tasks and click the play button on Arr Data Refresh task to run it, wait for it to finish and open any movie and series items to check if you can see the actual files listed in there.

This method worked perfectly for me. Everything appears to be working correctly now. Thank you so much! I am loving this app.

nandyalu commented 2 months ago

Glad it worked!