Metadata (detailed information)
Perfect! Your add-on now shows a catalog of movies. But when users click on a movie, they see only basic information. Let's add rich, detailed metadata to make your content more engaging and informative.
Meta provides comprehensive information about each item - think of it as the detailed movie page with plot summaries, cast information, ratings, and more.
Understanding metadata
Metadata is the detailed information that appears when users click on content. For movies with IMDb IDs (like the ones in your catalog), EMET Surf automatically provides this information. But what about content that isn't in IMDb?
When you need custom metadata:
- Indie films or original content
- Videos you've created yourself
- Content from niche sources
- Any content without a standard IMDb ID
Updating your manifest
To provide custom metadata, you need to tell EMET Surf which content you'll handle. Add this to your manifest:
{
"id": "my.first.emet.addon",
"version": "1.0.0",
"name": "Hello, World",
"description": "My first EMET Surf add-on",
"logo": "https://example.com/logo-256.png",
"resources": [
"catalog",
{
"name": "meta",
"types": ["movie"],
"idPrefixes": ["hiwrld_"]
}
],
"types": ["movie"],
"catalogs": [
{"id": "movieCatalog", "type": "movie", "name": "Hello, Movies"}
]
}
What changed:
- Added a
metaresource object to theresourcesarray types: What content types you'll provide metadata foridPrefixes: Which content IDs your add-on will handle
Understanding ID prefixes:
The idPrefixes array tells EMET Surf which content your add-on can provide metadata for. In this example, any content with an ID starting with hiwrld_ will be handled by your add-on.
Adding custom content to your catalog
Let's add a custom movie that isn't in IMDb. Update your catalog to include this new item:
{
"metas": [
{
"type": "movie",
"id": "tt0032138",
"name": "The Wizard of Oz",
"poster": "https://images.metahub.space/poster/medium/tt0032138/img",
"genres": ["Adventure", "Family", "Fantasy", "Musical"]
},
{
"type": "movie",
"id": "tt0017136",
"name": "Metropolis",
"poster": "https://images.metahub.space/poster/medium/tt0017136/img",
"genres": ["Drama", "Sci-Fi"]
},
{
"id": "hiwrld_jellyfish",
"type": "movie",
"name": "Jellyfish",
"poster": "https://images.unsplash.com/photo-1496108493338-3b30de66f9be",
"genres": ["Demo", "Nature"]
}
]
}
This adds a custom jellyfish video with the ID hiwrld_jellyfish - notice it starts with our prefix!
Creating the metadata structure
EMET Surf expects metadata files in a specific folder structure. Create the directories:
On Windows:
mkdir meta
mkdir meta\movie
On Mac/Linux:
mkdir -p meta/movie
Your file structure should now look like:
my-emet-addon/
├── manifest.json
├── catalog/
│ └── movie/
│ └── movieCatalog.json
└── meta/
└── movie/
└── hiwrld_jellyfish.json
Providing detailed metadata
Create the file meta/movie/hiwrld_jellyfish.json with comprehensive information:
{
"meta": {
"id": "hiwrld_jellyfish",
"type": "movie",
"name": "Jellyfish",
"poster": "https://images.unsplash.com/photo-1496108493338-3b30de66f9be",
"genres": ["Demo", "Nature"],
"description": "A beautiful video clip featuring graceful jellyfish in their natural habitat. Perfect for testing media streaming and providing a calming visual experience.",
"cast": ["Various jellyfish species"],
"director": ["Nature"],
"logo": "https://example.com/jellyfish-logo.png",
"background": "https://images.unsplash.com/photo-1461783470466-185038239ee3",
"runtime": "30 sec",
"releaseInfo": "2024",
"imdbRating": 8.5,
"year": 2024
}
}
Key metadata fields:
description: Detailed plot summary or content descriptioncast: Who appears in the contentdirector: Who created or directed the contentlogo: A logo image for the content (different from poster)background: A wide background image for the detail pageruntime: How long the content isreleaseInfo: When it was releasedimdbRating: Rating (even for non-IMDb content)year: Release year
External database IDs: You can include external database identifiers to help connect your metadata with other add-ons and services:
{
"meta": {
"id": "hiwrld_jellyfish",
"type": "movie",
"name": "Jellyfish",
"poster": "https://images.unsplash.com/photo-1496108493338-3b30de66f9be",
"genres": ["Demo", "Nature"],
"description": "A beautiful video clip featuring graceful jellyfish...",
"cast": ["Various jellyfish species"],
"director": ["Nature"],
"logo": "https://example.com/jellyfish-logo.png",
"background": "https://images.unsplash.com/photo-1461783470466-185038239ee3",
"runtime": "30 sec",
"releaseInfo": "2024",
"imdbRating": 8.5,
"year": 2024,
"imdb_id": "tt1234567",
"tmdb_id": "12345"
}
}
Available external IDs:
imdb_id: IMDb identifier (e.g., "tt0032138")tmdb_id: The Movie Database identifier (e.g., "630")
Providing these IDs helps EMET Surf connect metadata between different add-ons and provides better content discovery and organization.
Genre IDs: You can specify which genres a meta item belongs to using numeric genre IDs that match the genres defined in your manifest:
{
"meta": {
"id": "hiwrld_jellyfish",
"type": "movie",
"name": "Jellyfish",
"poster": "https://images.unsplash.com/photo-1496108493338-3b30de66f9be",
"genres": ["Demo", "Nature"],
"description": "A beautiful video clip featuring graceful jellyfish...",
"cast": ["Various jellyfish species"],
"director": ["Nature"],
"logo": "https://example.com/jellyfish-logo.png",
"background": "https://images.unsplash.com/photo-1461783470466-185038239ee3",
"runtime": "30 sec",
"releaseInfo": "2024",
"imdbRating": 8.5,
"year": 2024,
"imdb_id": "tt1234567",
"tmdb_id": "12345",
"genreIds": [28, 12]
}
}
Genre ID benefits:
genreIds: Array of numeric genre IDs that correspond to your manifest's genre definitions- Enables automatic genre-based filtering and categorization
- Works with catalog
genreIdsfor consistent content organization - Supports multi-language genre names through manifest definitions
Example catalog item with genre IDs:
{
"metas": [
{
"genreIds": [12, 28],
"id": 1061474,
"imdb_id": "tt5950044",
"tmdb_id": "1061474",
"logo": "https://images.metahub.space/logo/medium/tt5950044/img",
"name": "Superman",
"description": "Superman, a journalist in Metropolis, embarks on a journey to reconcile his Kryptonian heritage with his human upbringing as Clark Kent."
}
]
}
Advanced metadata features
EMET Surf supports several optional metadata features:
Optional flags
Users can request additional data by adding parameters to the metadata request:
{
"meta": {
// ... basic metadata ...
"videos": [
{
"season": 1,
"episode": 1,
"id": "hiwrld_jellyfish:1:1",
"title": "Jellyfish Episode 1"
}
]
}
}
Available flags:
withSeasons: Include season/episode breakdown for serieswithTrailers: Include trailer information if available
Language support
Provide metadata in different languages by using the language parameter in requests.
EPG (Electronic Program Guide) for TV channels
For TV channels and live content, you can provide EPG (Electronic Program Guide) information that shows upcoming programs and schedules. This helps users see what's currently playing and what's coming up next.
Update manifest
You need to include epg in extraSupported of your manifest to let EMET Surf know that your add-on supports EPG.
{
//...
"extraSupported": [
"epg"
]
}
EPG structure for TV channels
{
"meta": {
"id": "channel_example",
"type": "channel",
"name": "Example TV Channel",
"poster": "https://example.com/channel-logo.png",
"description": "A 24/7 news and entertainment channel",
"epg": [
{
"title": "Morning News",
"description": "Latest breaking news and weather updates",
"start_timestamp": 1754767680,
"stop_timestamp": 1754774040
},
{
"title": "Talk Show",
"description": "Live discussion with celebrity guests",
"start_timestamp": 1754774040,
"stop_timestamp": 1754780400
},
{
"title": "Movie Night",
"description": "Classic films and new releases",
"start_timestamp": 1754780400,
"stop_timestamp": 1754793120
}
]
}
}
EPG field descriptions
title: The name of the program or showdescription: Detailed information about the program contentstart_timestamp: Unix timestamp when the program startsstop_timestamp: Unix timestamp when the program ends
EPG best practices
- Provide at least 24 hours of programming information
- Update EPG data regularly to keep schedules current
- Use clear, descriptive titles and descriptions
- Ensure timestamps are accurate and in the correct timezone
- Include program categories or genres when possible
Testing your metadata
- Update your manifest with the meta resource
- Add the custom content to your catalog
- Create the metadata file with detailed information
- Reinstall your add-on in EMET Surf
- Click on the Jellyfish movie - you should see rich, detailed information!
Watch your server logs - you'll see requests like:
GET /meta/movie/hiwrld_jellyfish.json 200 2.1ms - 456
What you've accomplished
- Added custom metadata support to your add-on
- Created detailed information for custom content
- Learned about ID prefixes and resource filtering
- Understood the metadata file structure
- Discovered advanced metadata features
What's next?
Your add-on now provides rich, detailed information! But users still can't actually watch the content. In the next step, we'll add streams - the actual video files or sources that users can play.
Summary
- Metadata provides detailed information about content
- Use ID prefixes to specify which content your add-on handles
- Create metadata files at
meta/type/id.json - Include comprehensive information: description, cast, director, etc.
- EMET Surf supports optional flags for additional data
- Your add-on now provides rich, detailed content information!