Code Monkey home page Code Monkey logo

kevinfrei / emp Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 0.0 17.39 MB

A functional music player for FLAC, mp3, and m4a audio. This was a project to do while on "recharge" at Facebook: because I'm a manager I like to have something to 'scratch the coding itch'. It's built with TypeScript, Electron, React, and Recoil. I continue to add little fit & finish things when I'm either bored or irritated about something wrong.

License: Creative Commons Zero v1.0 Universal

HTML 0.57% JavaScript 4.70% CSS 3.27% TypeScript 91.40% Shell 0.07%
music-player electron flac mp3 flac-player mp3-player macos windows recoiljs recoil-app

emp's Introduction

EMP: Electron Music Player

A little Hat Tip to us older Seattleites ;)

Because macOS iTunes, er, "Music" doesn't play flac files

I'm old. I have a whole lot of music that I purchased on CD's over the past many, many years. I like having high quality music playable from the computer I'm working on. When that computer was a Windows PC, the incredibly ancient Windows Media Player would play Flac, as would "Groove Music" I imagine (and anything else probably, because of the pluggable (and highly overarchitected) nature of audio/video handling in Windows). But I'm on a Mac on a regular basis these days. Vox is awful (I'm not paying a monthly fee for the privilege of listening to the music I've already purchased, thanks very much) and VLC is a bad music player (a great video player, but not great for music, IMO)

What's it look like? Kind of like iTunes' ugly stepsister (#notadesigner!), but here you go:

Albums view

Playlists view

Miniplayer

Releases are here. I pretty reliably get Mac & Windows releases up. Linux releases seem messier. Snapcraft something something. I have a Raspi and a couple Ubuntu x86 machines but getting everything working reliably just hasn't happened :/

What's the current state?

It pretty much works. There are a few random minor bugs laying around. I mess with it every month or so. Feel free to use it. Right now, I think I'm the only user, and that's okay with me :)

Stuff to do

I moved everything into GitHub Issues to make book keeping & tracking easier. Go look there.

emp's People

Contributors

auchenberg avatar bokuweb avatar bratsos avatar chankruze avatar codebytere avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar fscherwi avatar haacked avatar icodeforbananas avatar icoxfog417 avatar izuzak avatar jlord avatar kevinfrei avatar kevinsawicki avatar laiso avatar louis993546 avatar malept avatar marshallofsound avatar pratu16x7 avatar richienb avatar sahildua2305 avatar sebastianschmidt avatar shiftkey avatar steevedroz avatar tcyrus avatar vhashimotoo avatar zanesterling avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

emp's Issues

Packaged app doesn't have the custom icon

It's not clear why, because it's specified, but the packaged app (at least for macOS) is getting the default app icon instead of the silly custom one. This is also true when using the developer scenario, but that doesn't matter...

Build error in Arch Linux:Cannot find module app.asar/build/electron.js

I want port it to Arch Linux.
When I build the program,I got an error:

$ electron-builder
  • electron-builder  version=23.6.0 os=6.1.31-1-lts
  • loaded configuration  file=package.json ("build" field)
  • loaded parent configuration  preset=react-cra
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=23.1.4 appOutDir=dist/linux-unpacked
  ⨯ Application entry file "build/electron.js" in the "${HOME}/.cache/paru/clone/EMP-0.8.7/dist/linux-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration.  failedTask=build stackTrace=Error: Application entry file "build/electron.js" in the "${HOME}/.cache/paru/clone/EMP-0.8.7/dist/linux-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration.
    at error (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:7:12)
    at Object.checkFileInArchive (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:31:11)
    at LinuxPackager.checkFileInPackage (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/platformPackager.ts:503:7)
    at LinuxPackager.sanityCheckPackage (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/platformPackager.ts:551:5)
    at LinuxPackager.doPack (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/platformPackager.ts:312:5)
    at LinuxPackager.pack (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/platformPackager.ts:136:5)
    at Packager.doBuild (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/packager.ts:441:9)
    at Object.executeFinally (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/promise.ts:12:14)

When I execute the following command in the package.json:
yarn prep-release && yarn opt-release && electron-builder --publish=always
I got this,and there was no errors:

$ yarn prep-release && yarn opt-release && electron-builder --publish=always
[1]  tsc -p config/tsconfig.render.rel.json exited with code 0
[0] static/main/AudioDatabase.ts(29,56): error TS2307: Cannot find module 'shared' or its corresponding type declarations.
[0] static/main/AudioDatabase.ts(69,13): error TS2339: Property 'forEach' does not exist on type '{}'.
[0] static/main/AudioDatabase.ts(69,24): error TS7031: Binding element 'type' implicitly has an 'any' type.
[0] static/main/AudioDatabase.ts(69,30): error TS7031: Binding element 'value' implicitly has an 'any' type.
[0] static/main/Communication.ts(6,52): error TS2307: Cannot find module 'shared' or its corresponding type declarations.
[0] static/main/Transcoding.ts(16,8): error TS2307: Cannot find module 'shared' or its corresponding type declarations.
[0] static/main/menu.ts(13,42): error TS2307: Cannot find module 'shared' or its corresponding type declarations.
[0]  tsc -p config/tsconfig.static.rel.json exited with code 2
[
  {
    command: Command {
      close: [Subject],
      error: [Subject],
      stdout: [Subject],
      stderr: [Subject],
      timer: [Subject],
      killed: false,
      exited: true,
      index: 1,
      name: '',
      command: ' tsc -p config/tsconfig.render.rel.json',
      prefixColor: '',
      env: {},
      cwd: '',
      killProcess: [Function (anonymous)],
      spawn: [Function (anonymous)],
      spawnOpts: [Object],
      process: undefined,
      pid: 248340,
      stdin: [Socket]
    },
    index: 1,
    exitCode: 0,
    killed: false,
    timings: {
      startDate: 2023-06-02T09:03:37.779Z,
      endDate: 2023-06-02T09:03:38.835Z,
      durationSeconds: 1.056815719
    }
  },
  {
    command: Command {
      close: [Subject],
      error: [Subject],
      stdout: [Subject],
      stderr: [Subject],
      timer: [Subject],
      killed: false,
      exited: true,
      index: 0,
      name: '',
      command: ' tsc -p config/tsconfig.static.rel.json',
      prefixColor: '',
      env: {},
      cwd: '',
      killProcess: [Function (anonymous)],
      spawn: [Function (anonymous)],
      spawnOpts: [Object],
      process: undefined,
      pid: 248339,
      stdin: [Socket]
    },
    index: 0,
    exitCode: 2,
    killed: false,
    timings: {
      startDate: 2023-06-02T09:03:37.776Z,
      endDate: 2023-06-02T09:03:39.261Z,
      durationSeconds: 1.48595283
    }
  }
]

