Browse Source

use trakt user slug for proper url generation (#1859)

pull/1861/head
Jason Dove 1 year ago committed by GitHub
parent
commit
b4c168e85e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 2
      ErsatzTV.Infrastructure/Trakt/Models/TraktUser.cs
  3. 5
      ErsatzTV.Infrastructure/Trakt/TraktApiClient.cs

2
CHANGELOG.md

@ -58,6 +58,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Previously, this deco item would be ignored so watermark and filler would be missing - Previously, this deco item would be ignored so watermark and filler would be missing
- Fix movies with missing medata by generating fallback metadata - Fix movies with missing medata by generating fallback metadata
- This allows these movies to appear in the Trash where they can be deleted - This allows these movies to appear in the Trash where they can be deleted
- Fix synchronizing trakt lists from users with special characters in their username
- Note that these lists MUST be added as URLs; the short-form `user/list` will NOT work with special characters
### Changed ### Changed
- Remove some unnecessary API calls related to media server scanning and paging - Remove some unnecessary API calls related to media server scanning and paging

2
ErsatzTV.Infrastructure/Trakt/Models/TraktUser.cs

@ -3,4 +3,6 @@
public class TraktUser public class TraktUser
{ {
public string Username { get; set; } public string Username { get; set; }
public TraktListIds Ids { get; set; }
} }

5
ErsatzTV.Infrastructure/Trakt/TraktApiClient.cs

@ -38,7 +38,10 @@ public class TraktApiClient : ITraktApiClient
return new TraktList return new TraktList
{ {
TraktId = response.Ids.Trakt, TraktId = response.Ids.Trakt,
User = response.User.Username,
// slug must be used here for proper URL generation
User = response.User.Ids.Slug,
List = response.Ids.Slug, List = response.Ids.Slug,
Name = response.Name, Name = response.Name,
Description = response.Description, Description = response.Description,

Loading…
Cancel
Save