GithubHelp home page GithubHelp logo

j-szulc / youtube-music Goto Github PK

View Code? Open in Web Editor NEW

This project forked from th-ch/youtube-music

0.0 0.0 0.0 9.48 MB

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)

Home Page: https://th-ch.github.io/youtube-music/

License: MIT License

JavaScript 3.06% TypeScript 90.79% CSS 3.03% HTML 2.91% Ruby 0.20%

youtube-music's Introduction

YouTube Music

GitHub release GitHub license eslint code style Build status Known Vulnerabilities GitHub All Releases AUR

Screenshot

Electron wrapper around YouTube Music featuring:

  • Native look & feel, aims at keeping the original interface
  • Framework for custom plugins: change YouTube Music to your needs (style, content, features), enable/disable plugins in one click

Download

You can check out the latest release to quickly find the latest version.

Arch Linux

Install the youtube-music-bin package from the AUR. For AUR installation instructions, take a look at this wiki page.

MacOS

You can install the app using Homebrew:

brew install --cask https://raw.githubusercontent.com/j-szulc/youtube-music/master/youtube-music.rb

If you install the app manually and get an error "is damaged and can’t be opened." when launching the app, run the following in the Terminal:

xattr -cr /Applications/YouTube\ Music.app

Windows

You can use the Scoop package manager to install the youtube-music package from the extras bucket.

scoop bucket add extras
scoop install extras/youtube-music

Alternately you can use Winget, Windows 11s official CLI package manager to install the th-ch.YouTubeMusic package.

Note: Microsoft Defender SmartScreen might block the installation since it is from an "unknown publisher". This is also true for the manual installation when trying to run the executable(.exe) after a manual download here on github (same file).

winget install th-ch.YouTubeMusic

How to install without a network connection? (in Windows)

  • Download the *.nsis.7z file for your device architecture in release page.
    • x64 for 64-bit Windows
    • ia32 for 32-bit Windows
    • arm64 for ARM64 Windows
  • Download installer in release page. (*-Setup.exe)
  • Place them in the same directory.
  • Run the installer.

Available plugins:

  • Ad Blocker: Block all ads and tracking out of the box

  • Album Color Theme: Applies a dynamic theme and visual effects based on the album color palette

  • Ambient Mode: Applies a lighting effect by casting gentle colors from the video, into your screen’s background.

  • Audio Compressor: Apply compression to audio (lowers the volume of the loudest parts of the signal and raises the volume of the softest parts)

  • Blur Nav Bar: makes navigation bar transparent and blurry

  • Bypass age restrictions: bypass YouTube's age verification

  • Captions selector: Enable captions

  • Compact sidebar: Always set the sidebar in compact mode

  • Crossfade: Crossfade between songs

  • Disable Autoplay: Makes every song start in "paused" mode

  • Discord: Show your friends what you listen to with Rich Presence

  • Downloader: downloads MP3 directly from the interface (youtube-dl)

  • Exponential Volume: Makes the volume slider exponential so it's easier to select lower volumes.

  • In-App Menu: gives bars a fancy, dark look

    (see this post if you have problem accessing the menu after enabling this plugin and hide-menu option)

  • Last.fm: Scrobbles support

  • Lumia Stream: Adds Lumia Stream support

  • Lyrics Genius: Adds lyrics support for most songs

  • Navigation: Next/Back navigation arrows directly integrated in the interface, like in your favorite browser

  • No Google Login: Remove Google login buttons and links from the interface

  • Notifications: Display a notification when a song starts playing (interactive notifications are available on windows)

  • Picture in picture: allows to switch the app to picture-in-picture mode

  • Playback Speed: Listen fast, listen slow! Adds a slider that controls song speed

  • Precise Volume: Control the volume precisely using mousewheel/hotkeys, with a custom hud and customizable volume steps

  • Quality Changer: Allows changing the video quality with a button on the video overlay

  • Shortcuts: Allows setting global hotkeys for playback (play/pause/next/previous) + disable media osd by overriding media keys + enable Ctrl/CMD + F to search + enable linux mpris support for mediakeys + custom hotkeys for advanced users

  • Skip-Silences - Automatically skip silenced sections

  • SponsorBlock: Automatically Skips non-music parts like intro/outro or parts of music videos where the song isn't playing

  • Taskbar Media Control: Control playback from your Windows taskbar

  • Touchbar: Custom TouchBar layout for macOS

  • Tuna-OBS: Integration with OBS's plugin Tuna

  • Video Toggle: Adds a button to switch between Video/Song mode. can also optionally remove the whole video tab

  • Visualizer: Different music visualizers


  • Auto confirm when paused (Always Enabled): disable the "Continue Watching?" popup that pause music after a certain time

