diff --git a/README.md b/README.md index ad6f6b59..3725f1a9 100644 --- a/README.md +++ b/README.md @@ -14,32 +14,19 @@ Following are the features that currently spotube offers: - Playback control is on user's machine instead of server based - Small size & less data hungry - No spotify or youtube ads since it uses all public & free APIs (But it's recommended to support the creators by watching/liking/subscribing to the artists youtube channel or add as favourite track in spotify. Mostly buying spotify premium is the best way to support their valuable creations) -- Lyrics (WIP) -- Downloadable track +- Lyrics +- Downloadable track (WIP) ## Requirements (Linux🐧 only) Don't worry **spotify premium isn't required**😱. But some extra packages are required. - [MPV](https://mpv.io/installation/) player for playing the actual audio -- [youtube-dl](https://github.com/ytdl-org/youtube-dl) for streaming the audio from youtube. It already comes pre bundled with mpv - -> **Important for [Ubuntu/Debian]():** If you're using any **ubuntu/debian** based linux distro then **youtube-dl** installed from the typical **apt-get** repositories will most likely not work as that version is older than current release. So remove it & install from the repository manually - -Remove the **youtube-dl** installed with **mpv** player or from **apt package manger** - -```bash -$ sudo apt-get remove youtube-dl -``` +- [yt-dlp](https://github.com/yt-dlp/yt-dlp) for streaming the audio from youtube Now, Install youtube-dl from -- official github repo: https://github.com/ytdl-org/youtube-dl#installation (recommended) - **or** -- snap installation - ```bash - $ snap install youtube-dl - ``` +- official github repo: https://github.com/yt-dlp/yt-dlp#installation (recommended) ## Installation @@ -69,7 +56,7 @@ Extract the **`Spotube-winx64-v.zip`** & double click on **`install.bat There are some configurations that needs to be done to start using this software -You need a spotify account & a web app for +You need a spotify account & a developer app for - clientId - clientSecret @@ -88,94 +75,25 @@ You need a spotify account & a web app for - Click on **SHOW CLIENT SECRET** to reveal the **clientSecret**. Then copy the **clientID**, **clientSecret** & paste in the **Spotube's** respective fields ![step-4](https://user-images.githubusercontent.com/61944859/111769501-7fe31e80-88d3-11eb-8fc1-f3655dbd4711.png) +Also, you need a [genius](https://genius.com) account for **lyrics** & a API Client for + +- accessToken + > **Note!**: No personal data or any kind of sensitive information won't be collected from spotify. Don't believe? See the code for yourself -### Building from source - -**nodegui/react-nodegui** requires following packages to run - -- [CMake](https://cmake.org/install/) 3.1 & up -- GCC v7 -- Nodejs 12.x & up - -**Windows Specific:** - -- Visual Studio 2019 - -**MacOS & Linux specific:** - -- Make - -**Ubuntu/Debian based linux specific:** -Having `pkg-config build-essential mesa-common-dev libglu1-mesa-dev` is important - -```bash -$ sudo apt-get install pkg-config build-essential mesa-common-dev libglu1-mesa-dev -``` - -After having this dependencies set up run following commands: - -```bash -$ git clone https://github.com/KRTirtho/spotube.git -$ cd spotube -$ npm install -``` - -Now start building: - -```bash -$ npm run build -$ npm run pack -``` - -Go to built package directory replace `os-name` with `linux`|`win32`|`darwin`: - -```bash -$ cd deploy//build/spotube -``` - -If everything went smoothly then double clicking on the - -- `AppRun` or Spotube-x86_64.AppImage for **linux** -- qode.exe for **Windows** -- Spotube-x86_64.dmg for **MacOS** - -should work just fine without any problem - -### Development - -Follow the **Build from Source** guideline till `npm install` -Now, to start the dev server run the command in one terminal: - -```bash -$ npm run dev -``` - -To start the application in development environment run following command in another terminal keeping the dev server running: - -```bash -$ npm start -``` - -## Known Issues - -There will be some glitches, lags & stuck motions because of the library Spotube is currently using under the hood. It has some issues with layouts thus sometimes some contents aren't shown or overflows out of the window. But resizing the window would fix this issue. Soon there will be some updates fixing this sort of layout related problems - ## TODO: - [ ] Compile, Debug & Build for **MacOS** - [x] Add support for show Lyric of currently playing track -- [x] Track download -- [x] Cached playback +- [ ] Track download - [ ] Support for playing/streaming podcasts/shows -- [x] Easy installation procedure/mechanism for simplicity in Windows - [ ] Artist, User & Album pages ## Things that don't work - Shows & Podcasts aren't supported as it'd require premium anyway -- Beautiful UI (you missed it, see the title😂👆) - OS Media Controls +- Global Media Shortcuts/Keyboard Media Buttons #### Social handlers diff --git a/assets/spotube-screenshot.png b/assets/spotube-screenshot.png index 1a19e7df..a7a8fb84 100644 Binary files a/assets/spotube-screenshot.png and b/assets/spotube-screenshot.png differ diff --git a/lib/components/Lyrics.dart b/lib/components/Lyrics.dart index 9bcdf6ae..e6f3ebfc 100644 --- a/lib/components/Lyrics.dart +++ b/lib/components/Lyrics.dart @@ -37,6 +37,12 @@ class _LyricsState extends State { }); } + if (_lyrics["lyrics"] != null && playback.currentTrack == null) { + setState(() { + _lyrics = {}; + }); + } + if (_lyrics["lyrics"] == null && playback.currentTrack != null) { return const Expanded( child: Center(