uploading music automatically with Google Music on a Linux server [duplicate]
I think what you appear to be looking for is https://github.com/thebigmunch/gmusicapi-scripts - a set of python scripts to upload, download or bi-directionally sync tracks. This, in turn, draws from https://github.com/simon-weber/Unofficial-Google-Music-API should you wish to use these python libraries for your own projects.
Per user Joachim's, answer describes a command line approach to both installing and setting up for sync, on a headless linux server no less. To wit:
install-gmm-headless.sh
#!/bin/bash
# Uncomment if 32-bits
# wget "http://dl.google.com/linux/direct/google-musicmanager-beta_current_i386.deb" -O /tmp/gmm.deb
# Uncomment this is 64-bit
# wget "http://dl.google.com/linux/direct/google-musicmanager-beta_current_amd64.deb" -O /tmp/gmm.deb
sudo dpkg -i /tmp/gmm.deb
sudo apt-get -f install
sudo apt-get install x11vnc
echo "Now you can must create the headless-script"
echo "Found here: http://development.giaever.org/pastebin/Ubuntu/google-musicmanager/gmm-headless-script.sh"
gmm-headless-script.sh
#!/bin/bash
# Save as: $HOME/gmm-headless-script.sh
export DISPLAY=:2
Xvfb :2 -screen 0 1024x768x16 &
google-musicmanager -a GMAILUSER -p PASSWORD -s /path/to/music -m SERVERNAME &
x11vnc -display :2 -bg -nopw -listen localhost -xkb
# remember to chmod +x this file = make excutable.
# run in terminal: chmod +x $HOME/gmm-headless-script.sh
From the linked answer:
Hope they are useful. Read comments. Remember to edit:
«GMAILUSER -p PASSWORD -s /path/to/music -m SERVERNAME»
with you own data. (SERVERNAME could be whatever. Its just a name so you can identify your server from your Google-login.)Type
$HOME/gmm-headless-script.sh
in terminal to start sync.
Essentially the scripts:
- have you download and install the linux version of the google music uploader
- have you install a x11 server that uses vnc and framebuffer for output so you don't have to actually deal with x11, but the app will be able to run
- instruct the music uploader to run, specifying the user account and sync from location.
Making this automatic would then be a matter of adding this to cron for repeat syncage, presumably once your initial upload had completed.
A thing to watch out for is excessively long sync / upload times that might lead to overlap of your cronned sync jobs.