(async () => {
    const apiClient = window.ApiClient;
    if (!apiClient) {
        console.error("ApiClient nicht gefunden.");
        return;
    }

    const itemId = "DEINE_ITEM_ID_HIER";
    const userId = apiClient.getCurrentUserId();
    
    const fields = "Overview,RemoteTrailers,Genres,CommunityRating,CriticRating,OfficialRating,PremiereDate,ProductionYear,MediaSources,RunTimeTicks,LocalTrailerCount,ThemeVideoIds";

    try {
        console.log(`Rufe erweiterte Details für Item ${itemId} ab...`);

        const url = apiClient.getUrl(`Users/${userId}/Items/${itemId}`, {
            Fields: fields
        });

        const item = await apiClient.getJSON(url);

        if (item) {
            console.log(`%cErgebnis für: ${item.Name}`, "color: #00a4dc; font-weight: bold;");
            
            console.log("Remote Trailer:", item.RemoteTrailers);
            console.log("Local Trailer Count:", item.LocalTrailerCount);
            console.log("Media Sources:", item.MediaSources);
            console.log("ThemeVideos:", item.ThemeVideoIds);
            
            console.dir(item);
        } else {
            console.warn("Item konnte nicht gefunden werden.");
        }
    } catch (error) {
        console.error("Fehler beim Abrufen des Items:", error);
    }
})();