mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
Fix some warnings
This commit is contained in:
@@ -97,8 +97,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = XmlSerializer.DeserializeFromFile(typeof(LibraryOptions), GetLibraryOptionsPath(path)) as LibraryOptions;
|
||||
if (result == null)
|
||||
if (XmlSerializer.DeserializeFromFile(typeof(LibraryOptions), GetLibraryOptionsPath(path)) is not LibraryOptions result)
|
||||
{
|
||||
return new LibraryOptions();
|
||||
}
|
||||
|
||||
@@ -104,13 +104,6 @@ namespace MediaBrowser.Controller
|
||||
/// <returns>The API URL.</returns>
|
||||
string GetLocalApiUrl(string hostname, string scheme = null, int? port = null);
|
||||
|
||||
/// <summary>
|
||||
/// Open a URL in an external browser window.
|
||||
/// </summary>
|
||||
/// <param name="url">The URL to open.</param>
|
||||
/// <exception cref="NotSupportedException"><see cref="CanLaunchWebBrowser"/> is false.</exception>
|
||||
void LaunchUrl(string url);
|
||||
|
||||
IEnumerable<WakeOnLanInfo> GetWakeOnLanInfo();
|
||||
|
||||
string ExpandVirtualPath(string path);
|
||||
|
||||
@@ -595,11 +595,11 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
Task RemoveVirtualFolder(string name, bool refreshLibrary);
|
||||
|
||||
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
||||
void AddMediaPath(string virtualFolderName, MediaPathInfo mediaPath);
|
||||
|
||||
void UpdateMediaPath(string virtualFolderName, MediaPathInfo path);
|
||||
void UpdateMediaPath(string virtualFolderName, MediaPathInfo mediaPath);
|
||||
|
||||
void RemoveMediaPath(string virtualFolderName, string path);
|
||||
void RemoveMediaPath(string virtualFolderName, string mediaPath);
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> GetGenres(InternalItemsQuery query);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <returns>User data dto.</returns>
|
||||
UserItemDataDto GetUserDataDto(BaseItem item, User user);
|
||||
|
||||
UserItemDataDto GetUserDataDto(BaseItem item, BaseItemDto itemDto, User user, DtoOptions dto_options);
|
||||
UserItemDataDto GetUserDataDto(BaseItem item, BaseItemDto itemDto, User user, DtoOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Get all user data for the given user.
|
||||
@@ -69,8 +69,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="item">Item to update.</param>
|
||||
/// <param name="data">Data to update.</param>
|
||||
/// <param name="positionTicks">New playstate.</param>
|
||||
/// <param name="reportedPositionTicks">New playstate.</param>
|
||||
/// <returns>True if playstate was updated.</returns>
|
||||
bool UpdatePlayState(BaseItem item, UserItemData data, long? positionTicks);
|
||||
bool UpdatePlayState(BaseItem item, UserItemData data, long? reportedPositionTicks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
|
||||
Task<TunerChannelMapping> SetChannelMapping(string providerId, string tunerChannelNumber, string providerChannelNumber);
|
||||
|
||||
TunerChannelMapping GetTunerChannelMapping(ChannelInfo channel, NameValuePair[] mappings, List<ChannelInfo> providerChannels);
|
||||
TunerChannelMapping GetTunerChannelMapping(ChannelInfo tunerChannel, NameValuePair[] mappings, List<ChannelInfo> providerChannels);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the lineups.
|
||||
|
||||
@@ -70,10 +70,10 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <summary>
|
||||
/// Updates the timer asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <param name="updatedTimer">The updated timer information.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task UpdateTimerAsync(TimerInfo info, CancellationToken cancellationToken);
|
||||
Task UpdateTimerAsync(TimerInfo updatedTimer, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the series timer asynchronous.
|
||||
|
||||
@@ -49,17 +49,17 @@ namespace MediaBrowser.Controller.Persistence
|
||||
/// <summary>
|
||||
/// Gets chapters for an item.
|
||||
/// </summary>
|
||||
/// <param name="id">The item.</param>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <returns>The list of chapter info.</returns>
|
||||
List<ChapterInfo> GetChapters(BaseItem id);
|
||||
List<ChapterInfo> GetChapters(BaseItem item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single chapter for an item.
|
||||
/// </summary>
|
||||
/// <param name="id">The item.</param>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="index">The chapter index.</param>
|
||||
/// <returns>The chapter info at the specified index.</returns>
|
||||
ChapterInfo GetChapter(BaseItem id, int index);
|
||||
ChapterInfo GetChapter(BaseItem item, int index);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the chapters.
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <returns>A <see cref="Task"/> representing the log out process.</returns>
|
||||
Task Logout(string accessToken);
|
||||
|
||||
Task Logout(Device accessToken);
|
||||
Task Logout(Device device);
|
||||
|
||||
/// <summary>
|
||||
/// Revokes the user tokens.
|
||||
|
||||
Reference in New Issue
Block a user