Package com.lariflix.jemm.core
Class SaveFolder
java.lang.Object
com.lariflix.jemm.core.SaveFolder
This class is responsible for managing and save folder items in Jellyfin Server.
- Since:
- 1.0
- Author:
- Cesar Bianchi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the SaveFolder class.SaveFolder
(JellyfinInstanceDetails inst, String cFolderID, String IDItem, JellyfinParameters jemmParam, String jellyfinURL, String apiToken) Constructor for the SaveFolder class. -
Method Summary
Modifier and TypeMethodDescriptionGets the API token.Gets the folder ID.Constructs the full URL for update the items on the Jellyfin server.Gets the Jellyfin instance details.Gets the item ID.Gets the Jellyfin instance URL.getnOpc()
Gets the option number.int
Posts updates about folders to the Jellyfin server.void
setApiToken
(String apiToken) Sets the API token.void
setcFolderID
(String cFolderID) Sets the folder ID.void
setInstance
(JellyfinInstanceDetails instance) Sets the Jellyfin instance details.void
Sets the item ID.void
setJellyfinInstanceUrl
(String jellyfinInstanceUrl) Sets the Jellyfin instance URL.void
setnOpc
(JellyfinParameters jemmParam) Sets the option number.
-
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.ParseExceptionPosts 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
Gets the Jellyfin instance details.- Returns:
- The Jellyfin instance details.
- Since:
- 1.0
-
setInstance
Sets the Jellyfin instance details.- Parameters:
instance
- The Jellyfin instance details.- Since:
- 1.0
-
getJellyfinInstanceUrl
Gets the Jellyfin instance URL.- Returns:
- The Jellyfin instance URL.
- Since:
- 1.0
-
setJellyfinInstanceUrl
Sets the Jellyfin instance URL.- Parameters:
jellyfinInstanceUrl
- The Jellyfin instance URL.- Since:
- 1.0
-
getApiToken
Gets the API token.- Returns:
- The API token.
- Since:
- 1.0
-
setApiToken
Sets the API token.- Parameters:
apiToken
- The API token.- Since:
- 1.0
-
getnOpc
Gets the option number.- Returns:
- The option number.
- Since:
- 1.0
-
setnOpc
Sets the option number.- Parameters:
nOpc
- The option number.- Since:
- 1.0
-
getItemID
Gets the item ID.- Returns:
- The item ID.
- Since:
- 1.0
-
setItemID
Sets the item ID.- Parameters:
itemID
- The item ID.- Since:
- 1.0
-
getcFolderID
Gets the folder ID.- Returns:
- The folder ID.
- Since:
- 1.0
-
setcFolderID
Sets the folder ID.- Parameters:
cFolderID
- The folder ID.- Since:
- 1.0
-
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
-