Skip to content

Commit

Permalink
Add 'UserFolders' API entry for Emby
Browse files Browse the repository at this point in the history
  • Loading branch information
firecore committed Oct 22, 2021
1 parent d09de4e commit 445fcde
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
14 changes: 11 additions & 3 deletions InfuseSync/API/InfuseSyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;

#if EMBY
Expand All @@ -16,7 +17,6 @@
using ILogger = MediaBrowser.Model.Logging.ILogger;
#else
using Jellyfin.Data.Entities;
using MediaBrowser.Model.Entities;
using Microsoft.Extensions.Logging;
using System.Globalization;
#endif
Expand Down Expand Up @@ -137,8 +137,18 @@ public class GetUserDataQuery
public int? Limit { get; set; }
}

#if EMBY
[Route("/InfuseSync/UserFolders/{UserID}", "GET", Summary = "Get updated user data for {CheckpointID}")]
[Authenticated]
#endif
public class GetUserFolders
#if EMBY
: IReturn<List<VirtualFolderInfo>>
#endif
{
#if EMBY
[ApiMember(Name = "UserID", Description = "User identifier", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
#endif
public string UserID { get; set; }
}

Expand Down Expand Up @@ -403,7 +413,6 @@ public QueryResult<UserItemDataDto> Get(GetUserDataQuery request)
};
}

#if JELLYFIN
public List<VirtualFolderInfo> Get(GetUserFolders request)
{
_logger.LogDebug($"InfuseSync: User folders requested for UserID '{request.UserID}'");
Expand All @@ -422,6 +431,5 @@ public List<VirtualFolderInfo> Get(GetUserFolders request)
})
.ToList();
}
#endif
}
}
4 changes: 2 additions & 2 deletions InfuseSync/InfuseSync.Emby.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>1.3.3</AssemblyVersion>
<FileVersion>1.3.3</FileVersion>
<AssemblyVersion>1.4.1</AssemblyVersion>
<FileVersion>1.4.1</FileVersion>
<RootNamespace>InfuseSync</RootNamespace>
<AssemblyName>InfuseSync</AssemblyName>
<DefineConstants>EMBY</DefineConstants>
Expand Down
4 changes: 2 additions & 2 deletions InfuseSync/InfuseSync.Jellyfin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyVersion>1.3.3</AssemblyVersion>
<FileVersion>1.3.3</FileVersion>
<AssemblyVersion>1.4.1</AssemblyVersion>
<FileVersion>1.4.1</FileVersion>
<RootNamespace>InfuseSync</RootNamespace>
<AssemblyName>InfuseSync</AssemblyName>
<DefineConstants>JELLYFIN</DefineConstants>
Expand Down

0 comments on commit 445fcde

Please sign in to comment.