{"id":25188595,"url":"https://github.com/kleinpanic/media-tui","last_synced_at":"2025-04-04T10:14:25.216Z","repository":{"id":259560492,"uuid":"878722702","full_name":"kleinpanic/Media-Tui","owner":"kleinpanic","description":"A TUI based dashboard for various media. Uses MPV and spotify API, and will convert albumn art into ASCII","archived":false,"fork":false,"pushed_at":"2024-10-26T03:05:17.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T20:36:41.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kleinpanic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-26T00:11:01.000Z","updated_at":"2024-10-26T03:05:21.000Z","dependencies_parsed_at":"2024-10-26T14:32:04.701Z","dependency_job_id":"2ebab3dc-1add-4ec9-8b9b-e584368df2a9","html_url":"https://github.com/kleinpanic/Media-Tui","commit_stats":null,"previous_names":["kleinpanic/media-tui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2FMedia-Tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2FMedia-Tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2FMedia-Tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2FMedia-Tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kleinpanic","download_url":"https://codeload.github.com/kleinpanic/Media-Tui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157278,"owners_count":20893221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-09T20:29:15.038Z","updated_at":"2025-04-04T10:14:25.186Z","avatar_url":"https://github.com/kleinpanic.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Media-TUI\n\n**Media-TUI** is a terminal-based media player built using Python. It integrates with services such as **Spotify** and provides a simple, curses-based user interface to browse, play, and control music. It also supports local file navigation and playback.\n\n## Features\n\n- **Spotify Integration**: Authenticate with Spotify to control your playlists, albums, and songs directly from the terminal.\n- **Curses-based UI**: Browse playlists, tracks, albums, and control playback using a keyboard-driven terminal interface.\n- **ASCII Art**: Displays album art in the form of ASCII art for currently playing tracks.\n- **Device Management**: View and switch between available Spotify devices for playback.\n- **Playback Controls**: Control volume, skip tracks, play/pause functionality, and more directly from the terminal.\n\n## Requirements\n\n- Python 3.7+\n- Spotipy (Spotify API Python client)\n- Pillow (Python Imaging Library for handling images)\n- Curses (terminal UI library)\n- Requests (for making HTTP requests)\n- dotenv (for loading environment variables)\n\n### Python Libraries\n\nInstall the dependencies using `pip`:\n\n```bash\npip install spotipy pillow python-dotenv requests\n```\n\n## Installation\n\n1. **Clone the Repository**:\n\n   ```bash\n   git clone https://github.com/your-username/media-tui.git\n   cd media-tui\n   ```\n\n2. **Set up Spotify Credentials**:\n\n   To authenticate with Spotify, you'll need to set up a Spotify developer application. Follow these steps:\n\n   - Go to [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/applications) and create a new application.\n   - Add a redirect URI like `http://localhost:8888/callback` to your application settings.\n\n   Create a `.env` file in the project root and add your credentials:\n\n   ```env\n   SPOTIPY_CLIENT_ID=your-client-id\n   SPOTIPY_CLIENT_SECRET=your-client-secret\n   SPOTIPY_REDIRECT_URI=http://localhost:8888/callback\n   ```\n\n3. **Activate Virtual Environment (Optional but recommended)**:\n\n   If you'd like to use a virtual environment:\n\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n   ```\n\n4. **Install Dependencies**:\n\n   Inside your virtual environment (if you're using one), install the dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n5. **Run the Application**:\n\n   ```bash\n   python main.py\n   ```\n\n## How to Use\n\n### Keybindings:\n\n- **Explorer Mode**:\n  - `j` / `k`: Navigate up and down in the playlists or albums.\n  - `a`: Switch to albums view.\n  - `p`: Switch to playlists view.\n  - `Enter`: Select a playlist or album and view its tracks.\n  - `c`: View the currently playing song.\n  - `Backspace`: Exit the current view.\n\n- **Tracks View**:\n  - `j` / `k`: Navigate through tracks.\n  - `Enter`: Play the selected track.\n  - `c`: View the currently playing song.\n  - `d`: Open device management view.\n  - `Backspace`: Return to the explorer view.\n\n- **Player View**:\n  - `p`: Toggle Play/Pause.\n  - `n`: Next track.\n  - `b`: Previous track.\n  - `+` / `-`: Increase or decrease volume.\n  - `d`: Open device management view.\n  - `Backspace`: Return to the tracks view.\n\n- **Device Management**:\n  - `j` / `k`: Navigate through available devices.\n  - `Enter`: Switch playback to the selected device.\n  - `Backspace`: Return to the player view.\n\n### Features in Detail\n\n- **Spotify Authentication**: Media-TUI authenticates with Spotify using OAuth and provides access to your personal Spotify playlists, albums, and playback devices.\n- **ASCII Art**: Album art for the currently playing track is converted into ASCII art and displayed in the player view.\n- **Device Management**: Easily switch between your available Spotify devices such as phones, computers, and smart speakers for playback.\n  \n## Troubleshooting\n\n### Common Errors\n\n1. **Spotify Authentication Error**:\n   - Make sure you've correctly set the environment variables for Spotify credentials in the `.env` file.\n   - Ensure the redirect URI in the `.env` matches the one in your Spotify Developer Dashboard.\n\n2. **No Active Device Found**:\n   - If no active device is found, make sure you have the Spotify app open on one of your devices and logged in with the same account.\n\n3. **Album Art Not Displaying**:\n   - If album art does not appear as ASCII, ensure you have a stable internet connection, and the required libraries (`requests`, `Pillow`) are installed.\n\n## Contributing\n\nIf you'd like to contribute to this project:\n\n1. Fork the repository.\n2. Create a new branch for your feature/bugfix.\n3. Submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinpanic%2Fmedia-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkleinpanic%2Fmedia-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinpanic%2Fmedia-tui/lists"}