Skip to main content

Randomly add items to mpd queue from jellyfin (use in tandem with mopidy-jellyfin)

Project description

jellyshuf

Essentially implements ncmpcpp's add random feature (default hotkey: `) through a script which grabs info from jellyfin api itself. jellyfin-mpd (and by proxy jellyfin-mopidy) does not implement the required mpd commands for this ncmpcpp function to work.

Install

Arch Linux (AUR)

paru -S jellyshuf (or any other AUR helper)

Any system (pip)

pip install jellyshuf

or

git clone https://github.com/deafmute1/jellyshuf.git
cd jellyshuf
pip install . 

Usage

jellyshuf will asked for required information config info on first run (server url, username, password, cache settings). Some advanced config options are not exposed via jellyshuf --config. You can edit these manually. You can use --empty-config to generate all options with their defaults at the config location. The config file is located at $XDG_CONFIG_DIR/jellyshuf/config.json. The jellyfin password is by default stored to the system keyring if available.

Please note there is some time required to fetch items from jellyfin when they have not yet been cached to disk. This is mainly noticable with using songs; on large libraries there may be notcable lag even when using disk cache.

This program currently requires the option albumartistsort in mopidy-jellyfin to be set to true (this is the default setting).

jellyshuf --help

USAGE: jellyshuf <FLAGS> TYPE NUMBER
    
TYPE is one of artists, albums, songs 
    
FLAGS: 
    --stdout            Instead of adding retrieved paths to mpd queue, emits them to stdout (line separated)
    --interactive|-i    If not in stdout mode, interactively confirms albums before adding them;
                            jellyshuf runs until NUMBER has been added to queue.
    --random|-r         Set mpd to random mode after adding new items
    --start|-s          Start mpd after adding new items
    --clear|-c          Clear mpd queue before adding items
    --config            Run config (overwriting any existing info) then exit
    --empty-config      Generate an empty config file at config location.
    --version           Print version and exit
    --help|-h           Display this message and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jellyshuf-0.3.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

jellyshuf-0.3.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file jellyshuf-0.3.0.tar.gz.

File metadata

  • Download URL: jellyshuf-0.3.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for jellyshuf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0719a321578edd2b8d54145e8f1ddd58037be3050a801b70e888f713bcad6227
MD5 f3ab96fb946e1d7ef8d6dfa737522f82
BLAKE2b-256 05a5ff1d9295ae211f3c95e48cb6e4b05f0494734477f71c876e8fad3778d3d7

See more details on using hashes here.

File details

Details for the file jellyshuf-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jellyshuf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for jellyshuf-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05e15b2e90d0c9910e599a265e69ec8fcc60e419485f57a195dbeaed13c669d1
MD5 7b086119d5b9762fa917ae51f921d20b
BLAKE2b-256 eaec8ba87110fa47a91cde37eb5c46723a27e0a0856d6210ce7566a02d2793f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page