If Hide Menu option is on - you can show the menu with the alt key (or ` [backtick] if using the in-app-menu plugin)

Themes

You can load CSS files to change the look of the application (Options > Visual Tweaks > Themes).

Some predefined themes are available in https://github.com/kerichdev/themes-for-ytmdesktop-player.

Dev

git clone https://github.com/th-ch/youtube-music
cd youtube-music
pnpm install --frozen-lockfile
pnpm start

Build your own plugins

Using plugins, you can:

  • manipulate the app - the BrowserWindow from electron is passed to the plugin handler
  • change the front by manipulating the HTML/CSS

Creating a plugin

Create a folder in plugins/YOUR-PLUGIN-NAME:

  • if you need to manipulate the BrowserWindow, create a file with the following template:
// file: back.ts
export default (win: Electron.BrowserWindow, config: ConfigType<'YOUR-PLUGIN-NAME'>) => {
  // something
};

then, register the plugin in index.ts:

import yourPlugin from './plugins/YOUR-PLUGIN-NAME/back';

// ...

const mainPlugins = {
  // ...
  'YOUR-PLUGIN-NAME': yourPlugin,
};
  • if you need to change the front, create a file with the following template:
// file: front.ts
export default (config: ConfigType<'YOUR-PLUGIN-NAME'>) => {
  // This function will be called as a preload script
  // So you can use front features like `document.querySelector`
};

then, register the plugin in preload.ts:

import yourPlugin from './plugins/YOUR-PLUGIN-NAME/front';

const rendererPlugins: PluginMapper<'renderer'> = {
  // ...
  'YOUR-PLUGIN-NAME': yourPlugin,
};

Common use cases

  • injecting custom CSS: create a style.css file in the same folder then:
import path from 'node:path';
import { injectCSS } from '../utils';

// back.ts
export default (win: Electron.BrowserWindow) => {
  injectCSS(win.webContents, path.join(__dirname, 'style.css'));
};
  • changing the HTML:
// front.ts
export default () => {
  // Remove the login button
  document.querySelector(".sign-in-link.ytmusic-nav-bar").remove();
};
  • communicating between the front and back: can be done using the ipcMain module from electron. See utils.js file and example in navigation plugin.

Build

  1. Clone the repo
  2. Follow this guide to install pnpm
  3. Run pnpm install --frozen-lockfile to install dependencies
  4. Run pnpm build:OS
  • pnpm dist:win - Windows
  • pnpm dist:linux - Linux
  • pnpm dist:mac - MacOS

Builds the app for macOS, Linux, and Windows, using electron-builder.

Tests

pnpm test

Uses Playwright to test the app.

License

MIT © th-ch

youtube-music's People

Contributors

th-ch avatar araxeus avatar jellybrick avatar snyk-bot avatar dependabot[bot] avatar semvis123 avatar su-yong avatar renovate[bot] avatar miephd avatar cpiber avatar foonathan avatar konhi avatar itzmanish avatar im-noahh avatar skydeke avatar letrixz avatar keyboardsheep avatar zo-bro-23 avatar hbarsaiyan avatar xhayper avatar thymue avatar derec4 avatar nnnlog avatar anytarseir67 avatar amsyarasyiq avatar goudronviande24 avatar sapuseven avatar nixxen avatar markbaas avatar j-szulc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.