UNIT3D-Community-Edition icon indicating copy to clipboard operation
UNIT3D-Community-Edition copied to clipboard

[Bug] Director metadata wrong on torrents

Open therealbungus opened this issue 4 years ago • 4 comments

Describe the bug The director metadata is wrong on some torrents. It is pulling from a completely random page it seems like, as some torrents list the director as an actor who has also directed other movies, or is listing the director as someone who had nothing to do with the movie.

To Reproduce Steps to reproduce the behavior:

  1. Submit a torrent
  2. Look at director metadata next to the IMDB and TMDB IDs

Expected behavior Should show the correct director of the movie listed on the TMDB page

Screenshots chrome_2021-07-01_15-03-11 chrome_2021-07-01_15-10-56

UNIT3D (please complete the following information):

  • UNIT3D Version: v5.3.0-4
  • Laravel Version: 8.22.1
  • PHP Version: Cannot find
  • Database Driver & Version: Cannot find
  • Web Server Driver & Version: Cannot find
  • OS Driver and Version: Cannot find

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 91.0.4472.114

Additional context Some torrents don't show a director for the movie at all, and some show it as a completely random/wrong person

therealbungus avatar Jul 01 '21 20:07 therealbungus

Thank you for submitting your first issue. Please make sure it follows our Issue Template and you have provided all information.' first issue

github-actions[bot] avatar Jul 01 '21 20:07 github-actions[bot]

~~The issue is:~~ https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/f21e874d13370791639f74cf3346c910977b1246/resources/views/torrent/partials/movie_meta.blade.php#L72

~~It should be:~~

@php $director = $meta->crew->where('job' ,'=', 'Director')->sortBy('order')->first(); @endphp 

~~It would require a new DB entry, aswell additional TMDB Parsing.~~

~~I would do it, if I knew how to create DB entries.~~

Forget what I said. Seems to be a different system, which I so far don't understand.

Alkl58 avatar Jul 04 '21 12:07 Alkl58

will this error be fixed at some point?

kREATUr67 avatar Jul 31 '22 18:07 kREATUr67

Yes

HDVinnie avatar Aug 03 '22 13:08 HDVinnie

The linked PR unfortunately does not fix this issue (although it gets us partway there), for 2 reasons:

  1. This line should be changed to ->wherePivot('department', '=', 'Directing')->wherePivot('job', '=', 'Director'): https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/241476f784c3c9cae29b221abfc389437a54498e/resources/views/torrent/partials/movie_meta.blade.php#L52
  2. In cases like Vesper (movie with tmdb id 976720) where the director has multiple jobs (one in which they are not a director), the following data is returned from the api:
{
    "adult":false,
    "gender":2,
    "id":1158485,
    "known_for_department":"Writing",
    "name":"Bruno Samper",
    "original_name":"Bruno Samper",
    "popularity":2.267,
    "profile_path":null,
    "credit_id":"6282c345abf8e2009deb2f22",
    "department":"Directing",
    "job":"Director"
},
{
    "adult":false,
    "gender":2,
    "id":1158485,
    "known_for_department":"Writing",
    "name":"Bruno Samper",
    "original_name":"Bruno Samper",
    "popularity":2.267,
    "profile_path":null,
    "credit_id":"6282c33b982f740052075843",
    "department":"Writing",
    "job":"Writer"
},

The second entry overwrites the first entry causing the Director to not be saved: https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/241476f784c3c9cae29b221abfc389437a54498e/app/Jobs/ProcessMovieJob.php#L100-L105

Roardom avatar Jan 27 '23 03:01 Roardom

With the latest PR merged, technically, this issue is fixed. There will simply just be no director for incorrect cases instead of having the wrong person displayed.

Roardom avatar Feb 10 '23 14:02 Roardom