cache bust xmltv images (#1771)

This commit is contained in:
Jason Dove
2024-07-03 12:14:40 -05:00
committed by GitHub
parent 36e86587ef
commit b5d679212d
3 changed files with 9 additions and 3 deletions
+4
View File
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Items in these libraries will have tag metadata added from folders just like local Other Video libraries
- Thanks @raknam for adding this feature!
### Fixed
- Add basic cache busting to XMLTV image URLs
- This should help with clients not showing correct channel logos or posters
### Changed
- Remove some unnecessary API calls related to media server scanning and paging
@@ -36,10 +36,12 @@ public class GetChannelGuideHandler : IRequestHandler<GetChannelGuide, Either<Ba
return BaseError.New($"Required file {channelsFile} is missing");
}
string accessTokenUri = string.Empty;
long mtime = File.GetLastWriteTime(channelsFile).Ticks;
var accessTokenUri = $"?v={mtime}";
if (!string.IsNullOrWhiteSpace(request.AccessToken))
{
accessTokenUri = $"?access_token={request.AccessToken}";
accessTokenUri += $"&access_token={request.AccessToken}";
}
string channelsFragment = await File.ReadAllTextAsync(channelsFile, Encoding.UTF8, cancellationToken);
@@ -9,7 +9,7 @@ public class PlexMediaContainerResponse<T>
public class PlexMediaContainerDirectoryContent<T>
{
public List<T> Directory { get; set; }
public List<T> Directory { get; set; } = [];
}
public class PlexMediaContainerMetadataContent<T>