@ -105,9 +105,13 @@ namespace Emby.Server.Implementations.Dto
var programTuples = new List < Tuple < BaseItem , BaseItemDto > > ( ) ;
var channelTuples = new List < Tuple < BaseItemDto , LiveTvChannel > > ( ) ;
var refreshQueue = options . Fields . Contains ( ItemFields . RefreshState )
? _providerManager . GetRefreshQueue ( )
: null ;
foreach ( var item in items )
{
var dto = GetBaseItemDtoInternal ( item , options , user , owner ) ;
var dto = GetBaseItemDtoInternal ( item , options , refreshQueue, user, owner ) ;
var tvChannel = item as LiveTvChannel ;
if ( tvChannel ! = null )
@ -160,7 +164,11 @@ namespace Emby.Server.Implementations.Dto
{
var syncDictionary = GetSyncedItemProgress ( options ) ;
var dto = GetBaseItemDtoInternal ( item , options , user , owner ) ;
var refreshQueue = options . Fields . Contains ( ItemFields . RefreshState )
? _providerManager . GetRefreshQueue ( )
: null ;
var dto = GetBaseItemDtoInternal ( item , options , refreshQueue , user , owner ) ;
var tvChannel = item as LiveTvChannel ;
if ( tvChannel ! = null )
{
@ -292,7 +300,7 @@ namespace Emby.Server.Implementations.Dto
}
}
private BaseItemDto GetBaseItemDtoInternal ( BaseItem item , DtoOptions options , User user = null , BaseItem owner = null )
private BaseItemDto GetBaseItemDtoInternal ( BaseItem item , DtoOptions options , Dictionary< Guid , Guid > currentRefreshQueue , User user = null , BaseItem owner = null )
{
var fields = options . Fields ;
@ -392,6 +400,11 @@ namespace Emby.Server.Implementations.Dto
dto . Etag = item . GetEtag ( user ) ;
}
if ( currentRefreshQueue ! = null )
{
//dto.RefreshState = item.GetRefreshState(currentRefreshQueue);
}
if ( item is ILiveTvRecording )
{
_livetvManager ( ) . AddInfoToRecordingDto ( item , dto , user ) ;
@ -402,7 +415,10 @@ namespace Emby.Server.Implementations.Dto
public BaseItemDto GetItemByNameDto ( BaseItem item , DtoOptions options , List < BaseItem > taggedItems , Dictionary < string , SyncedItemProgress > syncProgress , User user = null )
{
var dto = GetBaseItemDtoInternal ( item , options , user ) ;
var refreshQueue = options . Fields . Contains ( ItemFields . RefreshState )
? _providerManager . GetRefreshQueue ( )
: null ;
var dto = GetBaseItemDtoInternal ( item , options , refreshQueue , user ) ;
if ( taggedItems ! = null & & options . Fields . Contains ( ItemFields . ItemCounts ) )
{