• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Development Plugin Development Help for creating a plugin

     
    • 0 Vote(s) - 0 Average

    Help for creating a plugin

    Stoufiler
    Offline

    Junior Member

    Posts: 7
    Threads: 2
    Joined: 2023 Nov
    Reputation: 0
    #1
    2023-11-19, 02:39 PM
    Good morning,

    I'm trying to develop a plugin to wake up my server when a movie/series is started

    The media libraries are connected via NFS. I would like to send a Wake On Lan when a movie is started.

    However, trying the WebHook plugin which sends a webhook when a movie is started does not work when my file server is turned off.

    I would like to know if it is possible to retrieve the information when a movie is requested even before opening the file on the remote server. So that I can wake up my server.

    If possible could you help me develop this plugin?

    I don't know C# but I want to get this plugin to work

    THANKS !

    My Repo : https://github.com/StephanGR/jellyfin-plugin-wol
    crobibero
    Offline

    Core Team (Server & Plugins)

    Posts: 247
    Threads: 0
    Joined: 2023 Jun
    Reputation: 17
    Country:United States
    #2
    2023-11-19, 04:22 PM
    I don’t think there is a way to trigger a webhook “before” playback starts, but you could try having your server wake up if a user is active?
    Stoufiler
    Offline

    Junior Member

    Posts: 7
    Threads: 2
    Joined: 2023 Nov
    Reputation: 0
    #3
    2023-11-19, 04:35 PM
    Thanks for your reply

    Could you explain me why there is no way to trigger something "before" playback ?

    Server need to fetch data from file isnit ?

    So if I listen to call made for fetching data, at this point, I can wake up my server

    There is so much file in the repo of Server.
    Could you tell me which class can I overload to handle what I want ?

    It will be a big time saving
    Stoufiler
    Offline

    Junior Member

    Posts: 7
    Threads: 2
    Joined: 2023 Nov
    Reputation: 0
    #4
    2023-11-20, 02:27 PM
    Hello,

    If I understand correctly how works Jellyfin :

    This file : https://github.com/jellyfin/jellyfin/blo...ensions.cs implements all event services.

    There is no IEventConsumer about File being accessed so I need to create an IEventConsumer about it and then I access to it with a custom plugin ?

    is it good ?
    crobibero
    Offline

    Core Team (Server & Plugins)

    Posts: 247
    Threads: 0
    Joined: 2023 Jun
    Reputation: 17
    Country:United States
    #5
    2023-11-20, 02:32 PM
    You would need to set up the entire event pipeline, not just the consumer. I’m really not sure where you would add the hook, it would have to be somewhere before playback actually starts since playback will fail the first time.
    Stoufiler
    Offline

    Junior Member

    Posts: 7
    Threads: 2
    Joined: 2023 Nov
    Reputation: 0
    #6
    2023-11-20, 03:03 PM
    When the server on which my films are hosted is turned off and I start a video from the WEB, the Jellyfin logs tell me that a transcoding is starting, I could base myself on this and start my server by wake on lan with a bash script

    However there are no logs even if I put DBG in the config file, I have no log which tells me that the server will look for the files.
    I'm using Infuse to watch films

    I've only this :
    [2023-11-20 15:02:32.026 +00:00] [DBG] AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
    [2023-11-20 15:02:32.026 +00:00] [DBG] AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
    [2023-11-20 15:03:05.007 +00:00] [DBG] AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
    [2023-11-20 15:03:05.007 +00:00] [DBG] AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode