mcleodd10 / beets-navidrome_sync

Work in progress syncing plugin between beets and Navidrome
MIT License
0 stars 0 forks source link

beets-navidrome_sync

Work in progress syncing plugin between beets and Navidrome, works well enough for my own use on Windows, needs testing on *nix.

So far, it can do the following:

Here's some crap documentation because I'm lazy, courtesy of Copilot (edited somewhat for clarification in parts)

Installation

  1. Install Beets by following the instructions on the Beets website.
  2. Install the pysftp and tqdm Python packages by running pip install pysftp tqdm.
  3. Clone this repository or download the ZIP file and extract it to a directory of your choice.
  4. Copy the navidrome_sync directory to your beetsplug directory.
  5. Edit your Beets configuration file (~/.config/beets/config.yaml) and add the following lines :

    plugins: navidrome_sync
    
    navidrome_sync:
     dbpath: /path/to/local/navidrome.db
     dbuser: your-db-username # not necessarily your navidrome login username, for syncing stars/ratings to the right user
    
    # optional:
     pushtarget : local # can be 'local' (default), 'sftp', 'remote', or 'both' (sftp/remote are the same for now)
     navidrome:
       host: your-navidrome-server.com
       username: your-navidrome-username
       password: your-navidrome-password
     sftp:
       auto: no # default 'no', whether to auto-upload on import (probably not recommended to do your whole db at once with this)
       host: your-sftp-server.com
       username: your-sftp-username
       password: your-sftp-password
       directory: /path/to/remote/music_directory

    Replace the paths and values with your own Navidrome and SFTP server details.

Usage

Once you have installed and configured the plugin, you can use the following commands to sync your Beets library with Navidrome and upload your music files to the remote SFTP server:

Available options for ndpush:

By default, ndpush will push MusicBrainz data, starred tracks, play counts, and ratings to the Navidrome database. You can use the --no-mb, --no-starred, --no-playcounts, and --no-ratings options to disable these features.

If you want to push directory file times to the Navidrome database, you can use the --time option. If you want to use the created time (on Windows) instead of the modified time, you can use the --ctime option.

If you want to log missed items to a file, you can use the --log option followed by the path to the log file.

For example, to push only play counts and ratings to the Navidrome database and log missed items to a file, you can use the following command:

beet ndpush -prBS --log /path/to/logfile.txt

If you want to disable all annotations (play counts, ratings, starred, MusicBrainz data), you can use the --no-annotations or -A option. Note that this option will override all other annotation-related options, for instance in cases where you only want to update the timestamps, e.g.:

beet ndpush -tcA

=======

beets-navidrome_sync

Work in progress syncing plugin between beets and Navidrome, works well enough for my own use on Windows, needs testing on *nix.

So far, it can do the following:

Here's some crap documentation because I'm lazy, courtesy of Copilot (edited somewhat for clarification in parts)

Installation

  1. Install Beets by following the instructions on the Beets website.
  2. Install the pysftp and tqdm Python packages by running pip install pysftp tqdm.
  3. Clone this repository or download the ZIP file and extract it to a directory of your choice.
  4. Copy the navidrome_sync directory to your beetsplug directory.
  5. Edit your Beets configuration file (~/.config/beets/config.yaml) and add the following lines :

    plugins: navidrome_sync
    
    navidrome_sync:
     dbpath: /path/to/local/navidrome.db
     dbuser: your-db-username # not necessarily your navidrome login username, for syncing stars/ratings to the right user
    
    # optional:
     pushtarget : local # can be 'local' (default), 'sftp', 'remote', or 'both' (sftp/remote are the same for now)
     navidrome:
       host: your-navidrome-server.com
       username: your-navidrome-username
       password: your-navidrome-password
     sftp:
       auto: no # default 'no', whether to auto-upload on import (probably not recommended to do your whole db at once with this)
       host: your-sftp-server.com
       username: your-sftp-username
       password: your-sftp-password
       directory: /path/to/remote/music_directory

    Replace the paths and values with your own Navidrome and SFTP server details.

Usage

Once you have installed and configured the plugin, you can use the following commands to sync your Beets library with Navidrome and upload your music files to the remote SFTP server:

Available options for ndpush:

By default, ndpush will push MusicBrainz data, starred tracks, play counts, and ratings to the Navidrome database. You can use the --no-mb, --no-starred, --no-playcounts, and --no-ratings options to disable these features.

If you want to push directory file times to the Navidrome database, you can use the --time option. If you want to use the created time (on Windows) instead of the modified time, you can use the --ctime option.

If you want to log missed items to a file, you can use the --log option followed by the path to the log file.

For example, to push only play counts and ratings to the Navidrome database and log missed items to a file, you can use the following command:

beet ndpush -prBS --log /path/to/logfile.txt

If you want to disable all annotations (play counts, ratings, starred, MusicBrainz data), you can use the --no-annotations or -A option. Note that this option will override all other annotation-related options, for instance in cases where you only want to update the timestamps, e.g.:

beet ndpush -tcA