aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ApiInteraction/BaseApiClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.ApiInteraction/BaseApiClient.cs')
-rw-r--r--MediaBrowser.ApiInteraction/BaseApiClient.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/MediaBrowser.ApiInteraction/BaseApiClient.cs b/MediaBrowser.ApiInteraction/BaseApiClient.cs
index 7952129cf..466869c76 100644
--- a/MediaBrowser.ApiInteraction/BaseApiClient.cs
+++ b/MediaBrowser.ApiInteraction/BaseApiClient.cs
@@ -12,7 +12,7 @@ namespace MediaBrowser.ApiInteraction
/// </summary>
public abstract class BaseApiClient : IDisposable
{
- public BaseApiClient()
+ protected BaseApiClient()
{
DataSerializer.Configure();
}
@@ -45,7 +45,7 @@ namespace MediaBrowser.ApiInteraction
{
get
{
- return ApiInteraction.SerializationFormats.Protobuf;
+ return SerializationFormats.Protobuf;
}
}
@@ -299,10 +299,10 @@ namespace MediaBrowser.ApiInteraction
/// <param name="maxWidth">Use if a max width is required. Aspect ratio will be preserved.</param>
/// <param name="maxHeight">Use if a max height is required. Aspect ratio will be preserved.</param>
/// <param name="quality">Quality level, from 0-100. Currently only applies to JPG. The default value should suffice.</param>
- public string[] GetBackdropImageUrls(DTOBaseItem item, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null)
+ public string[] GetBackdropImageUrls(DtoBaseItem item, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null)
{
- Guid? backdropItemId = null;
- int backdropCount = 0;
+ Guid? backdropItemId;
+ int backdropCount;
if (item.BackdropCount == 0)
{
@@ -320,7 +320,7 @@ namespace MediaBrowser.ApiInteraction
return new string[] { };
}
- string[] files = new string[backdropCount];
+ var files = new string[backdropCount];
for (int i = 0; i < backdropCount; i++)
{
@@ -339,7 +339,7 @@ namespace MediaBrowser.ApiInteraction
/// <param name="maxWidth">Use if a max width is required. Aspect ratio will be preserved.</param>
/// <param name="maxHeight">Use if a max height is required. Aspect ratio will be preserved.</param>
/// <param name="quality">Quality level, from 0-100. Currently only applies to JPG. The default value should suffice.</param>
- public string GetLogoImageUrl(DTOBaseItem item, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null)
+ public string GetLogoImageUrl(DtoBaseItem item, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null)
{
Guid? logoItemId = item.HasLogo ? item.Id : item.ParentLogoItemId;
@@ -360,9 +360,9 @@ namespace MediaBrowser.ApiInteraction
/// <param name="maxAudioSampleRate">The maximum sample rate that the device can play. This should generally be omitted. The server will default this to 44100, so only override if a different max is needed.</param>
public string GetAudioStreamUrl(Guid itemId, IEnumerable<AudioOutputFormats> supportedOutputFormats, int? maxAudioChannels = null, int? maxAudioSampleRate = null)
{
- string url = ApiUrl + "/audio";
+ string url = ApiUrl + "/audio?id=" + itemId;
- url += "?outputformats=" + string.Join(",", supportedOutputFormats.Select(s => s.ToString()).ToArray());
+ url += "&outputformats=" + string.Join(",", supportedOutputFormats.Select(s => s.ToString()).ToArray());
if (maxAudioChannels.HasValue)
{
@@ -397,9 +397,9 @@ namespace MediaBrowser.ApiInteraction
int? maxWidth = null,
int? maxHeight = null)
{
- string url = ApiUrl + "/video";
+ string url = ApiUrl + "/video?id=" + itemId;
- url += "?outputformats=" + string.Join(",", supportedOutputFormats.Select(s => s.ToString()).ToArray());
+ url += "&outputformats=" + string.Join(",", supportedOutputFormats.Select(s => s.ToString()).ToArray());
if (maxAudioChannels.HasValue)
{