So, this is a quick blog post just in case I can help anybody or if I run into this problem again.
So, if you do not know what ErsatzTV is it is a program that lets you create your own channels that can be used with Jellyfin and Plex. You can also use Jellyfin as the source. Well, I tried to connect to Jellyfin and it kept producing empty libraries so I checked the logs and got, “Error synchronizing jellyfin admin user id: Unable to locate jellyfin admin user.” I thought it was weird because I thought I was the Jellyfin admin user.
So, eventually I went digging through the source code and found the following code:
try
{
IJellyfinApi service = RestService.For<IJellyfinApi>(address);
List<JellyfinUserResponse> users = await service.GetUsers(apiKey);
Option<string> maybeUserId = users
.Filter(user => user.Policy.IsAdministrator && !user.Policy.IsDisabled && user.Policy.EnableAllFolders)
.Map(user => user.Id)
.HeadOrNone();
return maybeUserId.ToEither(BaseError.New("Unable to locate jellyfin admin user"));
}
catch (Exception ex)
{
_logger.LogError(ex, "Error getting jellyfin admin user id");
return BaseError.New(ex.Message);
}
I noticed that it was looking for a user that has the “Enable all folders” checked. This is what I was missing. Checking that option fixed the problem in ErsatzTV.