|
|
@ -272,6 +272,10 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|
|
|
return path;
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var url = GetOmdbUrl(
|
|
|
|
var url = GetOmdbUrl(
|
|
|
|
string.Format(
|
|
|
|
string.Format(
|
|
|
@ -280,8 +284,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|
|
|
imdbParam));
|
|
|
|
imdbParam));
|
|
|
|
|
|
|
|
|
|
|
|
var rootObject = await GetDeserializedOmdbResponse<RootObject>(_httpClientFactory.CreateClient(NamedClient.Default), url, cancellationToken).ConfigureAwait(false);
|
|
|
|
var rootObject = await GetDeserializedOmdbResponse<RootObject>(_httpClientFactory.CreateClient(NamedClient.Default), url, cancellationToken).ConfigureAwait(false);
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
|
|
|
await using FileStream jsonFileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None);
|
|
|
|
await using FileStream jsonFileStream = File.OpenWrite(path);
|
|
|
|
|
|
|
|
await JsonSerializer.SerializeAsync(jsonFileStream, rootObject, _jsonOptions, cancellationToken).ConfigureAwait(false);
|
|
|
|
await JsonSerializer.SerializeAsync(jsonFileStream, rootObject, _jsonOptions, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
|
|
return path;
|
|
|
|
return path;
|
|
|
@ -308,6 +311,10 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|
|
|
return path;
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var url = GetOmdbUrl(
|
|
|
|
var url = GetOmdbUrl(
|
|
|
|
string.Format(
|
|
|
|
string.Format(
|
|
|
@ -317,8 +324,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|
|
|
seasonId));
|
|
|
|
seasonId));
|
|
|
|
|
|
|
|
|
|
|
|
var rootObject = await GetDeserializedOmdbResponse<SeasonRootObject>(_httpClientFactory.CreateClient(NamedClient.Default), url, cancellationToken).ConfigureAwait(false);
|
|
|
|
var rootObject = await GetDeserializedOmdbResponse<SeasonRootObject>(_httpClientFactory.CreateClient(NamedClient.Default), url, cancellationToken).ConfigureAwait(false);
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
|
|
|
await using FileStream jsonFileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None);
|
|
|
|
await using FileStream jsonFileStream = File.OpenWrite(path);
|
|
|
|
|
|
|
|
await JsonSerializer.SerializeAsync(jsonFileStream, rootObject, _jsonOptions, cancellationToken).ConfigureAwait(false);
|
|
|
|
await JsonSerializer.SerializeAsync(jsonFileStream, rootObject, _jsonOptions, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
|
|
return path;
|
|
|
|
return path;
|
|
|
|