ravermeister / lastfmtube

Last.fm Youtube Radio
https://lastfm.rimkus.it
MIT License
7 stars 2 forks source link
chart composer lastfm listen php player playlist radio song song-timeline songs vuejs webradio youtube youtube-radio
Author Jonny Rimkus <jonny@rimkus.it>
Website https://www.rimkus.it
License http://www.wtfpl.net/
Demo https://lastfm.rimkus.it

Requirements

Installation

  1. Place this folder somewhere under your document Root e.g.: http://example.com/lfmtube
  2. run composer install
  3. copy the file conf/example.settings.json to conf/settings.json
  4. create a Last.fm User with a Developer API key
  5. create a Youtube User with a Developer API Key
  6. enter the API keys in the settings.json
  7. open http://example.com/lfmtube and enjoy

Docker

  1. copy the file conf/example.settings.json to conf/settings.json
  2. create a Last.fm User with a Developer API key
  3. create a Youtube User with a Developer API Key
  4. enter the API keys in the settings.json
  5. run docker.sh or docker.bat
  6. open http://localhost and enjoy

About

The Last.fm Youtube Radio searches and plays the listened tracks of a given Last.fm User on YouTube. It is possible to search for alternative Youtube Videos or enter a video url directly. The Tracks which have a fixed Video Id will have a *''** prefixed. You can create your own playlist via menu 'add to playlist'. Additionally there is a Chart list which will be updated each time a song is heared. The Chart Counter works as follows:

The Timer is designed to stop when player is paused, and will continue when the player continues to play.

Hotkeys

The following global Shortcut keys are supported:

Key binding Command Control
space Play/Pause Player
up Volume Up Player
down Volume Down Player
left *Rewind Track Player
right *Fast Forward Track Player
ctrl+left Previous Track Player
ctrl+right Next Track Player
ctrl+1 Player Window Page Navigation
ctrl+2 Last.fm Playlist Page Navigation
ctrl+3 Custom User Playlist Page Navigation
ctrl+4 Topsongs Playlist Page Navigation
ctrl+5 Last.fm Users Page Navigation
ctrl+shift+right next Page Playlist Navigation
ctrl+shift+left previous Page Playlist Navigation

*The forward/rewind amount of time is increased when the functions is called fast in a row, and resetted to default afterwards.

Personal Songlist

You can send any Title to your personal song list (will be stored in browser cache), which is saved during a browser restart.

Listen to other Last.fm User's Song Timeline

You can search any Last.fm User and listen to the Song Timeline.

Admin interface

There is an admin php cli Interface for Importing the replacement.csv Files and generating the sitemap.xml file.
Call php admin.php inside the lastfmtube Folder for more info.

replacements.csv

You can use Regular Expressions for Replacing Artist and Title information if the Song information is messy, sothat the search string that is send to youtube can be corrected in an efficient way. The csv is stored in the database after importing through the admin cli Interface. New- and Changed Files can be (re-)Imported with the admin interface at any time. See the init.replacement.example.csv for more details.

Directory Structure: