@@ -190,13 +190,13 @@ impl TmdbService {
190
190
191
191
async fn save_all_images (
192
192
& self ,
193
- typ : & str ,
193
+ type_ : & str ,
194
194
identifier : & str ,
195
195
images : & mut Vec < String > ,
196
196
) -> Result < ( ) > {
197
197
let mut rsp = self
198
198
. client
199
- . get ( format ! ( "{}/{}/images" , typ , identifier) )
199
+ . get ( format ! ( "{}/{}/images" , type_ , identifier) )
200
200
. await
201
201
. map_err ( |e| anyhow ! ( e) ) ?;
202
202
let new_images: TmdbImagesResponse = rsp. body_json ( ) . await . map_err ( |e| anyhow ! ( e) ) ?;
@@ -225,10 +225,10 @@ impl TmdbService {
225
225
226
226
async fn get_all_suggestions (
227
227
& self ,
228
- typ : & str ,
228
+ type_ : & str ,
229
229
identifier : & str ,
230
230
) -> Result < Vec < PartialMetadataWithoutId > > {
231
- let lot = match typ {
231
+ let lot = match type_ {
232
232
"movie" => MediaLot :: Movie ,
233
233
"tv" => MediaLot :: Show ,
234
234
_ => unreachable ! ( ) ,
@@ -237,7 +237,7 @@ impl TmdbService {
237
237
for page in 1 .. {
238
238
let new_recs: TmdbListResponse = self
239
239
. client
240
- . get ( format ! ( "{}/{}/recommendations" , typ , identifier) )
240
+ . get ( format ! ( "{}/{}/recommendations" , type_ , identifier) )
241
241
. query ( & json ! ( { "page" : page } ) )
242
242
. unwrap ( )
243
243
. await
@@ -267,12 +267,12 @@ impl TmdbService {
267
267
268
268
async fn get_all_watch_providers (
269
269
& self ,
270
- typ : & str ,
270
+ type_ : & str ,
271
271
identifier : & str ,
272
272
) -> Result < Vec < WatchProvider > > {
273
273
let watch_providers_with_langs: TmdbWatchProviderResponse = self
274
274
. client
275
- . get ( format ! ( "{}/{}/watch/providers" , typ , identifier) )
275
+ . get ( format ! ( "{}/{}/watch/providers" , type_ , identifier) )
276
276
. query ( & json ! ( { "language" : self . language } ) )
277
277
. unwrap ( )
278
278
. await
@@ -329,7 +329,7 @@ impl TmdbService {
329
329
& self ,
330
330
identifier : & str ,
331
331
since : DateTimeUtc ,
332
- typ : & str ,
332
+ type_ : & str ,
333
333
) -> Result < bool > {
334
334
#[ derive( Debug , Serialize , Deserialize , Clone ) ]
335
335
struct TmdbChangesResponse {
@@ -339,7 +339,7 @@ impl TmdbService {
339
339
let start_date = since. date_naive ( ) ;
340
340
let changes = self
341
341
. client
342
- . get ( format ! ( "{}/{}/changes" , typ , identifier) )
342
+ . get ( format ! ( "{}/{}/changes" , type_ , identifier) )
343
343
. query ( & json ! ( {
344
344
"start_date" : start_date,
345
345
"end_date" : end_date,
@@ -394,7 +394,7 @@ impl MediaProvider for NonMediaTmdbService {
394
394
source_specifics : & Option < PersonSourceSpecifics > ,
395
395
display_nsfw : bool ,
396
396
) -> Result < SearchResults < PeopleSearchItem > > {
397
- let typ = match source_specifics {
397
+ let type_ = match source_specifics {
398
398
Some ( PersonSourceSpecifics {
399
399
is_tmdb_company : Some ( true ) ,
400
400
..
@@ -405,7 +405,7 @@ impl MediaProvider for NonMediaTmdbService {
405
405
let mut rsp = self
406
406
. base
407
407
. client
408
- . get ( format ! ( "search/{}" , typ ) )
408
+ . get ( format ! ( "search/{}" , type_ ) )
409
409
. query ( & json ! ( {
410
410
"query" : query. to_owned( ) ,
411
411
"page" : page,
@@ -445,7 +445,7 @@ impl MediaProvider for NonMediaTmdbService {
445
445
identity : & str ,
446
446
source_specifics : & Option < PersonSourceSpecifics > ,
447
447
) -> Result < MetadataPerson > {
448
- let typ = match source_specifics {
448
+ let type_ = match source_specifics {
449
449
Some ( PersonSourceSpecifics {
450
450
is_tmdb_company : Some ( true ) ,
451
451
..
@@ -455,7 +455,7 @@ impl MediaProvider for NonMediaTmdbService {
455
455
let details: TmdbNonMediaEntity = self
456
456
. base
457
457
. client
458
- . get ( format ! ( "{}/{}" , typ , identity) )
458
+ . get ( format ! ( "{}/{}" , type_ , identity) )
459
459
. query ( & json ! ( { "language" : self . base. language } ) )
460
460
. unwrap ( )
461
461
. await
@@ -465,7 +465,7 @@ impl MediaProvider for NonMediaTmdbService {
465
465
. map_err ( |e| anyhow ! ( e) ) ?;
466
466
let mut images = vec ! [ ] ;
467
467
self . base
468
- . save_all_images ( typ , identity, & mut images)
468
+ . save_all_images ( type_ , identity, & mut images)
469
469
. await ?;
470
470
let images = images
471
471
. into_iter ( )
@@ -474,11 +474,11 @@ impl MediaProvider for NonMediaTmdbService {
474
474
. collect ( ) ;
475
475
let description = details. description . or ( details. biography ) ;
476
476
let mut related = vec ! [ ] ;
477
- if typ == "person" {
477
+ if type_ == "person" {
478
478
let cred_det: TmdbCreditsResponse = self
479
479
. base
480
480
. client
481
- . get ( format ! ( "{}/{}/combined_credits" , typ , identity) )
481
+ . get ( format ! ( "{}/{}/combined_credits" , type_ , identity) )
482
482
. query ( & json ! ( { "language" : self . base. language } ) )
483
483
. unwrap ( )
484
484
. await
0 commit comments