Commit graph

57 commits

Author SHA1 Message Date
Kendall Garner
eff1cee6a3
[bugfix]: Fix repeated track scrobbling (#480)
* [bugfix]: Fix repeated track scrobbling

This commit fixes scrobbling tracks that are repeated in the queue (either due
to a REPEAT_ONE or just enqueued multiple times). There are two extra cases:

1. The current player changes. The player alternates from 1 -> 2 -> 1 whenever playback
finishes normally, so this is a sort of epoch that can be used to detect both repeat one
and track being enqueued multiple times.
2. The current index changes. The player gets set back to 1 in a variety of cases (most often
previous/next), so the check in (1) is not enough. However, the index changing will help identify
that this is a new song.

* use unique id instead
2024-02-01 04:12:39 +00:00
Kendall Garner
5cc2276781
[bugfix]: web player edge cases
Two bugs addressed in response to Safari changes:
1. Only handle `onEnded` for real streams, preventing `autoNext()` spam when the last track finishes
2. `.play()` is not necessarily a safe operation (if empty wave was started, can cause exception later). Catch this exception and discard it. This also only occurred when playing the last track
2024-01-28 01:50:51 -08:00
Jeff
8430b1ec95
Add localization support (#333)
* Add updated i18n config and en locale
2023-10-30 19:22:45 -07:00
Kendall Garner
2664a80851
Support changing playback rate (#275)
* initial idea for playback rate

* Add transparency to dropdown

* Move playback speed component to right controls

* Set mpv speed on startup

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
2023-10-22 17:47:44 -07:00
Kendall Garner
f6667a39a0
fix toggle replay (#292) 2023-10-17 05:49:29 -07:00
jeffvli
cca6fa21db Adjust scrobble duration to check in ms 2023-10-05 22:11:48 -07:00
Kendall Garner
6bac172bbe
fix scrobble durations (#269)
* fix scrobble durations

* Fix scrobble condition on last song in queue, normalize ms

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
2023-10-05 21:45:47 -07:00
jeffvli
e3fc99cf82 Additional adjustments on mpv play 2023-08-07 14:48:02 -07:00
jeffvli
23e791c829 Attempt additional cleanup on mpv start 2023-08-06 11:41:40 -07:00
jeffvli
d0aba6e16e Support genres in context menu 2023-08-04 02:27:04 -07:00
Kendall Garner
c9dbf9b5be
Add remote control (#164)
* draft add remotes

* add favorite, rating

* add basic auth
2023-07-23 05:23:18 -07:00
jeffvli
30e52ebb54 Lint all files 2023-07-01 19:14:12 -07:00
jeffvli
c3c1f4cc5f Refactor mpv initialization/cleanup
- Don't re-initialize the player on re-render
- Fixes the player potentially crashing on hot reload
2023-06-06 10:48:47 -07:00
jeffvli
f380eccc68 Improve responsive styles for playerbar 2023-06-04 16:46:05 -07:00
Kendall Garner
85d2576bdc Improved lyric syncing, fetch
- uses a somewhat more sane way to parse lyrics and teardown timeouts
- adds 'seeked' to setCurrentTime to make detecting seeks in lyric much easier
- adds ability to fetch lyrics from genius/netease (desktop only)
2023-06-04 16:46:05 -07:00
Kendall Garner
d055ae89e0 media session for windows/mac 2023-05-26 18:20:27 -07:00
Kendall Garner
f83639d5f8 round volume, update all clients 2023-05-26 18:20:27 -07:00
Kendall Garner
97ccf3bc6d add media session/mpris 2023-05-26 18:20:27 -07:00
jeffvli
07d4dc37b5 Hide fetch notification if error 2023-05-21 18:19:43 -07:00
jeffvli
6218b27117 Fix no-repeat on mpv (#55) 2023-05-21 16:43:47 -07:00
jeffvli
b71c3c7c53 Handle song detail add 2023-05-21 08:13:48 -07:00
jeffvli
7c6f62023a Fix song null check on queue add 2023-05-21 07:31:18 -07:00
jeffvli
10d7664733 Add stop button to playerbar 2023-05-21 03:17:45 -07:00
jeffvli
fed96d1fce Additional player adjustments
- Set volume on play
- Explicitly pause/play on set queue
2023-05-21 03:08:25 -07:00
Kendall Garner
106fc90c4a
Add ability to save/restore queue (#111)
* add ability to save/restore play queue

* Add restoreQueue action

* Add optional pause param on setQueue

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
2023-05-21 02:29:58 -07:00
jeffvli
292737d53c Add query cancellation for play queue requests
- Opens a notification after 2s to allow for manual cancellation of in-progress query
2023-05-20 23:13:20 -07:00
jeffvli
51c2731b07 Handle queue all songs by double click (#67) 2023-05-20 21:31:00 -07:00
jeffvli
93530008a9 Add custom query prop to play queue add 2023-05-20 20:58:11 -07:00
jeffvli
6747fbb701 Add initialSongId prop as alternative to initialIndex 2023-05-20 20:47:07 -07:00
jeffvli
0320fe6dcc Add mpv load error notification
- Add retry limit on error
2023-05-20 20:19:41 -07:00
jeffvli
3df2915f5f Allow initialIndex on queue add (#67)
- Clean up play queue handler
- Split out functions to utils
2023-05-20 18:40:45 -07:00
jeffvli
b5fa6f0baa Handle song detail on playqueue add 2023-05-20 02:08:37 -07:00
jeffvli
4c98afb613 Add hotkey controls to relevant pages 2023-05-13 22:55:58 -07:00
jeffvli
314bd766df Refactor all api instances in components 2023-04-30 22:01:52 -07:00
jeffvli
eecbcddea3 Refactor settings store and components 2023-03-30 06:44:33 -07:00
jeffvli
275d68ec5b Fix mpv stopping after first playback
- On startup, the first time a song is played, mpv will stop after playback
- This adds a loop to the queue handler to automatically retry when failing to add to the queue
2023-03-09 12:45:13 -08:00
jeffvli
69292a083d Fix web volume handler (#35) 2023-03-09 01:40:08 -08:00
Jeff
23f84d68e8
Add MPRIS support (#25)
* Stop mpv on app close for linux/macOS (#20)

* Add initial MPRIS support

* Fix mpv path check
2023-02-08 23:57:06 -08:00
Jeff
9f2e873366
Redesign sidebar / header and other misc. improvements (#24)
* Remove 1920px max width

* Fix position of list controls menu

* Match size and color of search input

* Adjust library header sizing

* Move app menu to sidebar

* Increase row buffer on play queue list

* Fix query builder styles

* Fix playerbar slider track bg

* Adjust titlebar styles

* Fix invalid modal prop

* Various adjustments to detail pages

* Fix sidebar height calculation

* Fix list null indicators, add filter indicator

* Adjust playqueue styles

* Fix jellyfin releaseYear normalization

* Suppress browser context menu on ag-grid

* Add radius to drawer queue -- normalize layout

* Add modal styles to provider theme

* Fix playlist song list pagination

* Add disc number to albums with more than one disc

* Fix query builder boolean values

* Adjust input placeholder color

* Properly handle rating/favorite from context menu on table

* Conform dropdown menu styles to context menu

* Increase sort type select width

* Fix drawer queue radius

* Change primary color

* Prevent volume wheel from invalid values

* Add icons to query builder dropdowns

* Update notification styles

* Update scrollbar thumb styles

* Remove "add to playlist" on smart playlists

* Fix "add to playlist" from context menu
2023-02-07 22:47:23 -08:00
jeffvli
4cbc28a087 Add volume wheel scroll & new slider component 2023-01-30 21:34:27 -08:00
Jeff
484c96187c
Add scrobble functionality (#19)
* Fix slider bar background to use theme

* Add "scrobbleAtDuration" to settings store

* Add subscribeWithSelector and playCount incrementor

* Add scrobbling API and mutation

* Add scrobble settings

* Begin support for multi-server queue handling

* Dynamically set version on auth header

* Add scrobbling functionality for navidrome/jellyfin
2023-01-30 20:01:57 -08:00
jeffvli
2df96c0d31 Add song filter as add queue type 2023-01-07 03:26:18 -08:00
jeffvli
d1dfbaedaa Move LibraryItem type 2023-01-05 21:59:07 -08:00
jeffvli
0ed13c75af Fix stale state on playqueue when switching server 2023-01-03 03:16:53 -08:00
jeffvli
d54131b34a Remove console logs 2023-01-03 00:51:24 -08:00
jeffvli
5cef23944f Add playlist queue handler 2022-12-31 20:07:44 -08:00
jeffvli
aa1cd742ad Move play queue handler to context 2022-12-31 19:26:58 -08:00
jeffvli
185175aa89 Handle album artist play 2022-12-30 21:02:17 -08:00
jeffvli
d5435686bf Add error catch when fetching for playqueue 2022-12-29 18:29:24 -08:00
jeffvli
9836d548a6 Accept string of ids by itemtype in playqueue add 2022-12-28 19:19:05 -08:00