dkanada / jellyfin-plugin-intros

Intros Plugin for Jellyfin
GNU General Public License v3.0
180 stars 38 forks source link

specific notification for preroll being added #47

Open mattheweigand opened 1 year ago

mattheweigand commented 1 year ago

Hi, I have notifications plugin set up to notify me via telegram when things happen on my server. I also have the Intros plugin installed. Each time an intro is played, I get a notification on Telegram that new media has been added to my server. I use videos that I uploaded to Vimeo as my prerolls, so the format of the message is

"\<Vimeo video name> has been added to your media library."

This happens every single time a preroll video plays. Now I am personally interested in knowing each time someone plays one of my prerolls. But I don't want to pass this information along to others. I've noticed that this notification falls under the category of "New content added" on the basic Jellyfin configuration, so when I turn that on or off, of choose who gets the "New content added" notification, that person receives notifications both when a new file is added to the server and when a preroll video is played.

What I want to do is differentiate between when new content is added and when someone plays a preroll, so I can send a notification that new content has been added to a discussion group of users, but get a personal notification when someone plays a preroll. So far I have set up a system so that notifications for just me go to administrators, while notifications for everyone go to users. But there's no differentiation between "new content added" that is a TV show or movie and "new content added" that is a preroll played. Also, technically the preroll is not new content added so its kindof a bug. is there a way to change how this works?

mattheweigand commented 1 year ago

I guess its this part of the code in IntroManager.cs

            // insert the video into the database
            // no clue why this is required if a method doesn't exist on the interface
            Plugin.LibraryManager.CreateItem(video, null);
        }