update photo resolving

pull/702/head
Luke Pulverenti 10 years ago
parent 8ae0822e13
commit 9f4407028b

@ -768,8 +768,11 @@ namespace MediaBrowser.Dlna.PlayTo
await _device.SetAvTransport(newItem.StreamUrl, GetDlnaHeaders(newItem), newItem.Didl).ConfigureAwait(false);
if (newItem.StreamInfo.IsDirectStream)
if (newItem.StreamInfo.IsDirectStream && newPosition > 0)
{
// This is rather arbitrary, but give the player time to start playing
await Task.Delay(2000).ConfigureAwait(false);
await _device.Seek(TimeSpan.FromTicks(newPosition)).ConfigureAwait(false);
}
}

@ -38,13 +38,19 @@ namespace MediaBrowser.Providers.Manager
{
var hasChanges = false;
var images = providers.OfType<ILocalImageFileProvider>()
.SelectMany(i => i.GetImages(item, directoryService))
var localImageProviders = providers.OfType<ILocalImageFileProvider>()
.ToList();
if (MergeImages(item, images))
if (localImageProviders.Count > 0 || !(item is Photo))
{
hasChanges = true;
var images = localImageProviders
.SelectMany(i => i.GetImages(item, directoryService))
.ToList();
if (MergeImages(item, images))
{
hasChanges = true;
}
}
return hasChanges;

@ -9,18 +9,19 @@ using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Photos
{
//public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>
//{
// public PhotoAlbumImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor) : base(fileSystem, providerManager, applicationPaths, imageProcessor)
// {
// }
public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>
{
public PhotoAlbumImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor)
: base(fileSystem, providerManager, applicationPaths, imageProcessor)
{
}
// protected override Task<List<BaseItem>> GetItemsWithImages(IHasImages item)
// {
// var photoAlbum = (PhotoAlbum)item;
// var items = GetFinalItems(photoAlbum.Children.ToList());
protected override Task<List<BaseItem>> GetItemsWithImages(IHasImages item)
{
var photoAlbum = (PhotoAlbum)item;
var items = GetFinalItems(photoAlbum.Children.ToList());
// return Task.FromResult(items);
// }
//}
return Task.FromResult(items);
}
}
}

Loading…
Cancel
Save