• 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 Plugins that add a 'code' field and insert its value into strm links.

     
    • 0 Vote(s) - 0 Average

    Plugins that add a 'code' field and insert its value into strm links.

    Maxy TV
    Offline

    Junior Member

    Posts: 19
    Threads: 9
    Joined: 2024 Jan
    Reputation: 0
    #1
    2024-01-21, 09:33 PM (This post was last modified: 2024-01-21, 09:34 PM by Maxy TV.)
    Hello Jellyfin community!

    I'm working on a personal project and I need a very specific plugin. I'm looking for a plugin that adds a 'code' field to be entered by a human, either through the admin control panel or via registration through an invitation link with jfa-go.

    Let's imagine that Peter enters his code, which is: 2578.

    Well, the thing is—I'm adding libraries to my server with strm files.

    Imagine the link for any movie, for example:
    http://movies.com/video/code/madagascar_2/
    This is the link that would be in the strm file.

    So, I would like that when Peter hits Play on the Madagascar 2 movie, the plugin takes his code (2578) and inserts it into the space marked 'code', like this:
    http://movies.com/video/2578/madagascar_2/

    I don't want it to change the link in the server's strm file with Peter's code; I want the video to be played from the client with Peter's link and code.

    I'm having trouble finding any Jellyfin/Emby plugin developers on the internet, and I'm not sure if I'm in the right place to find one.

    If anyone can help me or tell me where I can hire a developer, it would be appreciated.

    Thank you very much.
    crobibero
    Offline

    Core Team (Server & Plugins)

    Posts: 254
    Threads: 0
    Joined: 2023 Jun
    Reputation: 18
    Country:United States
    #2
    2024-01-22, 03:04 AM
    What you are asking for isn’t possible with how Jellyfin works.
    Maxy TV
    Offline

    Junior Member

    Posts: 19
    Threads: 9
    Joined: 2024 Jan
    Reputation: 0
    #3
    2024-01-22, 12:35 PM (This post was last modified: 2024-01-22, 12:38 PM by Maxy TV. Edited 1 time in total.)
    Let's break it down; I'll try to approach it differently and outline a workflow. I would appreciate it if you could confirm point by point whether each of them is possible or not, allowing me to assess options and possibilities with the resources I have.

    0.1: The plugin is capable of creating a 'code' field to be filled in during user registration. I think this is not impossible since I have seen plugins that add checkboxes to Jellyfin. Similar to how values like True or False are stored in the database attribute for checking or unchecking the box, an alphanumeric value could also be entered into an attribute in the database table.

    1. Within the plugin functions, there is a call to "PlayBackStart," which supposedly registers when a user hits play on a file.

    2. The plugin can be designed to communicate with the external; specifically, it could notify an external process that user X has started playing a specific movie. Is that possible? Alternatively, upon receiving the user's click, it could execute a pre-existing script in the operating system to handle part of the work.

    3. After receiving the user's playback notification, a program will be monitoring when this happens to call the script (if the plugin is unable to call the script after the play event occurs). This script will take care of retrieving the user's ID stored in the jellyfin.db database. I assume the notification will indicate which user performed the play action, allowing the script to find the code stored in that user's database.

    4. Once we have identified the file and the code, the OS script could replace the content of .strm by modifying (and saving) the place where 'code' is located with the code obtained from the user. It would revert the changes within a few seconds, only needing the time it takes for the client to grab its link.

    Now, Jellyfin should be able to play the .strm with the user's link. But of course, how do we ensure that Jellyfin takes the link with the modified code? Will Jellyfin take the unmodified link before the script can modify it?

    5. For this to be possible, we would need to make Jellyfin wait 1 or 2 seconds to take the link from the strm file to ensure that the script has enough time to make the modification. If delaying the connection is not possible, another approach could be to provoke a retry of the connection after 1 or 2 seconds.

    Thank you very much for all your help. If I achieve what I'm aiming for, it will be a very interesting project as it plans to integrate with Telegram's unlimited storage. This would result in almost negligible storage costs, with only the costs of hosting and running the Telegram bot (if the bot is implemented in the cloud) being necessary.
    niels
    Offline

    Core Team

    Posts: 255
    Threads: 4
    Joined: 2023 Jun
    Reputation: 14
    Country:Netherlands
    #4
    2024-01-22, 01:33 PM
    0.1: no, plugins can only provide configuration pages in the dashboard
    1: yes, there are events that a plugin can listen to
    2: yes, plugins are written with .NET which allows starting processes
    3: no, you cannot read the jellyfin database file when it is in use by the server
    4. no, the strm file is already read before the play event is emitted

    What you're trying to do is impossible and would require changes to the server (and clients) that we wouldn't accept. Additionally your idea of using Telegram as free file storage is most likely against their TOS.
    Maxy TV
    Offline

    Junior Member

    Posts: 19
    Threads: 9
    Joined: 2024 Jan
    Reputation: 0
    #5
    2024-01-22, 02:03 PM
    Thank you for your clarifications.

    In light of the possibilities you mentioned, which you said were feasible, I'm going to try exploring those options.

    Furthermore, allow me to tell you that yes, I understand it seems like a tough challenge. However, I have a lot of faith in this project and would like to continue attempting it.

    Regarding Telegram's Terms of Service, there is no impediment to using it as an unlimited cloud. In fact, many media outlets promote its use as an unlimited cloud, and we can even find applications like TeleDrive in the Microsoft Store.

    Thank you very much for the information.
    tmsrxzar
    Offline

    Senior Member

    Posts: 755
    Threads: 6
    Joined: 2023 Nov
    Reputation: 20
    #6
    2024-01-22, 02:26 PM
    have jellyfin serve files hosted on file sharing sites?
    sounds like every kodi pirate addon ever to me
    « 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