jellyfin.generated.api_10_11.LibraryStructureApi
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
add_media_path | POST /Library/VirtualFolders/Paths | Add a media path to a library. |
add_virtual_folder | POST /Library/VirtualFolders | Adds a virtual folder. |
get_virtual_folders | GET /Library/VirtualFolders | Gets all virtual folders. |
remove_media_path | DELETE /Library/VirtualFolders/Paths | Remove a media path. |
remove_virtual_folder | DELETE /Library/VirtualFolders | Removes a virtual folder. |
rename_virtual_folder | POST /Library/VirtualFolders/Name | Renames a virtual folder. |
update_library_options | POST /Library/VirtualFolders/LibraryOptions | Update library options. |
update_media_path | POST /Library/VirtualFolders/Paths/Update | Updates a media path. |
add_media_path
add_media_path(media_path_dto, refresh_library=refresh_library)
Add a media path to a library.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.models.media_path_dto import MediaPathDto
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
media_path_dto = jellyfin.generated.api_10_11.MediaPathDto() # MediaPathDto | The media path dto.
refresh_library = False # bool | Whether to refresh the library. (optional) (default to False)
try:
# Add a media path to a library.
api_instance.add_media_path(media_path_dto, refresh_library=refresh_library)
except Exception as e:
print("Exception when calling LibraryStructureApi->add_media_path: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
media_path_dto | MediaPathDto | The media path dto. | |
refresh_library | bool | Whether to refresh the library. | [optional] [default to False] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json, text/json, application/*+json
- Accept: text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Media path added. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
add_virtual_folder
add_virtual_folder(name=name, collection_type=collection_type, paths=paths, refresh_library=refresh_library, add_virtual_folder_dto=add_virtual_folder_dto)
Adds a virtual folder.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.models.add_virtual_folder_dto import AddVirtualFolderDto
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
name = 'name_example' # str | The name of the virtual folder. (optional)
collection_type = jellyfin.generated.api_10_11.CollectionTypeOptions() # CollectionTypeOptions | The type of the collection. (optional)
paths = ['paths_example'] # List[str] | The paths of the virtual folder. (optional)
refresh_library = False # bool | Whether to refresh the library. (optional) (default to False)
add_virtual_folder_dto = jellyfin.generated.api_10_11.AddVirtualFolderDto() # AddVirtualFolderDto | The library options. (optional)
try:
# Adds a virtual folder.
api_instance.add_virtual_folder(name=name, collection_type=collection_type, paths=paths, refresh_library=refresh_library, add_virtual_folder_dto=add_virtual_folder_dto)
except Exception as e:
print("Exception when calling LibraryStructureApi->add_virtual_folder: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the virtual folder. | [optional] |
collection_type | CollectionTypeOptions | The type of the collection. | [optional] |
paths | List[str] | The paths of the virtual folder. | [optional] |
refresh_library | bool | Whether to refresh the library. | [optional] [default to False] |
add_virtual_folder_dto | AddVirtualFolderDto | The library options. | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json, text/json, application/*+json
- Accept: text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Folder added. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_virtual_folders
List[VirtualFolderInfo] get_virtual_folders()
Gets all virtual folders.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.models.virtual_folder_info import VirtualFolderInfo
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
try:
# Gets all virtual folders.
api_response = api_instance.get_virtual_folders()
print("The response of LibraryStructureApi->get_virtual_folders:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LibraryStructureApi->get_virtual_folders: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase", text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | Virtual folders retrieved. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_media_path
remove_media_path(name=name, path=path, refresh_library=refresh_library)
Remove a media path.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
name = 'name_example' # str | The name of the library. (optional)
path = 'path_example' # str | The path to remove. (optional)
refresh_library = False # bool | Whether to refresh the library. (optional) (default to False)
try:
# Remove a media path.
api_instance.remove_media_path(name=name, path=path, refresh_library=refresh_library)
except Exception as e:
print("Exception when calling LibraryStructureApi->remove_media_path: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the library. | [optional] |
path | str | The path to remove. | [optional] |
refresh_library | bool | Whether to refresh the library. | [optional] [default to False] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Media path removed. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_virtual_folder
remove_virtual_folder(name=name, refresh_library=refresh_library)
Removes a virtual folder.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
name = 'name_example' # str | The name of the folder. (optional)
refresh_library = False # bool | Whether to refresh the library. (optional) (default to False)
try:
# Removes a virtual folder.
api_instance.remove_virtual_folder(name=name, refresh_library=refresh_library)
except Exception as e:
print("Exception when calling LibraryStructureApi->remove_virtual_folder: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the folder. | [optional] |
refresh_library | bool | Whether to refresh the library. | [optional] [default to False] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Folder removed. | - |
404 | Folder not found. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
rename_virtual_folder
rename_virtual_folder(name=name, new_name=new_name, refresh_library=refresh_library)
Renames a virtual folder.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
name = 'name_example' # str | The name of the virtual folder. (optional)
new_name = 'new_name_example' # str | The new name. (optional)
refresh_library = False # bool | Whether to refresh the library. (optional) (default to False)
try:
# Renames a virtual folder.
api_instance.rename_virtual_folder(name=name, new_name=new_name, refresh_library=refresh_library)
except Exception as e:
print("Exception when calling LibraryStructureApi->rename_virtual_folder: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the virtual folder. | [optional] |
new_name | str | The new name. | [optional] |
refresh_library | bool | Whether to refresh the library. | [optional] [default to False] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase", text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Folder renamed. | - |
404 | Library doesn't exist. | - |
409 | Library already exists. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_library_options
update_library_options(update_library_options_dto=update_library_options_dto)
Update library options.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.models.update_library_options_dto import UpdateLibraryOptionsDto
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
update_library_options_dto = jellyfin.generated.api_10_11.UpdateLibraryOptionsDto() # UpdateLibraryOptionsDto | The library name and options. (optional)
try:
# Update library options.
api_instance.update_library_options(update_library_options_dto=update_library_options_dto)
except Exception as e:
print("Exception when calling LibraryStructureApi->update_library_options: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
update_library_options_dto | UpdateLibraryOptionsDto | The library name and options. | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase", text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Library updated. | - |
404 | Item not found. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_media_path
update_media_path(update_media_path_request_dto)
Updates a media path.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_11
from jellyfin.generated.api_10_11 import ApiClient, Configuration
from jellyfin.generated.api_10_11.models.update_media_path_request_dto import UpdateMediaPathRequestDto
from jellyfin.generated.api_10_11.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_11.LibraryStructureApi(api_client)
update_media_path_request_dto = jellyfin.generated.api_10_11.UpdateMediaPathRequestDto() # UpdateMediaPathRequestDto | The name of the library and path infos.
try:
# Updates a media path.
api_instance.update_media_path(update_media_path_request_dto)
except Exception as e:
print("Exception when calling LibraryStructureApi->update_media_path: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
update_media_path_request_dto | UpdateMediaPathRequestDto | The name of the library and path infos. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json, text/json, application/*+json
- Accept: text/html
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Media path updated. | - |
503 | The server is currently starting or is temporarily not available. | * Retry-After - A hint for when to retry the operation in full seconds. * Message - A short plain-text reason why the server is not available. |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]