Fix JF crash when setting watched status with TA offline
This commit is contained in:
@@ -199,10 +199,17 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var statusCode = await TubeArchivistApi.GetInstance().SetWatchedStatus(itemYTId, isPlayed).ConfigureAwait(true);
|
try
|
||||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
|
||||||
{
|
{
|
||||||
Logger.LogCritical("POST /watched returned {StatusCode} for item {ItemName} ({VideoYTId}) with watched status {IsPlayed}", statusCode, eventArgs.Item.Name, itemYTId, isPlayed);
|
var statusCode = await TubeArchivistApi.GetInstance().SetWatchedStatus(itemYTId, isPlayed).ConfigureAwait(true);
|
||||||
|
if (statusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
Logger.LogCritical("POST /watched returned {StatusCode} for item {ItemName} ({VideoYTId}) with watched status {IsPlayed}", statusCode, eventArgs.Item.Name, itemYTId, isPlayed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.LogCritical("An exception occurred while calling POST /watched for item {ItemName} ({VideoYTId}) with watched status {IsPlayed}: {ExceptionMessage}", eventArgs.Item.Name, itemYTId, isPlayed, ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,3 +15,4 @@ artifacts:
|
|||||||
- "Jellyfin.Plugin.TubeArchivistMetadata.dll"
|
- "Jellyfin.Plugin.TubeArchivistMetadata.dll"
|
||||||
changelog: >
|
changelog: >
|
||||||
Adapt to the new TA API changes
|
Adapt to the new TA API changes
|
||||||
|
Fix JF crash when setting watched status with TA offline
|
||||||
|
|||||||
Reference in New Issue
Block a user