yt-dlp --flat-playlist --dump-json does not populate uploader, channel, or channel_id fields in the JSON output. These fields are empty/missing. The channel name is only available via playlist_channel, playlist_uploader, or playlist_title fields, which are playlist-level metadata rather than per-video metadata.
When using yt-dlp with --flat-playlist, extract channel name from data.get('playlist_channel') or data.get('playlist_uploader') instead of data.get('uploader') or data.get('channel'). Use a fallback chain: uploader or channel or playlist_channel to handle both flat-playlist and full-download modes.