name: 🐛 Bug Report
description: Report a bug or unexpected behavior in MeTube
title: "[Bug]: "
labels: ["bug"]
assignees: []

body:
  - type: checkboxes
    id: prerequisites
    attributes:
      label: Prerequisites
      description: Please confirm before submitting
      options:
        - label: I have searched existing issues and discussions to ensure this bug hasn't been reported before
          required: true
        - label: If the download itself fails, I have tested the same URL and options with yt-dlp directly (see the note below) — or this bug is not download-related
          required: true

  - type: markdown
    attributes:
      value: |
        ## Important Notes
        - **MeTube is only a UI for [yt-dlp](https://github.com/yt-dlp/yt-dlp)** — issues with authentication, postprocessing, site support, or other download functionality should be reported to the [yt-dlp repository](https://github.com/yt-dlp/yt-dlp/issues)
        - To test with yt-dlp directly: `docker exec -ti metube sh`, then `cd /downloads` and run `yt-dlp` with your URL and options
        - If yt-dlp works directly but MeTube doesn't, then it's a MeTube issue — report it here

  - type: textarea
    id: bug-description
    attributes:
      label: Bug Description
      description: Describe the bug, what you expected to happen, and what actually happened
      placeholder: |
        What happened?
        What did you expect to happen?
        Steps to reproduce:
        1. Go to '...'
        2. Click on '....'
        3. See error
    validations:
      required: true

  - type: textarea
    id: ytdl-test-results
    attributes:
      label: yt-dlp Direct Test Results
      description: >-
        If the download itself fails: paste the exact yt-dlp command you ran AND its output —
        download-failure reports without this will be closed as needs-info.
        If this is a UI or app bug that doesn't involve a failing download, just write "UI bug".
      placeholder: |
        Command used: yt-dlp [your-command-here]
        Result: [paste the output here]
    validations:
      required: true

  - type: textarea
    id: environment-and-config
    attributes:
      label: Environment & Configuration
      description: Your setup details and MeTube configuration
      placeholder: |
        Environment:
        - MeTube version: [e.g., latest, specific version]
        - Docker image: [e.g., ghcr.io/alexta69/metube:latest]
        - Operating System: [e.g., Ubuntu 20.04, Windows 10, macOS 12]

        Configuration:
        ```yaml
        # Your docker-compose.yml or environment variables
        ```

        Logs:
        ```bash
        docker logs metube
        ```
    validations:
      required: true

  - type: textarea
    id: additional-context
    attributes:
      label: Additional Context
      description: Any other information that might be helpful
      placeholder: Screenshots, error messages, or other relevant information
    validations:
      required: false
