aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-28 20:49:25 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-28 20:49:25 -0400
commit7e636a977a47f67af9bebfcbb6ebc89035ad91bd (patch)
tree72b83f72074bab12a93ace98f63e6f545c81e4c2
parentd2494148f78d258ea59809c3b296234bdc64d73a (diff)
fixes #903 - Display image info on web client detail page
-rw-r--r--MediaBrowser.Controller/Entities/Audio/Audio.cs30
-rw-r--r--MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs27
-rw-r--r--MediaBrowser.Controller/Entities/Photo.cs4
-rw-r--r--MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj6
-rw-r--r--MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj6
-rw-r--r--MediaBrowser.Model/ApiClient/IApiClient.cs24
-rw-r--r--MediaBrowser.Model/Dlna/AudioOptions.cs9
-rw-r--r--MediaBrowser.Model/Drawing/ImageOrientation.cs1
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs14
-rw-r--r--MediaBrowser.Model/Dto/StreamOptions.cs64
-rw-r--r--MediaBrowser.Model/Dto/VideoStreamOptions.cs99
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj2
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs9
-rw-r--r--MediaBrowser.Providers/Music/AlbumMetadataService.cs16
-rw-r--r--MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs5
-rw-r--r--MediaBrowser.Providers/Music/Extensions.cs10
-rw-r--r--MediaBrowser.Providers/Photos/PhotoProvider.cs31
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs22
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Server/server.json8
-rw-r--r--Nuget/MediaBrowser.Common.Internal.nuspec4
-rw-r--r--Nuget/MediaBrowser.Common.nuspec2
-rw-r--r--Nuget/MediaBrowser.Model.Signed.nuspec2
-rw-r--r--Nuget/MediaBrowser.Server.Core.nuspec4
23 files changed, 105 insertions, 294 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index 7d54e012c..3ffdf744d 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -34,6 +34,7 @@ namespace MediaBrowser.Controller.Entities.Audio
public Audio()
{
Artists = new List<string>();
+ AlbumArtists = new List<string>();
Tags = new List<string>();
}
@@ -90,12 +91,14 @@ namespace MediaBrowser.Controller.Entities.Audio
/// <value>The artist.</value>
public List<string> Artists { get; set; }
+ public List<string> AlbumArtists { get; set; }
+
[IgnoreDataMember]
public List<string> AllArtists
{
get
{
- var list = AlbumArtists;
+ var list = AlbumArtists.ToList();
list.AddRange(Artists);
@@ -104,36 +107,11 @@ namespace MediaBrowser.Controller.Entities.Audio
}
}
- [IgnoreDataMember]
- public List<string> AlbumArtists
- {
- get
- {
- var list = new List<string>();
-
- if (!string.IsNullOrEmpty(AlbumArtist))
- {
- list.Add(AlbumArtist);
- }
-
- return list;
- }
- set
- {
- AlbumArtist = value.FirstOrDefault();
- }
- }
-
/// <summary>
/// Gets or sets the album.
/// </summary>
/// <value>The album.</value>
public string Album { get; set; }
- /// <summary>
- /// Gets or sets the album artist.
- /// </summary>
- /// <value>The album artist.</value>
- public string AlbumArtist { get; set; }
/// <summary>
/// Gets the type of the media.
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
index 152d76782..82cd618dd 100644
--- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
+++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
@@ -17,8 +17,9 @@ namespace MediaBrowser.Controller.Entities.Audio
public MusicAlbum()
{
- Artists = new List<string>();
SoundtrackIds = new List<Guid>();
+ Artists = new List<string>();
+ AlbumArtists = new List<string>();
}
public override bool SupportsAddingToPlaylist
@@ -40,7 +41,7 @@ namespace MediaBrowser.Controller.Entities.Audio
{
get
{
- var list = AlbumArtists;
+ var list = AlbumArtists.ToList();
list.AddRange(Artists);
@@ -49,25 +50,7 @@ namespace MediaBrowser.Controller.Entities.Audio
}
}
- [IgnoreDataMember]
- public List<string> AlbumArtists
- {
- get
- {
- var list = new List<string>();
-
- if (!string.IsNullOrEmpty(AlbumArtist))
- {
- list.Add(AlbumArtist);
- }
-
- return list;
- }
- set
- {
- AlbumArtist = value.FirstOrDefault();
- }
- }
+ public List<string> AlbumArtists { get; set; }
/// <summary>
/// Gets the tracks.
@@ -139,8 +122,6 @@ namespace MediaBrowser.Controller.Entities.Audio
return AllArtists.Contains(artist, StringComparer.OrdinalIgnoreCase);
}
- public string AlbumArtist { get; set; }
-
public List<string> Artists { get; set; }
/// <summary>
diff --git a/MediaBrowser.Controller/Entities/Photo.cs b/MediaBrowser.Controller/Entities/Photo.cs
index 542fbaa31..aa9e63791 100644
--- a/MediaBrowser.Controller/Entities/Photo.cs
+++ b/MediaBrowser.Controller/Entities/Photo.cs
@@ -24,14 +24,12 @@ namespace MediaBrowser.Controller.Entities
public int? Width { get; set; }
public int? Height { get; set; }
- public string CameraManufacturer { get; set; }
+ public string CameraMake { get; set; }
public string CameraModel { get; set; }
public string Software { get; set; }
public double? ExposureTime { get; set; }
public double? FocalLength { get; set; }
-
public ImageOrientation? Orientation { get; set; }
-
public double? Aperture { get; set; }
public double? ShutterSpeed { get; set; }
}
diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
index aaa44b009..62f2a7425 100644
--- a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
+++ b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
@@ -341,9 +341,6 @@
<Compile Include="..\MediaBrowser.Model\Dto\RecommendationType.cs">
<Link>Dto\RecommendationType.cs</Link>
</Compile>
- <Compile Include="..\MediaBrowser.Model\Dto\StreamOptions.cs">
- <Link>Dto\StreamOptions.cs</Link>
- </Compile>
<Compile Include="..\MediaBrowser.Model\Dto\StudioDto.cs">
<Link>Dto\StudioDto.cs</Link>
</Compile>
@@ -356,9 +353,6 @@
<Compile Include="..\MediaBrowser.Model\Dto\UserItemDataDto.cs">
<Link>Dto\UserItemDataDto.cs</Link>
</Compile>
- <Compile Include="..\MediaBrowser.Model\Dto\VideoStreamOptions.cs">
- <Link>Dto\VideoStreamOptions.cs</Link>
- </Compile>
<Compile Include="..\MediaBrowser.Model\Entities\BaseItemInfo.cs">
<Link>Entities\BaseItemInfo.cs</Link>
</Compile>
diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
index 6046d3606..715331436 100644
--- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
+++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
@@ -304,9 +304,6 @@
<Compile Include="..\MediaBrowser.Model\Dto\RecommendationType.cs">
<Link>Dto\RecommendationType.cs</Link>
</Compile>
- <Compile Include="..\MediaBrowser.Model\Dto\StreamOptions.cs">
- <Link>Dto\StreamOptions.cs</Link>
- </Compile>
<Compile Include="..\MediaBrowser.Model\Dto\StudioDto.cs">
<Link>Dto\StudioDto.cs</Link>
</Compile>
@@ -319,9 +316,6 @@
<Compile Include="..\MediaBrowser.Model\Dto\UserItemDataDto.cs">
<Link>Dto\UserItemDataDto.cs</Link>
</Compile>
- <Compile Include="..\MediaBrowser.Model\Dto\VideoStreamOptions.cs">
- <Link>Dto\VideoStreamOptions.cs</Link>
- </Compile>
<Compile Include="..\MediaBrowser.Model\Entities\BaseItemInfo.cs">
<Link>Entities\BaseItemInfo.cs</Link>
</Compile>
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index 3aa9b73b9..a9d0f480c 100644
--- a/MediaBrowser.Model/ApiClient/IApiClient.cs
+++ b/MediaBrowser.Model/ApiClient/IApiClient.cs
@@ -62,30 +62,6 @@ namespace MediaBrowser.Model.ApiClient
where T : class;
/// <summary>
- /// Gets the url needed to stream an audio file
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">options</exception>
- string GetAudioStreamUrl(StreamOptions options);
-
- /// <summary>
- /// Gets the url needed to stream a video file
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">options</exception>
- string GetVideoStreamUrl(VideoStreamOptions options);
-
- /// <summary>
- /// Formulates a url for streaming video using the HLS protocol
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">options</exception>
- string GetHlsVideoStreamUrl(VideoStreamOptions options);
-
- /// <summary>
/// Reports the capabilities.
/// </summary>
/// <param name="capabilities">The capabilities.</param>
diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs
index 309b67543..dd6dad261 100644
--- a/MediaBrowser.Model/Dlna/AudioOptions.cs
+++ b/MediaBrowser.Model/Dlna/AudioOptions.cs
@@ -1,5 +1,5 @@
-using System.Collections.Generic;
-using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Dto;
+using System.Collections.Generic;
namespace MediaBrowser.Model.Dlna
{
@@ -8,6 +8,11 @@ namespace MediaBrowser.Model.Dlna
/// </summary>
public class AudioOptions
{
+ public AudioOptions()
+ {
+ Context = EncodingContext.Streaming;
+ }
+
public string ItemId { get; set; }
public List<MediaSourceInfo> MediaSources { get; set; }
public DeviceProfile Profile { get; set; }
diff --git a/MediaBrowser.Model/Drawing/ImageOrientation.cs b/MediaBrowser.Model/Drawing/ImageOrientation.cs
index 3fdfaf7bf..c320a8224 100644
--- a/MediaBrowser.Model/Drawing/ImageOrientation.cs
+++ b/MediaBrowser.Model/Drawing/ImageOrientation.cs
@@ -3,7 +3,6 @@ namespace MediaBrowser.Model.Drawing
{
public enum ImageOrientation
{
- None = 0,
TopLeft = 1,
TopRight = 2,
BottomRight = 3,
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 0dfd27a72..360d2d862 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.Drawing;
+using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Library;
using MediaBrowser.Model.Providers;
@@ -721,6 +722,17 @@ namespace MediaBrowser.Model.Dto
/// <value><c>true</c> if [enable internet providers]; otherwise, <c>false</c>.</value>
public bool? LockData { get; set; }
+ public int? Width { get; set; }
+ public int? Height { get; set; }
+ public string CameraMake { get; set; }
+ public string CameraModel { get; set; }
+ public string Software { get; set; }
+ public double? ExposureTime { get; set; }
+ public double? FocalLength { get; set; }
+ public ImageOrientation? ImageOrientation { get; set; }
+ public double? Aperture { get; set; }
+ public double? ShutterSpeed { get; set; }
+
/// <summary>
/// Gets a value indicating whether this instance can resume.
/// </summary>
diff --git a/MediaBrowser.Model/Dto/StreamOptions.cs b/MediaBrowser.Model/Dto/StreamOptions.cs
deleted file mode 100644
index 9cf301270..000000000
--- a/MediaBrowser.Model/Dto/StreamOptions.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-namespace MediaBrowser.Model.Dto
-{
- /// <summary>
- /// Class StreamOptions
- /// </summary>
- public class StreamOptions
- {
- /// <summary>
- /// Gets or sets the audio bit rate.
- /// </summary>
- /// <value>The audio bit rate.</value>
- public int? AudioBitRate { get; set; }
-
- /// <summary>
- /// Gets or sets the audio codec.
- /// Omit to copy the original stream
- /// </summary>
- /// <value>The audio encoding format.</value>
- public string AudioCodec { get; set; }
-
- /// <summary>
- /// Gets or sets the item id.
- /// </summary>
- /// <value>The item id.</value>
- public string ItemId { get; set; }
-
- /// <summary>
- /// Gets or sets the max audio channels.
- /// </summary>
- /// <value>The max audio channels.</value>
- public int? MaxAudioChannels { get; set; }
-
- /// <summary>
- /// Gets or sets the max audio sample rate.
- /// </summary>
- /// <value>The max audio sample rate.</value>
- public int? MaxAudioSampleRate { get; set; }
-
- /// <summary>
- /// Gets or sets the start time ticks.
- /// </summary>
- /// <value>The start time ticks.</value>
- public long? StartTimeTicks { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether the original media should be served statically
- /// Only used with progressive streaming
- /// </summary>
- /// <value><c>true</c> if static; otherwise, <c>false</c>.</value>
- public bool? Static { get; set; }
-
- /// <summary>
- /// Gets or sets the output file extension.
- /// </summary>
- /// <value>The output file extension.</value>
- public string OutputFileExtension { get; set; }
-
- /// <summary>
- /// Gets or sets the device id.
- /// </summary>
- /// <value>The device id.</value>
- public string DeviceId { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Dto/VideoStreamOptions.cs b/MediaBrowser.Model/Dto/VideoStreamOptions.cs
deleted file mode 100644
index 73dc70018..000000000
--- a/MediaBrowser.Model/Dto/VideoStreamOptions.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-namespace MediaBrowser.Model.Dto
-{
- /// <summary>
- /// Class VideoStreamOptions
- /// </summary>
- public class VideoStreamOptions : StreamOptions
- {
- /// <summary>
- /// Gets or sets the video codec.
- /// Omit to copy
- /// </summary>
- /// <value>The video codec.</value>
- public string VideoCodec { get; set; }
-
- /// <summary>
- /// Gets or sets the video bit rate.
- /// </summary>
- /// <value>The video bit rate.</value>
- public int? VideoBitRate { get; set; }
-
- /// <summary>
- /// Gets or sets the width.
- /// </summary>
- /// <value>The width.</value>
- public int? Width { get; set; }
-
- /// <summary>
- /// Gets or sets the height.
- /// </summary>
- /// <value>The height.</value>
- public int? Height { get; set; }
-
- /// <summary>
- /// Gets or sets the width of the max.
- /// </summary>
- /// <value>The width of the max.</value>
- public int? MaxWidth { get; set; }
-
- /// <summary>
- /// Gets or sets the height of the max.
- /// </summary>
- /// <value>The height of the max.</value>
- public int? MaxHeight { get; set; }
-
- /// <summary>
- /// Gets or sets the frame rate.
- /// </summary>
- /// <value>The frame rate.</value>
- public double? FrameRate { get; set; }
-
- /// <summary>
- /// Gets or sets the index of the audio stream.
- /// </summary>
- /// <value>The index of the audio stream.</value>
- public int? AudioStreamIndex { get; set; }
-
- /// <summary>
- /// Gets or sets the index of the video stream.
- /// </summary>
- /// <value>The index of the video stream.</value>
- public int? VideoStreamIndex { get; set; }
-
- /// <summary>
- /// Gets or sets the index of the subtitle stream.
- /// </summary>
- /// <value>The index of the subtitle stream.</value>
- public int? SubtitleStreamIndex { get; set; }
-
- /// <summary>
- /// Gets or sets the profile.
- /// </summary>
- /// <value>The profile.</value>
- public string Profile { get; set; }
-
- /// <summary>
- /// Gets or sets the level.
- /// </summary>
- /// <value>The level.</value>
- public string Level { get; set; }
-
- /// <summary>
- /// Gets or sets the baseline stream audio bit rate.
- /// </summary>
- /// <value>The baseline stream audio bit rate.</value>
- public int? BaselineStreamAudioBitRate { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether [append baseline stream].
- /// </summary>
- /// <value><c>true</c> if [append baseline stream]; otherwise, <c>false</c>.</value>
- public bool AppendBaselineStream { get; set; }
-
- /// <summary>
- /// Gets or sets the time stamp offset ms. Only used with HLS.
- /// </summary>
- /// <value>The time stamp offset ms.</value>
- public int? TimeStampOffsetMs { get; set; }
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index c3f02236f..a760cba05 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -152,7 +152,6 @@
<Compile Include="Dto\MediaSourceInfo.cs" />
<Compile Include="Dto\RecommendationType.cs" />
<Compile Include="Dto\SubtitleDownloadOptions.cs" />
- <Compile Include="Dto\VideoStreamOptions.cs" />
<Compile Include="Entities\IsoType.cs" />
<Compile Include="Entities\MediaInfo.cs" />
<Compile Include="Entities\MediaStreamType.cs" />
@@ -285,7 +284,6 @@
<Compile Include="Querying\ItemQuery.cs" />
<Compile Include="Entities\LibraryUpdateInfo.cs" />
<Compile Include="Entities\ParentalRating.cs" />
- <Compile Include="Dto\StreamOptions.cs" />
<Compile Include="Entities\VirtualFolderInfo.cs" />
<Compile Include="IO\IZipClient.cs" />
<Compile Include="Logging\ILogger.cs" />
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
index 33b69d71a..e3324fe82 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
@@ -168,6 +168,15 @@ namespace MediaBrowser.Providers.MediaInfo
return true;
}
+ if (item is Audio)
+ {
+ // Moved to plural AlbumArtists
+ if (date < new DateTime(2014, 8, 28))
+ {
+ return true;
+ }
+ }
+
if (item.SupportsLocalMetadata)
{
var video = item as Video;
diff --git a/MediaBrowser.Providers/Music/AlbumMetadataService.cs b/MediaBrowser.Providers/Music/AlbumMetadataService.cs
index f049c79e1..a3d9b5642 100644
--- a/MediaBrowser.Providers/Music/AlbumMetadataService.cs
+++ b/MediaBrowser.Providers/Music/AlbumMetadataService.cs
@@ -9,8 +9,6 @@ using MediaBrowser.Providers.Manager;
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
namespace MediaBrowser.Providers.Music
{
@@ -104,17 +102,15 @@ namespace MediaBrowser.Providers.Music
{
var updateType = ItemUpdateType.None;
- var albumArtist = songs
+ var albumArtists = songs
.SelectMany(i => i.AlbumArtists)
- .FirstOrDefault(i => !string.IsNullOrEmpty(i));
+ .Distinct(StringComparer.OrdinalIgnoreCase)
+ .ToList();
- if (!string.IsNullOrEmpty(albumArtist))
+ if (!item.AlbumArtists.SequenceEqual(albumArtists, StringComparer.OrdinalIgnoreCase))
{
- if (!string.Equals(item.AlbumArtist, albumArtist, StringComparison.Ordinal))
- {
- item.AlbumArtist = albumArtist;
- updateType = updateType | ItemUpdateType.MetadataDownload;
- }
+ item.AlbumArtists = albumArtists;
+ updateType = updateType | ItemUpdateType.MetadataDownload;
}
return updateType;
diff --git a/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs b/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs
index ab9ac2331..3667d70cf 100644
--- a/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs
@@ -70,7 +70,10 @@ namespace MediaBrowser.Providers.Music
private void ProcessResult(MusicAlbum item, Album result)
{
- item.AlbumArtist = result.strArtist;
+ if (!string.IsNullOrWhiteSpace(result.strArtist))
+ {
+ item.AlbumArtists = new List<string> { result.strArtist };
+ }
if (!string.IsNullOrEmpty(result.intYearReleased))
{
diff --git a/MediaBrowser.Providers/Music/Extensions.cs b/MediaBrowser.Providers/Music/Extensions.cs
index b14a1ba09..c83e69165 100644
--- a/MediaBrowser.Providers/Music/Extensions.cs
+++ b/MediaBrowser.Providers/Music/Extensions.cs
@@ -8,15 +8,15 @@ namespace MediaBrowser.Providers.Music
{
public static string GetAlbumArtist(this AlbumInfo info)
{
- var id = info.AlbumArtists.FirstOrDefault();
+ var id = info.SongInfos.SelectMany(i => i.AlbumArtists)
+ .FirstOrDefault(i => !string.IsNullOrEmpty(i));
- if (string.IsNullOrEmpty(id))
+ if (!string.IsNullOrEmpty(id))
{
- return info.SongInfos.SelectMany(i => i.AlbumArtists)
- .FirstOrDefault(i => !string.IsNullOrEmpty(i));
+ return id;
}
- return id;
+ return info.AlbumArtists.FirstOrDefault();
}
public static string GetReleaseGroupId(this AlbumInfo info)
diff --git a/MediaBrowser.Providers/Photos/PhotoProvider.cs b/MediaBrowser.Providers/Photos/PhotoProvider.cs
index 01d36b541..123c91d07 100644
--- a/MediaBrowser.Providers/Photos/PhotoProvider.cs
+++ b/MediaBrowser.Providers/Photos/PhotoProvider.cs
@@ -29,7 +29,6 @@ namespace MediaBrowser.Providers.Photos
public Task<ItemUpdateType> FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken)
{
item.SetImagePath(ImageType.Primary, item.Path);
- item.SetImagePath(ImageType.Backdrop, item.Path);
// Examples: https://github.com/mono/taglib-sharp/blob/a5f6949a53d09ce63ee7495580d6802921a21f14/tests/fixtures/TagLib.Tests.Images/NullOrientationTest.cs
@@ -77,7 +76,7 @@ namespace MediaBrowser.Providers.Photos
}
}
- item.CameraManufacturer = image.ImageTag.Make;
+ item.CameraMake = image.ImageTag.Make;
item.CameraModel = image.ImageTag.Model;
var rating = image.ImageTag.Rating;
@@ -105,18 +104,21 @@ namespace MediaBrowser.Providers.Photos
item.ProductionYear = dateTaken.Value.Year;
}
- var size = _imageProcessor.GetImageSize(item.Path);
- item.Height = Convert.ToInt32(size.Height);
- item.Width = Convert.ToInt32(size.Width);
-
item.Genres = image.ImageTag.Genres.ToList();
item.Tags = image.ImageTag.Keywords.ToList();
item.Software = image.ImageTag.Software;
- Model.Drawing.ImageOrientation orientation;
- if (Enum.TryParse(image.ImageTag.Orientation.ToString(), true, out orientation))
+ if (image.ImageTag.Orientation == TagLib.Image.ImageOrientation.None)
{
- item.Orientation = orientation;
+ item.Orientation = null;
+ }
+ else
+ {
+ Model.Drawing.ImageOrientation orientation;
+ if (Enum.TryParse(image.ImageTag.Orientation.ToString(), true, out orientation))
+ {
+ item.Orientation = orientation;
+ }
}
item.ExposureTime = image.ImageTag.ExposureTime;
@@ -127,6 +129,10 @@ namespace MediaBrowser.Providers.Photos
_logger.ErrorException("Image Provider - Error reading image tag for {0}", e, item.Path);
}
+ var size = _imageProcessor.GetImageSize(item.Path);
+ item.Height = Convert.ToInt32(size.Height);
+ item.Width = Convert.ToInt32(size.Width);
+
const ItemUpdateType result = ItemUpdateType.ImageUpdate | ItemUpdateType.MetadataImport;
return Task.FromResult(result);
}
@@ -138,6 +144,13 @@ namespace MediaBrowser.Providers.Photos
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
{
+ // Moved to plural AlbumArtists
+ if (date < new DateTime(2014, 8, 28))
+ {
+ // Revamped vaptured metadata
+ return true;
+ }
+
return item.DateModified > date;
}
}
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 8bfd4ea1e..61517ce6e 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -357,6 +357,19 @@ namespace MediaBrowser.Server.Implementations.Dto
{
dto.SeriesName = item.SeriesName;
}
+ private void SetPhotoProperties(BaseItemDto dto, Photo item)
+ {
+ dto.Width = item.Width;
+ dto.Height = item.Height;
+ dto.CameraMake = item.CameraMake;
+ dto.CameraModel = item.CameraModel;
+ dto.Software = item.Software;
+ dto.ExposureTime = item.ExposureTime;
+ dto.FocalLength = item.FocalLength;
+ dto.ImageOrientation = item.Orientation;
+ dto.Aperture = item.Aperture;
+ dto.ShutterSpeed = item.ShutterSpeed;
+ }
private void SetMusicVideoProperties(BaseItemDto dto, MusicVideo item)
{
@@ -1187,21 +1200,24 @@ namespace MediaBrowser.Server.Implementations.Dto
}
var book = item as Book;
-
if (book != null)
{
SetBookProperties(dto, book);
}
- var tvChannel = item as LiveTvChannel;
+ var photo = item as Photo;
+ if (photo != null)
+ {
+ SetPhotoProperties(dto, photo);
+ }
+ var tvChannel = item as LiveTvChannel;
if (tvChannel != null)
{
dto.MediaSources = tvChannel.GetMediaSources(true).ToList();
}
var channelItem = item as IChannelItem;
-
if (channelItem != null)
{
dto.ChannelId = channelItem.ChannelId;
diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json
index adaa30719..21eb0c1c9 100644
--- a/MediaBrowser.Server.Implementations/Localization/Server/server.json
+++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json
@@ -1093,8 +1093,8 @@
"MessageLeaveEmptyToInherit": "Leave empty to inherit settings from a parent item, or the global default value.",
"TabSupporterClub": "Supporter Club",
"HeaderDonationType": "Donation type:",
- "OptionMakeOneTimeDonation": "Make an additional donation",
- "OptionOneTimeDescription": "This is an additional donation to the team to show extra support. It does not have any additional benefits.",
+ "OptionMakeOneTimeDonation": "Make a separate donation",
+ "OptionOneTimeDescription": "This is an additional donation to the team to show your support. It does not have any additional benefits.",
"OptionLifeTimeSupporterClubMembership": "Lifetime supporter club membership",
"HeaderSupporterBenefit": "Becoming a supporter club member provides additional benefits such as access to premium plugins, internet channel content, and more.",
"OptionNoTrailer": "No Trailer",
@@ -1108,5 +1108,7 @@
"OptionProducer": "Producer",
"OptionWriter": "Writer",
"LabelAirDays": "Air days:",
- "LabelAirTime": "Air time:"
+ "LabelAirTime": "Air time:",
+ "HeaderMediaInfo": "Media Info",
+ "HeaderPhotoInfo": "Photo Info"
}
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index e843c6298..935d26750 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
- <version>3.0.427</version>
+ <version>3.0.428</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
- <dependency id="MediaBrowser.Common" version="3.0.427" />
+ <dependency id="MediaBrowser.Common" version="3.0.428" />
<dependency id="NLog" version="3.1.0.0" />
<dependency id="SimpleInjector" version="2.5.2" />
<dependency id="sharpcompress" version="0.10.2" />
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index 90a66b3c7..4c3626c8d 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
- <version>3.0.427</version>
+ <version>3.0.428</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec
index a444d4c33..67127ea77 100644
--- a/Nuget/MediaBrowser.Model.Signed.nuspec
+++ b/Nuget/MediaBrowser.Model.Signed.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Model.Signed</id>
- <version>3.0.427</version>
+ <version>3.0.428</version>
<title>MediaBrowser.Model - Signed Edition</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index dadc51dff..23743e2d0 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
- <version>3.0.427</version>
+ <version>3.0.428</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
- <dependency id="MediaBrowser.Common" version="3.0.427" />
+ <dependency id="MediaBrowser.Common" version="3.0.428" />
</dependencies>
</metadata>
<files>