diff options
| author | Tim Eisele <Ghost_of_Stone@web.de> | 2025-06-12 01:31:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-11 17:31:14 -0600 |
| commit | c22f24319bdfac814fc73fe61713a088b2b9f108 (patch) | |
| tree | ee94acbbce7c4bc4f994ece855638927cfd9523a /MediaBrowser.Providers | |
| parent | 1c4c9cf733ce84a2b7a70a186f4412198951a271 (diff) | |
Properly handle file access issues in some cases (#14272)
Diffstat (limited to 'MediaBrowser.Providers')
| -rw-r--r-- | MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs b/MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs index ff30af879..49ece22a9 100644 --- a/MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs +++ b/MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs @@ -94,7 +94,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb if (!string.IsNullOrWhiteSpace(result.strArtist)) { - item.AlbumArtists = new string[] { result.strArtist }; + item.AlbumArtists = [result.strArtist]; } if (!string.IsNullOrEmpty(result.intYearReleased)) @@ -104,7 +104,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb if (!string.IsNullOrEmpty(result.strGenre)) { - item.Genres = new[] { result.strGenre }; + item.Genres = [result.strGenre]; } item.SetProviderId(MetadataProvider.AudioDbArtist, result.idArtist); @@ -170,6 +170,11 @@ namespace MediaBrowser.Providers.Plugins.AudioDb var url = AudioDbArtistProvider.BaseUrl + "/album-mb.php?i=" + musicBrainzReleaseGroupId; var path = GetAlbumInfoPath(_config.ApplicationPaths, musicBrainzReleaseGroupId); + var fileInfo = _fileSystem.GetFileSystemInfo(path); + if (fileInfo.Exists && (DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 2) + { + return; + } Directory.CreateDirectory(Path.GetDirectoryName(path)); |
