mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
enable user device access
This commit is contained in:
@@ -85,5 +85,13 @@ namespace MediaBrowser.Controller.Devices
|
||||
/// <param name="file">The file.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task AcceptCameraUpload(string deviceId, Stream stream, LocalFileInfo file);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this instance [can access device] the specified user identifier.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <returns><c>true</c> if this instance [can access device] the specified user identifier; otherwise, <c>false</c>.</returns>
|
||||
bool CanAccessDevice(string userId, string deviceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,21 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsArchive
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var ext = System.IO.Path.GetExtension(Path) ?? string.Empty;
|
||||
|
||||
return new[] { ".zip", ".rar", ".7z" }.Contains(ext, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the artist.
|
||||
/// </summary>
|
||||
|
||||
@@ -91,6 +91,21 @@ namespace MediaBrowser.Controller.Entities
|
||||
get { return LocalAlternateVersions.Count > 0; }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsArchive
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var ext = System.IO.Path.GetExtension(Path) ?? string.Empty;
|
||||
|
||||
return new[] { ".zip", ".rar", ".7z" }.Contains(ext, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Guid> GetAdditionalPartIds()
|
||||
{
|
||||
return AdditionalParts.Select(i => LibraryManager.GetNewItemId(i, typeof(Video)));
|
||||
@@ -246,7 +261,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return System.IO.Path.GetFileName(Path);
|
||||
}
|
||||
|
||||
|
||||
return System.IO.Path.GetFileNameWithoutExtension(Path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user