<?php
define('WP_USE_THEMES', false);
require('../../../wp-load.php');

$posts = get_posts(array(
    'post_type' => 'mm_livestream',
    'posts_per_page' => -1,
    'post_status' => 'any',
));

echo "Gefundene Livestream Posts: " . count($posts) . "\n\n";

foreach ($posts as $p) {
    echo "ID: {$p->ID}\n";
    echo "Titel: {$p->post_title}\n";
    echo "Status: {$p->post_status}\n";
    
    $profile = get_post_meta($p->ID, '_mm_livestream_url', true);
    $player = get_post_meta($p->ID, '_mm_livestream_player_url', true);
    $owner = get_post_meta($p->ID, '_mm_livestream_owner', true);
    
    echo "Owner: {$owner}\n";
    echo "Profile: {$profile}\n";
    echo "Player: {$player}\n";
    echo "---\n\n";
}
