Fix: Prevent crash when playing non-TubeArchivist media
- Fixed incorrect variable ordering in OnPlaybackProgress causing duplicate declaration and wrong hierarchy traversal - Added type check to reject non-Episode items early - Prevents 'Guid can't be empty' exception when playing movies Fixes #60
This commit is contained in:
parent
bdd99441d1
commit
e301a24a39
|
|
@ -161,6 +161,12 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
|
|||
|
||||
if (Instance!.Configuration.JFTASync && eventArgs.Users.Any(u => Instance!.Configuration.JFUsernameFrom.Equals(u.Username, StringComparison.Ordinal)))
|
||||
{
|
||||
// Only process Episodes (YouTube videos), not Movies or other media types
|
||||
if (eventArgs.Item is not Episode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BaseItem? season = LibraryManager.GetItemById(eventArgs.Item.ParentId);
|
||||
BaseItem? channel = LibraryManager.GetItemById(season!.ParentId);
|
||||
BaseItem? collection = LibraryManager.GetItemById(channel!.ParentId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue