mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 05:18:27 +01:00
Merge branch 'master' into event-rewrite-1
# Conflicts: # Emby.Dlna/Emby.Dlna.csproj # Emby.Dlna/Eventing/DlnaEventManager.cs # Emby.Dlna/Service/BaseService.cs # Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs # MediaBrowser.Controller/Subtitles/SubtitleDownloadEventArgs.cs
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
public class DeleteOptions
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -63,6 +65,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// Finds the by path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="isFolder"><c>true</c> is the path is a directory; otherwise <c>false</c>.</param>
|
||||
/// <returns>BaseItem.</returns>
|
||||
BaseItem FindByPath(string path, bool? isFolder);
|
||||
|
||||
@@ -72,6 +75,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>Task{Artist}.</returns>
|
||||
MusicArtist GetArtist(string name);
|
||||
|
||||
MusicArtist GetArtist(string name, DtoOptions options);
|
||||
/// <summary>
|
||||
/// Gets a Studio.
|
||||
@@ -124,7 +128,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
void QueueLibraryScan();
|
||||
|
||||
void UpdateImages(BaseItem item, bool forceUpdate = false);
|
||||
Task UpdateImagesAsync(BaseItem item, bool forceUpdate = false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default view.
|
||||
@@ -179,6 +183,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="sortOrder">The sort order.</param>
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<string> sortBy, SortOrder sortOrder);
|
||||
|
||||
IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<ValueTuple<string, SortOrder>> orderBy);
|
||||
|
||||
/// <summary>
|
||||
@@ -200,9 +205,16 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <summary>
|
||||
/// Updates the item.
|
||||
/// </summary>
|
||||
void UpdateItems(IReadOnlyList<BaseItem> items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
||||
Task UpdateItemsAsync(IReadOnlyList<BaseItem> items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
||||
|
||||
void UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
||||
/// <summary>
|
||||
/// Updates the item.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="parent">The parent item.</param>
|
||||
/// <param name="updateReason">The update reason.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
Task UpdateItemAsync(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the item.
|
||||
@@ -317,7 +329,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="viewType">Type of the view.</param>
|
||||
/// <param name="sortName">Name of the sort.</param>
|
||||
UserView GetNamedView(string name,
|
||||
UserView GetNamedView(
|
||||
string name,
|
||||
string viewType,
|
||||
string sortName);
|
||||
|
||||
@@ -329,7 +342,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="viewType">Type of the view.</param>
|
||||
/// <param name="sortName">Name of the sort.</param>
|
||||
/// <param name="uniqueId">The unique identifier.</param>
|
||||
UserView GetNamedView(string name,
|
||||
UserView GetNamedView(
|
||||
string name,
|
||||
Guid parentId,
|
||||
string viewType,
|
||||
string sortName,
|
||||
@@ -341,7 +355,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="parent">The parent.</param>
|
||||
/// <param name="viewType">Type of the view.</param>
|
||||
/// <param name="sortName">Name of the sort.</param>
|
||||
UserView GetShadowView(BaseItem parent,
|
||||
UserView GetShadowView(
|
||||
BaseItem parent,
|
||||
string viewType,
|
||||
string sortName);
|
||||
|
||||
@@ -393,7 +408,9 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="fileSystemChildren">The file system children.</param>
|
||||
/// <param name="directoryService">The directory service.</param>
|
||||
/// <returns>IEnumerable<Trailer>.</returns>
|
||||
IEnumerable<Video> FindTrailers(BaseItem owner, List<FileSystemMetadata> fileSystemChildren,
|
||||
IEnumerable<Video> FindTrailers(
|
||||
BaseItem owner,
|
||||
List<FileSystemMetadata> fileSystemChildren,
|
||||
IDirectoryService directoryService);
|
||||
|
||||
/// <summary>
|
||||
@@ -403,7 +420,9 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="fileSystemChildren">The file system children.</param>
|
||||
/// <param name="directoryService">The directory service.</param>
|
||||
/// <returns>IEnumerable<Video>.</returns>
|
||||
IEnumerable<Video> FindExtras(BaseItem owner, List<FileSystemMetadata> fileSystemChildren,
|
||||
IEnumerable<Video> FindExtras(
|
||||
BaseItem owner,
|
||||
List<FileSystemMetadata> fileSystemChildren,
|
||||
IDirectoryService directoryService);
|
||||
|
||||
/// <summary>
|
||||
@@ -522,16 +541,25 @@ namespace MediaBrowser.Controller.Library
|
||||
Guid GetMusicGenreId(string name);
|
||||
|
||||
Task AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary);
|
||||
|
||||
Task RemoveVirtualFolder(string name, bool refreshLibrary);
|
||||
|
||||
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
||||
|
||||
void UpdateMediaPath(string virtualFolderName, MediaPathInfo path);
|
||||
|
||||
void RemoveMediaPath(string virtualFolderName, string path);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetGenres(InternalItemsQuery query);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetMusicGenres(InternalItemsQuery query);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetStudios(InternalItemsQuery query);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetArtists(InternalItemsQuery query);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetAlbumArtists(InternalItemsQuery query);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetAllArtists(InternalItemsQuery query);
|
||||
|
||||
int GetCount(InternalItemsQuery query);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Dto;
|
||||
@@ -6,8 +8,6 @@ namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
public interface ILiveStream
|
||||
{
|
||||
Task Open(CancellationToken openCancellationToken);
|
||||
Task Close();
|
||||
int ConsumerCount { get; set; }
|
||||
|
||||
string OriginalStreamId { get; set; }
|
||||
@@ -19,5 +19,9 @@ namespace MediaBrowser.Controller.Library
|
||||
MediaSourceInfo MediaSource { get; set; }
|
||||
|
||||
string UniqueId { get; }
|
||||
|
||||
Task Open(CancellationToken openCancellationToken);
|
||||
|
||||
Task Close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Jellyfin.Data.Entities;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -28,6 +30,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="reason">The reason.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void SaveUserData(Guid userId, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
|
||||
|
||||
void SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
|
||||
|
||||
UserItemData GetUserData(User user, BaseItem item);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
@@ -10,6 +12,7 @@ namespace MediaBrowser.Controller.Library
|
||||
public interface IUserViewManager
|
||||
{
|
||||
Folder[] GetUserViews(UserViewQuery query);
|
||||
|
||||
UserView GetUserSubView(Guid parentId, string type, string localizationKey, string sortName);
|
||||
|
||||
List<Tuple<BaseItem, List<BaseItem>>> GetLatestItems(LatestItemsQuery request, DtoOptions options);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Jellyfin.Data.Entities;
|
||||
@@ -12,6 +14,11 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
public class PlaybackProgressEventArgs : EventArgs
|
||||
{
|
||||
public PlaybackProgressEventArgs()
|
||||
{
|
||||
Users = new List<User>();
|
||||
}
|
||||
|
||||
public List<User> Users { get; set; }
|
||||
|
||||
public long? PlaybackPositionTicks { get; set; }
|
||||
@@ -35,10 +42,5 @@ namespace MediaBrowser.Controller.Library
|
||||
public string PlaySessionId { get; set; }
|
||||
|
||||
public SessionInfo Session { get; set; }
|
||||
|
||||
public PlaybackProgressEventArgs()
|
||||
{
|
||||
Users = new List<User>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
public class PlaybackStopEventArgs : PlaybackProgressEventArgs
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
@@ -13,6 +14,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// The name.
|
||||
/// </summary>
|
||||
readonly string _name;
|
||||
|
||||
/// <summary>
|
||||
/// The stopwatch.
|
||||
/// </summary>
|
||||
@@ -44,6 +46,7 @@ namespace MediaBrowser.Controller.Library
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,13 +61,19 @@ namespace MediaBrowser.Controller.Library
|
||||
string message;
|
||||
if (_stopwatch.ElapsedMilliseconds > 300000)
|
||||
{
|
||||
message = string.Format("{0} took {1} minutes.",
|
||||
_name, ((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F"));
|
||||
message = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} took {1} minutes.",
|
||||
_name,
|
||||
((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F", CultureInfo.InvariantCulture));
|
||||
}
|
||||
else
|
||||
{
|
||||
message = string.Format("{0} took {1} seconds.",
|
||||
_name, ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000"));
|
||||
message = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} took {1} seconds.",
|
||||
_name,
|
||||
((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000", CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
_logger.LogInformation(message);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
Reference in New Issue
Block a user