Class SaveFolder

java.lang.Object
com.lariflix.jemm.core.SaveFolder

public class SaveFolder extends Object
This class is responsible for managing and save folder items in Jellyfin Server.
Since:
1.0
Author:
Cesar Bianchi
See Also:
  • Constructor Details

    • SaveFolder

      public SaveFolder()
      Default constructor for the SaveFolder class.
      Since:
      1.0
    • SaveFolder

      public SaveFolder(JellyfinInstanceDetails inst, String cFolderID, String IDItem, JellyfinParameters jemmParam, String jellyfinURL, String apiToken)
      Constructor for the SaveFolder class.
      Parameters:
      inst - The Jellyfin instance details.
      cFolderID - The ID of the folder.
      IDItem - The ID of the item.
      jellyfinURL - The URL of the Jellyfin server.
      apiToken - The API token for accessing the Jellyfin server.
      nOpc - The option number.
      Since:
      1.0
  • Method Details

    • postUpdates

      public int postUpdates() throws MalformedURLException, IOException, org.json.simple.parser.ParseException
      Posts updates about folders to the Jellyfin server.
      Returns:
      The HTTP response code from the server.
      Throws:
      MalformedURLException - If the provided URL is not valid.
      IOException - If an I/O error occurs.
      org.json.simple.parser.ParseException - If there is an error parsing the server's response.
      Since:
      1.0
    • getInstance

      public JellyfinInstanceDetails getInstance()
      Gets the Jellyfin instance details.
      Returns:
      The Jellyfin instance details.
      Since:
      1.0
    • setInstance

      public void setInstance(JellyfinInstanceDetails instance)
      Sets the Jellyfin instance details.
      Parameters:
      instance - The Jellyfin instance details.
      Since:
      1.0
    • getJellyfinInstanceUrl

      public String getJellyfinInstanceUrl()
      Gets the Jellyfin instance URL.
      Returns:
      The Jellyfin instance URL.
      Since:
      1.0
    • setJellyfinInstanceUrl

      public void setJellyfinInstanceUrl(String jellyfinInstanceUrl)
      Sets the Jellyfin instance URL.
      Parameters:
      jellyfinInstanceUrl - The Jellyfin instance URL.
      Since:
      1.0
    • getApiToken

      public String getApiToken()
      Gets the API token.
      Returns:
      The API token.
      Since:
      1.0
    • setApiToken

      public void setApiToken(String apiToken)
      Sets the API token.
      Parameters:
      apiToken - The API token.
      Since:
      1.0
    • getnOpc

      public JellyfinParameters getnOpc()
      Gets the option number.
      Returns:
      The option number.
      Since:
      1.0
    • setnOpc

      public void setnOpc(JellyfinParameters jemmParam)
      Sets the option number.
      Parameters:
      nOpc - The option number.
      Since:
      1.0
    • getItemID

      public String getItemID()
      Gets the item ID.
      Returns:
      The item ID.
      Since:
      1.0
    • setItemID

      public void setItemID(String itemID)
      Sets the item ID.
      Parameters:
      itemID - The item ID.
      Since:
      1.0
    • getcFolderID

      public String getcFolderID()
      Gets the folder ID.
      Returns:
      The folder ID.
      Since:
      1.0
    • setcFolderID

      public void setcFolderID(String cFolderID)
      Sets the folder ID.
      Parameters:
      cFolderID - The folder ID.
      Since:
      1.0
    • getFullURL

      public String getFullURL()
      Constructs the full URL for update the items on the Jellyfin server. The URL is constructed based on the option number. If the option number is JUST_FOLDER_ITEM, the folder ID is used. If the option number is JUST_CONTENT_ITEM, the item ID is used.
      Returns:
      The full URL as a string.
      Since:
      1.0