NAME

drive_player - GTK3 music player for Google Drive

SYNOPSIS

drive_player

SETUP

1. Install dependencies

make install

This installs system packages (Gtk3, Glib, SQLite, mpv) and all required CPAN modules.

2. Create a Google Cloud project and OAuth credentials

  1. Go to https://console.cloud.google.com/ and create a new project (or select an existing one).

  2. Enable the Google Drive API: APIs & Services > Enable APIs and Services > search for "Drive API" > Enable.

  3. Create OAuth credentials: APIs & Services > Credentials > Create Credentials > OAuth client ID. Choose Desktop app as the application type.

  4. Download or note the Client ID and Client Secret.

3. Configure the application

Launch the app, then open File > Settings and paste the Client ID and Client Secret. Click Save.

The config file is written to ~/.config/drive_player/config.yaml.

4. Authorise access to Google Drive

Run the OAuth token creator that ships with Google::RestApi:

google_restapi_oauth_token_creator

Follow the prompts. The resulting token file is stored at ~/.config/drive_player/token.dat by default.

5. Add music folders

Launch the app and choose File > Add Music Folder. Enter the Google Drive folder ID (the last path component of the folder's Drive URL) and a display name. The app will scan the folder and add tracks to the library.

FILES

~/.config/drive_player/config.yaml

Main configuration file (OAuth credentials, log level, folder list).

~/.config/drive_player/token.dat

OAuth2 token cache. Created by the token creator; refreshed automatically.

~/.local/share/drive_player/music.db

SQLite database storing the scanned track library.

~/.local/share/drive_player/drive_player.log

Application log.