Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Trailarr downloading multiple trailers and not seeing trailers that do exist #61

Closed
geebru opened this issue Oct 11, 2024 · 6 comments · Fixed by #63
Closed

[Bug] Trailarr downloading multiple trailers and not seeing trailers that do exist #61

geebru opened this issue Oct 11, 2024 · 6 comments · Fixed by #63
Labels
bug Something isn't working

Comments

@geebru
Copy link

geebru commented Oct 11, 2024

Describe the bug

Trailarr was running for about 3 hours and it (seemingly) correctly downloaded trailers (a single {title}.trailer.mp4 for a lot of movies (over 100).

At some point, Trailarr began downloading duplicate trailers. I stopped the container after it did this for about 15 media files.

The only clue is that the App doesn't seem to "see" any of the work it's been doing. If I navigate to Home or Movies, only 4 movies are marked as having a trailer, despite me seeing Trailarr having added those hundred or more already today. Even in folders updated in this time span, showing a trailer.mp4 file, Trailarr still indicates they are "missing", despite a trailarr file being present.

I'm ignoring all the created image assets as I believe those are from Jellyfin seeing the new file as an actual "movie" and not just a trailer. That may be resolved by me updating Trailarr to use a folder instead of {title}.trailer.mp4 despite it claiming that is allowed.

Compose:

  trailarr:
    image: nandyalu/trailarr:latest
    container_name: trailarr
    environment:
      - TZ=America/New_York
      - PUID=99
      - PGID=100
      - APP_DATA_DIR=/config
    ports:
      - 7889:7889
    volumes:
      - /mnt/cache/appdata/trailarr:/config
      - /mnt/user/data:/data
    network_mode: bridge
    restart: unless-stopped

Steps To Reproduce
Steps to reproduce the behavior:

  1. Add Radarr connection.
  2. Set Radarr to fill in "Missing" trailers.
  3. Run the download job.
  4. Duplicates?

I know this isn't very helpful replication steps, but I set it up per the guides, and it's "working" but it seems to be doing extra things on top of that.

Actual behavior
Trailers are being downloaded multiple times and image assets are being duplicated.

Expected behavior
A single {title}.trailer.mp4 should be downloaded.

Screenshots
These are the impacted films in case their titling gives any clues:
List of movies impacted by bug

Trailarr settings:
Trailarr settings

Trailarr Home missing all of the successful grabs:
Trailarr movies view

21 Jump Street media folder

21 Jump Street duplicate in Jellyfin

21 Jump Street duplicate is a trailer

21 Jump Street in Trailarr marked as missing despite trailers being in the files

App Information (please complete the following information):

  • Unraid 6.12.13
  • Trailarr v0.2.1-beta

Additional context
I started down this as I realized I had set up my app config wrong, and despite Trailarr originally downloading a lot of trailers for me, they were all in mnt/cache/appdata and not in the media folders. I remedied that issue, but I am having this new issue instead.

@geebru geebru added the bug Something isn't working label Oct 11, 2024
@nandyalu
Copy link
Owner

I checked the code and found out why it's doing that, Trailarr checks for a file with -trailer. in file name to mark trailer as available.
You have trailer file name set to {title}.trailer.{ext} so it won't match with -trailer. so not marking it as available.

I will update it to check for trailer removing the - in front and . at end.

If you want a temporary fix, update trailer file name to add a hyphen before trailer like {title}-trailer.{ext} and it should work.

That being said, any trailers already downloaded would have to be manually renamed for Trailarr to detect them as trailers.

Just curious, what media server are you using? Because Plex, Emby and Jellyfin all require trailer file name to end with -trailer to recognize it as a trailer.

@geebru
Copy link
Author

geebru commented Oct 11, 2024

Ah that would do it! Thanks for the quick find.

I'm using Jellyfin and per their current docs, they actually claim to support a few methods of naming - https://jellyfin.org/docs/general/server/media/movies/#file-suffix. Same for TV Shows as well.

Specific to trailers the list includes these as all valid:

  • -trailer
  • .trailer
  • _trailer
  • trailer

That said, it seems like Jellyfin didn't like that even though it's supported. When I go back in to this, I may check the Trailarr option to put them in a sub-folder as those don't seem to get double-metadata'd like the ones in the root folder do.

They also claim to support just trailer.mp4 but I figured keeping the movie name would be helpful in the future.

nandyalu added a commit that referenced this issue Oct 11, 2024
@nandyalu
Copy link
Owner

I use Plex and it requires -trailer in the file name before extension. And if a trailer file name is The Matrix - Trailer-trailer.mkv, it will display the trailer video title as The Matrix - Trailer.

@geebru
Copy link
Author

geebru commented Oct 11, 2024

In Jellyfin, clicking the "trailer" button typically takes you to YouTube but providing a local file (hence where I want Trailarr to come in) will open the local file instead if it exists/is named correctly. To be fair, with all the dupes above, they did work that way, it was just extra file bloat. It never really indicates if one is locally available or will take you to YouTube though.

Are there any concerns that removing the prefixed/suffixed characters from the search will impact movies with "Trailer" in their actual name?

@nandyalu
Copy link
Owner

Are there any concerns that removing the prefixed/suffixed characters from the search will impact movies with "Trailer" in their actual name?

I don't think so

@JohnnyPh
Copy link

Just adding info to the existing bug. If I restart the Trailarr container before the initial run finnish (on big library with thousands of movies and tvs) then the downloaded trailers will not count and Trailarr will make duplicate files with numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants