Supported Sources
YouTube
Import watch history from YouTube’s data export
YouTube Music
Import listening history from YouTube Music
Last.fm
Import scrobble history from Last.fm exports
YouTube History Import
Exporting YouTube Data
Request Your Data
- Visit Google Takeout
- Deselect all products
- Select only “YouTube and YouTube Music”
- Click “Next Step”
Configure Export
- Frequency: Export once
- File type: .zip
- Size: Maximum size (50GB)
Download Archive
Google will email you when the export is ready (usually 1-48 hours).Download the archive containing your YouTube data.
Importing to Namida
Select Files or Folder
Choose either:
- Individual JSON files (
watch-history.json) - Entire Takeout folder (Namida will find relevant files automatically)
- ZIP archive (extracts automatically)
Configure Import Options
Matching Options:
- Match by link: Use YouTube IDs from track comments/filenames
- Match by title & artist: Fuzzy matching algorithm
- Include YouTube: Match YouTube watches
- Include YouTube Music: Match YouTube Music listens
- Oldest date: Import only after this date
- Newest date: Import only before this date
The import process runs in background isolates for optimal performance and can handle very large history files (100,000+ entries).
YouTube Matching Logic
Link-Based Matching
Matches YouTube videos to local tracks using video IDs:- Track comment field (added by yt-dlp)
- Filename patterns:
v=VIDEO_IDorid=VIDEO_ID - Any YouTube URL in metadata
Title & Artist Matching
Fuzzy matching when video ID is unavailable:Text matching ignores case, special characters, and common words like “official”, “video”, “HD”, etc.
YouTube History Dual Storage
Imported YouTube history is stored in two locations:- Local History: Matched videos → local tracks
- YouTube History: All videos preserved with full metadata
Benefits of Dual Storage
Benefits of Dual Storage
- Preserve YouTube data even without local matches
- Future matching: New downloads can match existing history
- Copy to local: Use
copyYTHistoryContentToLocalHistory()after downloading tracks - Statistics: Maintain accurate YouTube watch counts
Last.fm History Import
Exporting Last.fm Data
Request Data Export
Visit Last.fm and request your listening history export.Or use third-party tools:
Importing Last.fm History
Configure Options
- Match All: Add all matching tracks or only first match
- Date Range: Optional filtering by date
Last.fm Matching Algorithm
Last.fm imports support flexible date parsing and handle malformed CSV entries gracefully.
Import Progress
Real-Time Statistics
During import, Namida displays:Notification Updates
Progress notifications update every second with current status and estimated completion.
Missing Entries
Handling Unmatched Items
After import, Namida shows a dialog with unmatched entries:Missing Entry Dialog Features
Missing Entry Dialog Features
- View all missing entries sorted by frequency
- Manual track selection: Pick specific tracks for each entry
- Add as dummy track: Create placeholder track for statistics
- Bulk operations: Add all missing as dummies with one click
- Status tracking: See which entries have been resolved
Resolving Missing Entries
Select Matching Track
For each entry:
- Click the entry
- Search your library for matching track
- Select correct track
Advanced Options
Date Range Filtering
Import only specific time periods:- Import recent history only
- Exclude old/irrelevant data
- Merge specific time periods
- Re-import failed date ranges
Match All vs. First Match
Match Behavior
Match Behavior
First Match (
matchAll: false):- Adds only the first matching track
- Faster processing
- Prevents duplicate history entries
- Recommended for most users
matchAll: true):- Adds every matching track
- Useful for multi-track releases (singles, remixes)
- Can create duplicate entries if multiple versions exist
- Better for comprehensive statistics
Copy YouTube History to Local
After downloading tracks, match existing YouTube history:Performance Optimization
Large File Handling
For huge history files (100,000+ entries):Namida processes imports in background isolates, preventing UI freezing even with massive files.
ZIP Archive Support
Automatically extracts history files from ZIP archives:YouTube Statistics
Importing YouTube history also updates video statistics:- Total watch count per video
- First watch date
- Last watch date
- Watch frequency
- YouTube vs. YouTube Music ratio
Best Practices
Before Import
- Backup current history before importing
- Export from source while account is active
- Check file format to ensure compatibility
- Note date ranges for verification
During Import
- Use link matching when possible for accuracy
- Enable both YT and YTM to capture all listens
- Keep device charged for large imports
- Don’t close app until complete
Merge Strategies
Multiple Source Merging
Multiple Source Merging
Scenario: You have history from both YouTube and Last.fmStrategy:
- Import YouTube history first (best matching accuracy)
- Import Last.fm history second
- Resolve missing entries from Last.fm
- Use dummy tracks sparingly
Re-importing After Downloads
Re-importing After Downloads
Scenario: You import history, then download missing tracksStrategy:
- Import initial history (creates entries for matched tracks)
- Download missing tracks from YouTube/streaming
- Run “Copy YouTube History to Local”
- Revisit missing entries dialog
Troubleshooting
Import Stuck or Frozen
Import Stuck or Frozen
Possible causes:
- Very large file (>1GB)
- Malformed JSON/CSV
- Insufficient memory
- Close other apps to free memory
- Split large files into smaller chunks
- Remove invalid entries from CSV/JSON
- Try one file at a time
Low Match Rate
Low Match Rate
If only a few entries match:
- Check metadata: Ensure tracks have YouTube IDs in comments
- Enable fuzzy matching: Turn on title & artist matching
- Fix artist tags: Ensure artist tags match YouTube channels
- Download more tracks: Import matches only existing library
Duplicate History Entries
Duplicate History Entries
Cause: Importing same source multiple timesPrevention:
- Namida automatically prevents duplicates by timestamp
- Use date range filtering for partial re-imports
Export Compatibility
Namida history can be exported for use in other apps or for backup purposes. The export format is compatible with standard music history formats.