Нема описа

subDesTagesMitExtraKaese e9daf607a7 add readme пре 2 недеља
.gitignore 7bbf38f603 init пре 3 недеља
LICENSE ecb7354cd4 add license пре 2 недеља
README.md e9daf607a7 add readme пре 2 недеља
main.py 03afcc90be combine play count of all users пре 2 недеља
requirements.txt 7bbf38f603 init пре 3 недеља

README.md

Jellyfin Daily Mix

Overview

jellyfin-daily-mix is a Python script that automatically generates a daily playlist in Jellyfin based on the least-played songs from selected users. The script ensures a fresh and balanced mix of songs by considering individual and combined play counts across multiple users.

Features

  • Fetches user-specific play history from a Jellyfin server.
  • Selects a specified number of least-played songs across users.
  • Automatically updates an existing playlist or creates a new one if it doesn't exist.
  • Ensures songs are fairly distributed among users.
  • Uses Jellyfin's API for seamless integration.

Requirements

  • Python 3.8+
  • A running Jellyfin server
  • API access to Jellyfin
  • dotenv package for environment variable management
  • jellyfin_api_client for interacting with Jellyfin

Installation

  1. Clone the repository:

    git clone https://gogs.justprojects.de/subDesTagesMitExtraKaese/jellyfin-daily-mix.git
    cd jellyfin-daily-mix
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Create a .env file with the following environment variables:

    SERVER_URL=<your_jellyfin_server_url>
    API_TOKEN=<your_api_token>
    HOSTNAME=<your_device_name>
    USER_NAMES="user1 user2 user3"
    PLAYLIST="Daily Mix"
    ITEM_COUNT=50
    

Usage

Run the script with:

python main.py

The script will:

  1. Retrieve the list of users specified in USER_NAMES.
  2. Fetch their least-played songs.
  3. Update or create a playlist named Daily Mix with a fresh selection of songs.

Logging & Debugging

  • The script logs API calls and raises exceptions for failed requests.
  • To enable debugging, print statements provide insights into song selection and API interactions.

Contribution

Feel free to submit issues or pull requests if you have improvements or feature suggestions.

License

MIT License. See LICENSE for details.

Acknowledgments

  • Jellyfin API for providing the backend capabilities.
  • Python's httpx and dotenv for API requests and environment management.

Happy listening! 🎵