A professional Windows desktop utility that automatically sets custom icons for TV series folders and embeds artwork in movie files using intelligent media type detection.
- Automatic Media Type Detection: Distinguishes between TV series and movies
- Intelligent Folder Analysis: Recognizes season/episode structures
- Multi-Format Support: Handles various video file formats
- πΊ TV Series: Custom folder icons using Windows
desktop.ini
system - π¬ Movies: Embedded artwork directly in video files using FFmpeg
- πΌοΈ High-Quality Icons: Converts posters to proper
.ico
format
- TMDB (The Movie Database) - Primary source for movies and TV shows
- OMDb (Open Movie Database) - Backup for movies and TV shows
- TVmaze - Specialized TV show database
- AniList - Anime and manga database
- Smart Fallbacks - Automatic failover between APIs
- Windows Explorer: TV series folders display custom poster icons
- Media Players: Movies show embedded artwork (VLC, Windows Media Player, etc.)
- File Properties: Right-click movie files show poster thumbnails
- Media Centers: Plex, Jellyfin, Emby automatically use embedded artwork
- Visual Organization: Instant visual identification of media content
π Media/
βββ π GameOfThrones/ # Generic folder icon
β βββ π Season1/
β βββ π Season2/
βββ π Inception/ # Generic folder icon
βββ π₯ Inception.mp4 # No embedded artwork
π Media/
βββ πΌοΈ GameOfThrones/ # β
Custom poster folder icon
β βββ π Season1/
β βββ π Season2/
β βββ π desktop.ini # β
Windows icon config
β βββ π¨ folder.ico # β
Poster in .ico format
β βββ πΌοΈ poster.jpg # β
Original poster
βββ π Inception/ # Standard folder
βββ π₯ Inception.mp4 # β
Contains embedded poster artwork
βββ π Inception.mp4.backup # β
Original backup
βββ πΌοΈ poster.jpg # β
Original poster
- Windows 10+ (Windows 11 recommended)
- Python 3.8+
- FFmpeg (for movie artwork embedding)
-
Install FFmpeg
# Using winget (recommended) winget install "FFmpeg (Essentials Build)"
-
Install Smart Media Icon System
# Clone the repository git clone https://github.com/yourusername/smart-media-icon.git cd smart-media-icon # Install dependencies pip install -r requirements.txt # Optional: Install as package pip install -e .
-
Quick Test
python main.py --help
# Process current directory
python main.py
# Process specific directory
python main.py "C:\Media"
# Verbose output
python main.py "D:\Movies" --verbose
# Custom configuration
python main.py "E:\TV" --config myconfig.json
Create config.json
(optional - system works with defaults):
{
"TMDB_API_KEY": "your_tmdb_api_key_here",
"OMDB_API_KEY": "your_omdb_api_key_here",
"TVMAZE_API_KEY": "your_tvmaze_api_key_here",
"ANILIST_API_KEY": "your_anilist_api_key_here",
"USE_CACHE": true,
"USE_MOCK_API": false
}
# Series Detection Logic
if folder_contains_season_subdirectories:
media_type = "series" β Apply folder icon strategy
# Movie Detection Logic
elif folder_contains_single_media_file:
media_type = "movie" β Apply FFmpeg artwork embedding
graph TD
A[Scan Directory] --> B{Analyze Structure}
B -->|Has Seasons| C[TV Series Detected]
B -->|Single File| D[Movie Detected]
C --> E[Fetch TV Poster]
D --> F[Fetch Movie Poster]
E --> G[Set Folder Icon]
F --> H[Embed Artwork]
G --> I[Success]
H --> I
- Downloads poster from API
- Converts to
.ico
format - Creates
desktop.ini
configuration - Sets Windows folder attributes
- Result: Custom folder icon in Windows Explorer
- Downloads movie poster
- Uses FFmpeg to embed as video metadata
- Creates backup of original file
- Result: Media players show embedded poster
.mp4
,.mkv
,.avi
,.mov
,.wmv
.flv
,.webm
,.m4v
,.mpg
,.mpeg
.m2v
,.3gp
,.ts
,.mts
,.vob
.jpg
,.jpeg
,.png
,.bmp
,.gif
- Automatic conversion to
.ico
for Windows
from smart_media_icon import SmartIconSetter, Config
# Initialize with config
config = Config('config.json')
setter = SmartIconSetter(config)
# Process directory
success_count = setter.process_media_collection('/path/to/media')
print(f"Processed {success_count} items successfully")
from smart_media_icon.utils import Config
config = Config()
config.USE_MOCK_API = True # For testing
config.USE_CACHE = False # Disable caching
setter = SmartIconSetter(config)
cd examples
python usage_examples.py
# Create test structure
mkdir test_media
mkdir "test_media/GameOfThrones"
mkdir "test_media/GameOfThrones/Season1"
echo "test" > "test_media/GameOfThrones/Season1/episode01.mp4"
# Process test directory
python main.py test_media --verbose
smart-media-icon/
βββ π src/smart_media_icon/ # Core package
β βββ π core/ # Core functionality
β β βββ icon_setter.py # Main orchestration
β β βββ ffmpeg_handler.py # FFmpeg operations
β β βββ windows_icons.py # Windows folder icons
β βββ π apis/ # API integrations
β β βββ media_api.py # Multi-API poster fetching
β βββ π utils/ # Utilities
β β βββ config.py # Configuration management
β βββ cli.py # Command line interface
βββ π docs/ # Documentation
β βββ API.md # API reference
βββ π examples/ # Usage examples
β βββ usage_examples.py # Example scripts
βββ main.py # Main entry point
βββ setup.py # Package setup
βββ requirements.txt # Dependencies
βββ config.json # Configuration file
βββ README.md # This file
# Verify FFmpeg installation
ffmpeg -version
# Install if missing
winget install "FFmpeg (Essentials Build)"
- Restart Windows Explorer:
Ctrl+Shift+Esc
β Restart "Windows Explorer" - Check Attributes: Folder should have System + Read-only attributes
- Verify Files: Check
desktop.ini
exists with Hidden + System attributes
- System includes intelligent rate limiting and caching
- Mock API provides fallback when real APIs are unavailable
- Cache prevents repeated API calls for same content
- Run as Administrator if accessing system directories
- Ensure write permissions for target directories
- Check antivirus software isn't blocking file operations
# Clone repository
git clone https://github.com/yourusername/smart-media-icon.git
cd smart-media-icon
# Install in development mode
pip install -e .[dev]
# Run tests
pytest
# Format code
black src/
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure code follows style guidelines
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- TMDB - Comprehensive movie and TV database
- FFmpeg - Powerful multimedia framework
- Pillow - Image processing library
- Microsoft - Windows API and desktop integration
- Documentation: API Reference
- Examples: Usage Examples
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with β€οΈ for the media enthusiast community