Package com.lariflix.jemm.core
Class LoadItemMetadata
java.lang.Object
com.lariflix.jemm.core.LoadItemMetadata
This class is responsible for loading item metadata from the Jellyfin server.
- Since:
- 1.0
- Author:
- Cesar Bianchi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the LoadItemMetadata class.LoadItemMetadata
(String jellyfinURL, String apiToken, String cAdminID, String cItem) Constructor for the LoadItemMetadata class. -
Method Summary
Modifier and TypeMethodDescriptionGets the API token.Gets the ID of the item.Gets the ID of the admin user.Constructs the full URL for accessing the item on the Jellyfin server.Gets the Jellyfin instance URL.Requests item metadata from the Jellyfin server.void
setApiToken
(String apiToken) Sets the API token.void
setcItemID
(String cItemID) Sets the ID of the item.void
setcUserAdminID
(String cUserAdminID) Sets the ID of the admin user.void
setJellyfinInstanceUrl
(String jellyfinInstanceUrl) Sets the Jellyfin instance URL.
-
Constructor Details
-
LoadItemMetadata
public LoadItemMetadata()Default constructor for the LoadItemMetadata class.- Since:
- 1.0
-
LoadItemMetadata
Constructor for the LoadItemMetadata class.- Parameters:
jellyfinURL
- The URL of the Jellyfin server.apiToken
- The API token for accessing the Jellyfin server.cAdminID
- The ID of the admin user.cItem
- The ID of the item.- Since:
- 1.0
-
-
Method Details
-
requestItemMetadata
public JellyfinItemMetadata requestItemMetadata() throws MalformedURLException, IOException, org.json.simple.parser.ParseExceptionRequests item metadata from the Jellyfin server.- Returns:
- A JellyfinItemMetadata object containing the item metadata.
- 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
-
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
-
getcUserAdminID
Gets the ID of the admin user.- Returns:
- The ID of the admin user.
- Since:
- 1.0
-
setcUserAdminID
Sets the ID of the admin user.- Parameters:
cUserAdminID
- The ID of the admin user.- Since:
- 1.0
-
getcItemID
Gets the ID of the item.- Returns:
- The ID of the item.
- Since:
- 1.0
-
setcItemID
Sets the ID of the item.- Parameters:
cItemID
- The ID of the item.- Since:
- 1.0
-
getFullURL
Constructs the full URL for accessing the item on the Jellyfin server.- Returns:
- The full URL as a string.
- Since:
- 1.0
-