grandchild / songfone

๐ŸŽถ๐Ÿ“ฑ๐ŸŽถ Download songs from your remote music collection onto your phone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

songfone

Download songs from your remote music collection onto your phone โ€” optionally converting to a different audio codec.

The goal is to have a similar experience to Spotify or Netflix download caches.

Requirements

  • A file synchronization tool on both the server and the phone. Any will do, that is any that copies changed files automatically from each side to the other will do.
    If you don't know which, I suggest you give Syncthing a try.

Server requirements

Optional for codec conversion:

Phone requirements

  • Android OS

Setup

Server

Unpack the server/ directory on the server machine and configure "audio", the path to your music libarary in songfone.conf:

{
    "audio": "~/Music"
}

This is the only required configuration.

Sync

Next set up your file synchronization tool to share ~/.local/share/songfone with the device you want to download music to.

You should see a .songfone/ directory appear as soon as you start the server.

App

TODO

Configuration

The default share folder is ~/.local/share/songfone, but you can set its location anywhere by adding the "output" option:

{
    "audio": "~/Music",
    "output": "~/my/songfone"
}

You may set multiple audio source paths like this:

{
    "audio": ["~/Music", "~/AudioBooks"]
}

When converting songs, you might want to use multiple threads to speed up the process:

{
    "audio": "~/Music",
    "max_conversion_threads": 6
}

The default value is 2, so not setting this will already convert two songs at a time.

This config key supports setting the thread count in relation to the system's CPU count:

{
    "audio": "~/Music",
    "max_conversion_threads": "cpus/2"
}

You may use any expression like "cpus" [["+"|"-"|"*"|"/"] <number>], e.g.: "cpus-2", "CPUs * 2" or just "cpus". Case and spaces between the operands and operators don't matter. Conversion can occupy a CPU pretty well, so some recommended alternate settings would be "cpus-1" or the more conservative "cpus/2", so that your system still has some wiggle room.

Other options can be found in config.py as attributes of the Config class.

TODO

  • android app
  • cover art
  • (multiple servers)

License

License

You may use this code without attribution, that is without mentioning where it's from or who wrote it. I would actually prefer if you didn't mention me. You may even claim it's your own.

About

๐ŸŽถ๐Ÿ“ฑ๐ŸŽถ Download songs from your remote music collection onto your phone

License:Creative Commons Zero v1.0 Universal


Languages

Language:Python 100.0%