Closed AnthonyMusgrove closed 4 years ago
After researching this issue, it was simply due to the fact that after an item was deleted, its parent was null, so therefore not being able to reference to its parent item/object, preventing ScripterX from tracing the parent back to a VirtualFolder (or library).
The issue has now been rectified - the core event from librarymanager explicitly provides the deleted item's parent as a parameter of the event arguments; which is now utilised correctly.
I've tested both Movies and TV content types, and ScripterX is now able to trace back to the VirtualFolder for all types of media, please see output below:
onItemAdded: 2020-04-23 16:03:38.866 Info Emby ScripterX: Output from script '/c D:\embyscripts\media.bat ADDED 12113 "The Simpsons S23X01 2 Maggie Simpson in The Longest Daycare - Copy" "D:\Media\Movies\The Simpsons S23X01 2 Maggie Simpson in The Longest Daycare - Copy.mp4" "Movies"'
onItemRemoved 2020-04-23 16:13:17.550 Info Emby ScripterX: onItemRemoved: REMOVED 12115 "Death Has a Shadow" "D:\Media\TV\Family Guy\S01\S01E01 - Death Has A Shadow - Copy.avi" "TV"
Describe the bug When using onItemRemoved, %item.library.*% tokens are not substituted for values
To Reproduce Steps to reproduce the behavior:
Expected behavior %item.library.name% should be substituted for its correct value, in this case 'Movies'
Screenshots n/a