sok.media.video.movie
Movie media class for video organization.
Provides the Movie class for searching, retrieving metadata, and organizing movie files with proper naming conventions.
Movie
class Movie(name: str, language: str, media_manager: UniversalMediaManager)Bases: BaseMedia
Class for managing movies.
Provides functionality to search for movies, retrieve detailed information, and compute formatted names for file organization.
Initialize a Movie instance.
Parameters
| Name | Type | Description |
|---|---|---|
name | str | The movie name. |
language | str | Language code (e.g., 'fr', 'en'). |
media_manager | UniversalMediaManager | The API manager instance. |
Attributes
| Name | Type | Description |
|---|---|---|
director | Optional[str] | Movie director name. |
genres | List[str] | List of genre names. |
runtime | Optional[int] | Duration in minutes. |
year | Optional[int] | Movie release year. |
get_detailsasync
async def get_details() -> None:Retrieve detailed movie information.
Fills the attributes: year, director, runtime, genres, etc.
Raises
ValueErrorIf no ID found for the movie.
get_folder_structure
def get_folder_structure() -> List[str]:Return the recommended folder structure for the movie.
Returns
List[str]List containing the movie folder name.
get_formatted_name
def get_formatted_name() -> str:Return the formatted movie name with the year.
Returns
strFormatted name (e.g., 'Inception (2010)').