mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
update live tv
This commit is contained in:
parent
609d2283c6
commit
77afd4ba54
@ -127,7 +127,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
|
|||||||
|
|
||||||
private WebRequest GetRequest(HttpRequestOptions options, string method, bool enableHttpCompression)
|
private WebRequest GetRequest(HttpRequestOptions options, string method, bool enableHttpCompression)
|
||||||
{
|
{
|
||||||
var request = WebRequest.Create(options.Url);
|
var request = CreateWebRequest(options.Url);
|
||||||
var httpWebRequest = request as HttpWebRequest;
|
var httpWebRequest = request as HttpWebRequest;
|
||||||
|
|
||||||
if (httpWebRequest != null)
|
if (httpWebRequest != null)
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
ToggleFullscreen = 25,
|
ToggleFullscreen = 25,
|
||||||
DisplayContent = 26,
|
DisplayContent = 26,
|
||||||
GoToSearch = 27,
|
GoToSearch = 27,
|
||||||
DisplayMessage = 28
|
DisplayMessage = 28,
|
||||||
|
SetRepeatAll = 29,
|
||||||
|
SetRepeatOne = 30
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -88,5 +88,17 @@ namespace MediaBrowser.Model.Session
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The play session identifier.</value>
|
/// <value>The play session identifier.</value>
|
||||||
public string PlaySessionId { get; set; }
|
public string PlaySessionId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the repeat mode.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The repeat mode.</value>
|
||||||
|
public RepeatMode RepeatMode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum RepeatMode
|
||||||
|
{
|
||||||
|
RepeatNone = 0,
|
||||||
|
RepeatAll = 1,
|
||||||
|
RepeatOne = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -99,7 +99,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
list.Add(await GetUserView(parents, list, CollectionType.TvShows, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
list.Add(await GetUserView(parents, list, CollectionType.TvShows, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
parents = foldersWithViewTypes.Where(i => string.Equals(i.CollectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase) || string.Equals(i.CollectionType, CollectionType.MusicVideos, StringComparison.OrdinalIgnoreCase) || string.IsNullOrWhiteSpace(i.CollectionType))
|
parents = foldersWithViewTypes.Where(i => string.Equals(i.CollectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase) || string.IsNullOrWhiteSpace(i.CollectionType))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
if (parents.Count > 0)
|
if (parents.Count > 0)
|
||||||
|
@ -544,16 +544,16 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
|
|
||||||
var replaceImages = new List<ImageType>();
|
var replaceImages = new List<ImageType>();
|
||||||
|
|
||||||
if (!string.Equals(item.ProviderImageUrl, channelInfo.ImageUrl, StringComparison.OrdinalIgnoreCase))
|
//if (!string.Equals(item.ProviderImageUrl, channelInfo.ImageUrl, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
//{
|
||||||
isNew = true;
|
// isNew = true;
|
||||||
replaceImages.Add(ImageType.Primary);
|
// replaceImages.Add(ImageType.Primary);
|
||||||
}
|
//}
|
||||||
if (!string.Equals(item.ProviderImagePath, channelInfo.ImagePath, StringComparison.OrdinalIgnoreCase))
|
//if (!string.Equals(item.ProviderImagePath, channelInfo.ImagePath, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
//{
|
||||||
isNew = true;
|
// isNew = true;
|
||||||
replaceImages.Add(ImageType.Primary);
|
// replaceImages.Add(ImageType.Primary);
|
||||||
}
|
//}
|
||||||
|
|
||||||
item.ProviderImageUrl = channelInfo.ImageUrl;
|
item.ProviderImageUrl = channelInfo.ImageUrl;
|
||||||
item.HasProviderImage = channelInfo.HasImage;
|
item.HasProviderImage = channelInfo.HasImage;
|
||||||
|
@ -325,7 +325,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||||||
|
|
||||||
if (model.IndexOf("hdtc", StringComparison.OrdinalIgnoreCase) != -1)
|
if (model.IndexOf("hdtc", StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
{
|
{
|
||||||
list.Add(GetMediaSource(info, channelId, "heavy"));
|
list.Insert(0, GetMediaSource(info, channelId, "heavy"));
|
||||||
|
|
||||||
list.Add(GetMediaSource(info, channelId, "internet480"));
|
list.Add(GetMediaSource(info, channelId, "internet480"));
|
||||||
list.Add(GetMediaSource(info, channelId, "internet360"));
|
list.Add(GetMediaSource(info, channelId, "internet360"));
|
||||||
list.Add(GetMediaSource(info, channelId, "internet240"));
|
list.Add(GetMediaSource(info, channelId, "internet240"));
|
||||||
|
@ -23,14 +23,16 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
|||||||
private readonly ILibraryMonitor _iLibraryMonitor;
|
private readonly ILibraryMonitor _iLibraryMonitor;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IUserManager _userManager;
|
private readonly IUserManager _userManager;
|
||||||
|
private readonly IProviderManager _providerManager;
|
||||||
|
|
||||||
public PlaylistManager(ILibraryManager libraryManager, IFileSystem fileSystem, ILibraryMonitor iLibraryMonitor, ILogger logger, IUserManager userManager)
|
public PlaylistManager(ILibraryManager libraryManager, IFileSystem fileSystem, ILibraryMonitor iLibraryMonitor, ILogger logger, IUserManager userManager, IProviderManager providerManager)
|
||||||
{
|
{
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_iLibraryMonitor = iLibraryMonitor;
|
_iLibraryMonitor = iLibraryMonitor;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
|
_providerManager = providerManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Playlist> GetPlaylists(string userId)
|
public IEnumerable<Playlist> GetPlaylists(string userId)
|
||||||
@ -193,11 +195,11 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
|||||||
playlist.LinkedChildren.AddRange(list);
|
playlist.LinkedChildren.AddRange(list);
|
||||||
|
|
||||||
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||||
await playlist.RefreshMetadata(new MetadataRefreshOptions
|
|
||||||
|
_providerManager.QueueRefresh(playlist.Id, new MetadataRefreshOptions
|
||||||
{
|
{
|
||||||
ForceSave = true
|
ForceSave = true
|
||||||
|
});
|
||||||
}, CancellationToken.None).ConfigureAwait(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds)
|
public async Task RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds)
|
||||||
@ -220,10 +222,11 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
|||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||||
await playlist.RefreshMetadata(new MetadataRefreshOptions
|
|
||||||
|
_providerManager.QueueRefresh(playlist.Id, new MetadataRefreshOptions
|
||||||
{
|
{
|
||||||
ForceSave = true
|
ForceSave = true
|
||||||
}, CancellationToken.None).ConfigureAwait(false);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Folder GetPlaylistsFolder(string userId)
|
public Folder GetPlaylistsFolder(string userId)
|
||||||
|
@ -493,7 +493,7 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
CollectionManager = new CollectionManager(LibraryManager, FileSystemManager, LibraryMonitor, LogManager.GetLogger("CollectionManager"));
|
CollectionManager = new CollectionManager(LibraryManager, FileSystemManager, LibraryMonitor, LogManager.GetLogger("CollectionManager"));
|
||||||
RegisterSingleInstance(CollectionManager);
|
RegisterSingleInstance(CollectionManager);
|
||||||
|
|
||||||
PlaylistManager = new PlaylistManager(LibraryManager, FileSystemManager, LibraryMonitor, LogManager.GetLogger("PlaylistManager"), UserManager);
|
PlaylistManager = new PlaylistManager(LibraryManager, FileSystemManager, LibraryMonitor, LogManager.GetLogger("PlaylistManager"), UserManager, ProviderManager);
|
||||||
RegisterSingleInstance<IPlaylistManager>(PlaylistManager);
|
RegisterSingleInstance<IPlaylistManager>(PlaylistManager);
|
||||||
|
|
||||||
LiveTvManager = new LiveTvManager(this, ServerConfigurationManager, Logger, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, TaskManager, LocalizationManager, JsonSerializer, ProviderManager);
|
LiveTvManager = new LiveTvManager(this, ServerConfigurationManager, Logger, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, TaskManager, LocalizationManager, JsonSerializer, ProviderManager);
|
||||||
|
Loading…
Reference in New Issue
Block a user