Merge branch 'jellyfin-10.11'
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.11.0-rc2" />
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.11.0-rc2" />
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.11.0" />
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.11.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -186,9 +186,16 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
|
||||
}
|
||||
|
||||
var user = _userManager.GetUserById(eventArgs.UserId);
|
||||
if (user == null)
|
||||
{
|
||||
Logger.LogError("OnWatchedStatusChange callback called without user id for item {ItemName}", eventArgs.Item.Name);
|
||||
return;
|
||||
}
|
||||
|
||||
var userItemData = _userDataManager.GetUserData(user, eventArgs.Item);
|
||||
if (Configuration.JFTASync && user != null && Configuration.GetJFUsernamesToArray().Contains(user!.Username))
|
||||
{
|
||||
var isPlayed = eventArgs.Item.IsPlayed(user);
|
||||
var isPlayed = eventArgs.Item.IsPlayed(user, userItemData);
|
||||
Logger.LogDebug("User {UserId} changed watched status to {Status} for the item {ItemName}", eventArgs.UserId, isPlayed, eventArgs.Item.Name);
|
||||
string itemYTId;
|
||||
try
|
||||
|
||||
@@ -155,10 +155,11 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
||||
var videoYTId = Utils.GetVideoNameFromPath(video.Path);
|
||||
_logger.LogDebug("{VideoYtId}", videoYTId);
|
||||
HttpStatusCode statusCode;
|
||||
var userItemData = _userDataManager.GetUserData(user, channel);
|
||||
|
||||
if (!isChannelCheckedForWatched && channel.IsPlayed(user))
|
||||
if (!isChannelCheckedForWatched && channel.IsPlayed(user, userItemData))
|
||||
{
|
||||
var isChannelPlayed = channel.IsPlayed(user);
|
||||
var isChannelPlayed = channel.IsPlayed(user, userItemData);
|
||||
statusCode = await taApi.SetWatchedStatus(channelYTId, isChannelPlayed).ConfigureAwait(true);
|
||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
||||
{
|
||||
@@ -174,7 +175,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
||||
|
||||
if (!isChannelWatched)
|
||||
{
|
||||
var isVideoPlayed = video.IsPlayed(user);
|
||||
var isVideoPlayed = video.IsPlayed(user, userItemData);
|
||||
statusCode = await taApi.SetWatchedStatus(videoYTId, isVideoPlayed).ConfigureAwait(true);
|
||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
||||
{
|
||||
|
||||
@@ -30,15 +30,15 @@ The plugin interacts with TubeArchivist APIs to fetch videos and channels metada
|
||||
|
||||
## Installation
|
||||
### From official repository (recommended)
|
||||
1. Go to `Dashboard -> Plugins` and select the `Repositories` tab
|
||||
1. Go to `Dashboard -> Plugins` and click on the `Manage Repositories` button
|
||||
2. Add a new repository with the following details:
|
||||
- Repository name: `TubeArchivistMetadata`
|
||||
- Repository URL: `https://github.com/tubearchivist/tubearchivist-jf-plugin/raw/master/manifest.json`
|
||||

|
||||

|
||||
|
||||
3. Go to the `Catalog` tab
|
||||
4. Find `TubeArchivistMetadata` in the `Metadata` section and install it
|
||||

|
||||
3. Go back to the catalog
|
||||
4. Find `TubeArchivistMetadata` and install it
|
||||

|
||||
5. Restart Jellyfin to apply the changes
|
||||
|
||||
### From ZIP in GitHub releases
|
||||
@@ -93,7 +93,7 @@ In the second field you can specify the interval in seconds the task should run
|
||||
|
||||
## Build
|
||||
|
||||
1. To build this plugin you will need [.Net 8.x](https://dotnet.microsoft.com/download/dotnet/8.0).
|
||||
1. To build this plugin you will need [.Net 9.x](https://dotnet.microsoft.com/download/dotnet/9.0).
|
||||
|
||||
2. Build plugin with following command
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user