When I execute the emp in dist/linux-unpacked,I got this:

$ ./dist/linux-unpacked/emp 
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '${HOME}/.cache/paru/clone/EMP-0.8.7/dist/linux-unpacked/resources/app.asar/build/electron.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1002:15)
    at n._resolveFilename (node:electron/js2c/browser_init:2:109797)
    at node:electron/js2c/browser_init:2:115663
    at node:electron/js2c/browser_init:2:115906
    at node:electron/js2c/browser_init:2:115910
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/loaders:331:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/loaders:269:10)
    at loadBuiltinModule (node:internal/modules/cjs/helpers:50:9)
    at Module._load (node:internal/modules/cjs/loader:862:15)
    at f._load (node:electron/js2c/asar_bundle:2:13330)

Will you please fixing it ? Thank you!

Migrate to a smaller UI host: Electron is a pig-and-a-half

Pick one of:

  • Tauri: Probably have to learn Rust. Maybe would be interesting? The url handler didn't like flac audio last time I checked (and they were unwilling to add a "trust me" bit because Rustaceans want to live at the forefront of the security arms race, I guess...)
  • Neutralino: I'd probably just fork the project, because their build system is a fluster-cluck, and writing C++ doesn't scare me in the least (I've already got a CMake fork working...)
  • WebView: This is super bare-bones (even lighter than Neutralino). But Neutralino also has a less-than-stellar programming model, so maybe this would be a better starting point. The build is bad (build.sh: wtf, programming people?) and I'd probably have to figure out packaging...
  • Fork and strip Electron: This is daunting, but much of the cruft (outside the packaging size) is related to security stuff that I don't care about for something that isn't hostly arbitrary web content. I suspect the other efforts in this space would be faster to complete...

Improve playlist view

Make playlists expandable & editable inline, instead of requiring that they're Now Playing to edit them.

Add a "dislike" tag

For songs/albums I just never want to hear. Could make a full on view filter for it :)

Make "MicroPlayer"

Just song controls and nothing else. Probably make it stay on top, too.

Excellent quality player

Excellent quality player I listen and on windows and rejoice the bass is dense and without distortion and excellent stereo panorama and volume thank you friend

Add a "pointer to other song" capability

This is basically me being annoyed that I have 12 copies of the same recording of "Smells Like Teen Spirit". If they're the same recording of the same song, I'd like to have some little turd file that indicates that, instead of copying the file around. Something like 'Compilations/VA - 1996 - Eighties Stuff/03 - 80's Band - This File.emp' should contain some json like this:

{
  "original": "../80's Band - 1985 - First Release/05 - This File.flac"
}

with maybe the ability to override stuff in metadata shoved in there for good measure (Album Art might be different, right?)

Support file placement

When adding locations, have a "move to" location and allow songs to be copied/moved to the "storage" location (and organized properly) as an option.

Playlist transcode support

To get stuff to my iPhone (or anywhere else) I need to transcode stuff down to a target bit rate & format. This seems super easy, given that 95% of the code is already in @freik/media-utils

No need to stringify/parse across IPC boundary

This is just a perf hit. The electron IPC mechanism should just handle everything transparently. Eradiate FTON as much as possible (still needs to live in Persist, but hopefully nowhere else)

Add "ignore" option

This probably needs to be in the audio database. Currently, if you create a .notranscode file in a directory, it's ignored for 'entire directory' transcoding. It would be nice to a) not have to leave those turd files around, and b) have the same set of things ignored for the music database as for transcoding

Make better views

All the views leave quite a bit to be desired. Add some new ones.

Make DB & playlists save-able "with" the music collection

Instead of needing to rescan, add the ability to have an .emp hidden folder that contains the relevant data. The trouble is that the data might be getting read from & written to by multiple client apps at the same time.
Stuff to put in this location:

  • MusicDB
  • Playlists
  • Image Cache
  • Metadata Overrides

Help menu doesn't work

Clicking the 'emp Help' menu should go to the wiki, but the thing never launches the click handler :/

Amplitude metadata doesn't seem to be working

I don't know if it's trying and failing to pull it out of the flac files, but if it's not, it's ignoring the data on the Song objects. Check out index.js and the SongContainer.js for details.

Typing based scrolling in lists

Unless focus is in the search bar, typing in a sorted list should scroll to an element. I started this, but it cause weird behavior with FluentUI right-click context menus.

"Auto" playlists

Allow playlist descriptions involving artists, albums, years, keywords, etc...

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.