Improve model

This commit is contained in:
2025-05-07 20:22:05 -06:00
parent 492f054e23
commit 62e933448c
16 changed files with 32 additions and 36 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "flix-tmdb"
version = "0.0.3"
version = "0.0.4"
categories = []
description = "Clients and models for fetching data from TMDB"
+2 -2
View File
@@ -22,8 +22,8 @@ impl Client {
pub async fn get_details(
&self,
id: impl Into<ShowId>,
season: impl Into<i32>,
episode: impl Into<i32>,
season: impl Into<u32>,
episode: impl Into<u32>,
language: Option<&str>,
) -> Result<Episode, Error> {
Ok(self
+1 -1
View File
@@ -22,7 +22,7 @@ impl Client {
pub async fn get_details(
&self,
id: impl Into<ShowId>,
season: impl Into<i32>,
season: impl Into<u32>,
language: Option<&str>,
) -> Result<Season, Error> {
Ok(self
+1 -1
View File
@@ -4,7 +4,7 @@ use chrono::NaiveDate;
#[derive(Debug, Clone, serde::Deserialize)]
pub struct Episode {
/// The episode's number
pub episode_number: i32,
pub episode_number: u32,
/// The episode's name
pub name: String,
/// The episode's overview
+1 -1
View File
@@ -19,7 +19,7 @@ pub enum Movie {}
pub enum Show {}
/// The inner type of TmdbId
pub type Inner = i32;
pub type Inner = u32;
/// Wraps an ID from TMDB, the generic parameter is to enforce that
/// IDs for different types of media are not interchangeable
+1 -1
View File
@@ -6,7 +6,7 @@ use super::Episode;
#[derive(Debug, Clone, serde::Deserialize)]
pub struct Season {
/// The season's number
pub season_number: i32,
pub season_number: u32,
/// The season's name
pub name: String,
/// The season's overview
+1 -1
View File
@@ -18,7 +18,7 @@ pub struct Show {
/// The show's last air date
pub last_air_date: NaiveDate,
/// The number of seasons in this show
pub number_of_seasons: i32,
pub number_of_seasons: u32,
/// The show's status
pub status: ShowStatus,
}