From 9e6de7e2eb86811f3c3a021df7175e2b8ca47065 Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Wed, 31 Mar 2021 16:30:30 -0500 Subject: [PATCH] use proper type for plex timestamps (#124) --- .../Plex/Models/PlexMetadataResponse.cs | 7 ++++--- ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ErsatzTV.Infrastructure/Plex/Models/PlexMetadataResponse.cs b/ErsatzTV.Infrastructure/Plex/Models/PlexMetadataResponse.cs index ca2858687..a61a89352 100644 --- a/ErsatzTV.Infrastructure/Plex/Models/PlexMetadataResponse.cs +++ b/ErsatzTV.Infrastructure/Plex/Models/PlexMetadataResponse.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace ErsatzTV.Infrastructure.Plex.Models { @@ -12,8 +13,8 @@ namespace ErsatzTV.Infrastructure.Plex.Models public string Thumb { get; set; } public string Art { get; set; } public string OriginallyAvailableAt { get; set; } - public int AddedAt { get; set; } - public int UpdatedAt { get; set; } + public long AddedAt { get; set; } + public long UpdatedAt { get; set; } public int Index { get; set; } public string Studio { get; set; } public List Media { get; set; } diff --git a/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs b/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs index f5d7245f2..7c692c887 100644 --- a/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs +++ b/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs @@ -38,7 +38,7 @@ namespace ErsatzTV.Infrastructure.Plex } catch (Exception ex) { - return BaseError.New(ex.Message); + return BaseError.New(ex.ToString()); } } @@ -56,7 +56,7 @@ namespace ErsatzTV.Infrastructure.Plex } catch (Exception ex) { - return BaseError.New(ex.Message); + return BaseError.New(ex.ToString()); } } @@ -74,7 +74,7 @@ namespace ErsatzTV.Infrastructure.Plex } catch (Exception ex) { - return BaseError.New(ex.Message); + return BaseError.New(ex.ToString()); } } @@ -93,7 +93,7 @@ namespace ErsatzTV.Infrastructure.Plex } catch (Exception ex) { - return BaseError.New(ex.Message); + return BaseError.New(ex.ToString()); } } @@ -112,7 +112,7 @@ namespace ErsatzTV.Infrastructure.Plex } catch (Exception ex) { - return BaseError.New(ex.Message); + return BaseError.New(ex.ToString()); } } @@ -133,7 +133,7 @@ namespace ErsatzTV.Infrastructure.Plex } catch (Exception ex) { - return BaseError.New(ex.Message); + return BaseError.New(ex.ToString()); } }