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

Fix radarr movie types. #72

Merged
merged 2 commits into from
Oct 11, 2022
Merged

Fix radarr movie types. #72

merged 2 commits into from
Oct 11, 2022

Conversation

davidnewhall
Copy link
Contributor

Adds a few missing fields, fixes ratings field in Movie type. Replaces AddMovieOutput with Movie and adds a proper output to UpdateMovie().

@davidnewhall davidnewhall requested a review from Fuochi October 8, 2022 08:16
}

// OpenRatings is a ratings type that has a source and type.
type OpenRatings map[string]Ratings
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the /api/v3/movie endpoint came this cool payload...

"ratings": {
    "imdb": {
      "votes": 16719,
      "value": 5.6,
      "type": "user"
    },
    "tmdb": {
      "votes": 566,
      "value": 7,
      "type": "user"
    },
    "metacritic": {
      "votes": 0,
      "value": 54,
      "type": "user"
    },
    "rottenTomatoes": {
      "votes": 0,
      "value": 69,
      "type": "user"
    }
  }

@@ -118,53 +123,17 @@ type AddMovieOptions struct {
SearchForMovie bool `json:"searchForMovie"`
}

// AddMovieOutput is the data returned when adding a movier.
type AddMovieOutput struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference between this and Movie was the AddOptions member. I went ahead and added that to Movie.

Comment on lines +55 to +56
Popularity float64 `json:"popularity"`
OriginalLanguage *starr.Value `json:"originalLanguage,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"originalFilePath": "Beast.2022.1080p.AMZN.WEBRip.DD5.1.X.264-EVO/Beast.2022.1080p.AMZN.WEBRip.DD5.1.X.264-EVO.mkv",
"popularity": 2240.269,

@@ -91,6 +95,7 @@ type MediaInfo struct {
VideoBitrate int `json:"videoBitrate"`
VideoCodec string `json:"videoCodec"`
VideoFps float64 `json:"videoFps"`
VideoDynamicRangeType string `json:"videoDynamicRangeType"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a blank string on the movie I looked at.

"videoDynamicRangeType": "",

VoteCount int `json:"voteCount"`
Language *starr.Value `json:"language"`
ID int `json:"id"`
MovieMetadataID int64 `json:"movieMetadataId"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  "alternateTitles": [
    {
      "sourceType": "tmdb",
      "movieMetadataId": 2671,
      "title": "Zvērs",
      "sourceId": 0,
      "votes": 0,
      "voteCount": 0,
      "language": {
        "id": 1,
        "name": "English"
      },
      "id": 18219
    },
    {
      "sourceType": "tmdb",
      "movieMetadataId": 2671,
      "title": "La Bestia",
      "sourceId": 0,
      "votes": 0,
      "voteCount": 0,
      "language": {
        "id": 3,
        "name": "Spanish"
      },
      "id": 18220
    },
    {
      "sourceType": "tmdb",
      "movieMetadataId": 2671,
      "title": "جانور",
      "sourceId": 0,
      "votes": 0,
      "voteCount": 0,
      "language": {
        "id": 1,
        "name": "English"
      },
      "id": 18221
    },
    {
      "sourceType": "tmdb",
      "movieMetadataId": 2671,
      "title": "Žvėris",
      "sourceId": 0,
      "votes": 0,
      "voteCount": 0,
      "language": {
        "id": 24,
        "name": "Lithuanian"
      },
      "id": 18330
    }

@davidnewhall davidnewhall merged commit 6940715 into master Oct 11, 2022
@davidnewhall davidnewhall deleted the dn2_movie_fixes branch October 11, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants