Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the fullscreen player use dynamic resolution for the main image #290

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

TacoCake
Copy link
Contributor

@TacoCake TacoCake commented Oct 10, 2023

With the current behaviour, the full screen player main cover art is always at 500×500. On smaller screens this looks fine, but on higher resolution screens, it can be too blurry.

Now, instead of hard-coding a value, the client will fetch the ideal size depending on the client's display resolution. So higher resolution clients, can fetch prettier pictures, and lower resolution clients save on bandwidth.

I've tested this on Firefox, compiled with docker.

Technical stuff

  • To allow for more cache hits, it gets image sizes in multiples of 100, preferring the next highest one
    (Ex: 155px -> 200px)
  • To minimize the issue of it loading the image twice, the first time it loads the image as 1×1, before figuring out the right size. (I haven't found a cleaner solution, feel free to change it if you find a better one)

@vercel
Copy link

vercel bot commented Oct 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
feishin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 1:00pm

@jeffvli
Copy link
Owner

jeffvli commented Oct 17, 2023

Looks good, thanks!

Only issue I can think of is that it does not dynamically re-check the size when the window or application is resized (but it's not a big deal in my opinion).

@jeffvli jeffvli merged commit c7aa5d0 into jeffvli:development Oct 17, 2023
2 checks passed
spiceratops referenced this pull request in spiceratops/k8s-gitops Oct 31, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/jeffvli/feishin](https://togithub.com/jeffvli/feishin) |
minor | `0.4.1` -> `0.5.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>jeffvli/feishin (ghcr.io/jeffvli/feishin)</summary>

###
[`v0.5.0`](https://togithub.com/jeffvli/feishin/releases/tag/v0.5.0):
0.5.0

[Compare
Source](https://togithub.com/jeffvli/feishin/compare/v0.4.1...v0.5.0)

0.5.0 is here!

This release introduces localization (multi-language) support which is
now hosted on [weblate](https://hosted.weblate.org/projects/feishin/).
Visit the link if you would like to contribute a translation.

##### Added

- Added localization support via weblate
([#&#8203;74](https://togithub.com/jeffvli/feishin/issues/74))
- Added discord rich presence
([#&#8203;72](https://togithub.com/jeffvli/feishin/issues/72))
- Added `amd64`, `arm64`, and `armv7` Docker images
([#&#8203;336](https://togithub.com/jeffvli/feishin/issues/336)) (Thanks
[@&#8203;bubylou](https://togithub.com/bubylou))
- Added animated play indicator to currently playing track
([#&#8203;237](https://togithub.com/jeffvli/feishin/issues/237)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Added `PUBLIC_PATH` Docker environment variable to allow customizing
the path Feishin is served from
([#&#8203;307](https://togithub.com/jeffvli/feishin/issues/307)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Added system and custom font support
([#&#8203;270](https://togithub.com/jeffvli/feishin/issues/270),
[#&#8203;288](https://togithub.com/jeffvli/feishin/issues/288)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Added customizable primary accent color
([#&#8203;282](https://togithub.com/jeffvli/feishin/issues/282)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Added customizable playback speed
([#&#8203;94](https://togithub.com/jeffvli/feishin/issues/94)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Added additional hotkeys
([#&#8203;326](https://togithub.com/jeffvli/feishin/issues/326)) (Thanks
[@&#8203;GermanDarknes](https://togithub.com/GermanDarknes))
    -   Favorite/unfavorite current song
    -   Favorite/unfavorite previous song

##### Changed

- Changed `Rating` component functionality from \[double click to clear]
-> \[click on the same rating to clear]
([#&#8203;332](https://togithub.com/jeffvli/feishin/issues/332)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- (Jellyfin) Change hardcoded Jellyfin DeviceID values to include
hostname and username
([#&#8203;312](https://togithub.com/jeffvli/feishin/issues/312)) (Thanks
[@&#8203;LilyRose2798](https://togithub.com/LilyRose2798))
- Fullscreen player now uses dynamic image resolution based on window
size ([#&#8203;290](https://togithub.com/jeffvli/feishin/issues/290))
(Thanks [@&#8203;TacoCake](https://togithub.com/TacoCake))
- Poster carousel now resets to initial position on data refresh
([#&#8203;285](https://togithub.com/jeffvli/feishin/issues/285)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- (Navidrome) Artist images are now always attmepted to be fetched even
when it is potentially unvailable
([#&#8203;317](https://togithub.com/jeffvli/feishin/issues/317)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Window title now displays `SONG_NAME — ARTIST_NAME` instead of
`SONG_NAME`

##### Fixed

- (MPV player) Fixed MPV playing the same track twice after toggling
repeat ([#&#8203;292](https://togithub.com/jeffvli/feishin/issues/292))
(Thanks [@&#8203;kgarner7](https://togithub.com/kgarner7))
- (WEB player) Fixed queue not pausing on the last track when repeat is
disabled
([#&#8203;291](https://togithub.com/jeffvli/feishin/issues/291))
- (Navidrome) Fixed artist year filter becoming stuck
([#&#8203;299](https://togithub.com/jeffvli/feishin/issues/299)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- (Navidrome) Fixed smart playlist query editor unable to scroll
([#&#8203;322](https://togithub.com/jeffvli/feishin/issues/322))
- (Jellyfin) Fixed playing songs from global search menu
([#&#8203;294](https://togithub.com/jeffvli/feishin/issues/294)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- (Jellyfin) Fixed playlist fetch implementation (reverted to previous)
-   (Jellyfin) Fixed missing `Play count` filter on Jellyfin album sort
- (Jellyfin) Fixed "edit playlist" form not working due to invalid fetch
([#&#8203;327](https://togithub.com/jeffvli/feishin/issues/327))
- Removed unused CORS and SSL toggle from web UI
([#&#8203;305](https://togithub.com/jeffvli/feishin/issues/305)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Fixed add to playlist logic when attempting to skip duplicates
([#&#8203;300](https://togithub.com/jeffvli/feishin/issues/300)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Fixed current track queue position when removing songs from the queue
([#&#8203;226](https://togithub.com/jeffvli/feishin/issues/226)) (Thanks
[@&#8203;kgarner7](https://togithub.com/kgarner7))
- Fixed `rate 0` hotkey not working
([#&#8203;338](https://togithub.com/jeffvli/feishin/issues/338)) (Thanks
[@&#8203;GermanDarknes](https://togithub.com/GermanDarknes))

**Full Changelog**:
jeffvli/feishin@v0.4.0...v0.4.1

#### What's Changed

- \[bugfix]: Fix MPV player playing the same track twice after toggling
repeat by [@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/292](https://togithub.com/jeffvli/feishin/pull/292)
- \[bugfix]: fix artist discography year filter not clearing by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/299](https://togithub.com/jeffvli/feishin/pull/299)
- \[bugfix]: Replace hardcoded Jellyfin authentication DeviceId to
include hostname and username by
[@&#8203;LilyRose2798](https://togithub.com/LilyRose2798) in
[https://github.com/jeffvli/feishin/pull/312](https://togithub.com/jeffvli/feishin/pull/312)
- \[bugfix]: remove ignore CORS/SSL switches from web version by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/305](https://togithub.com/jeffvli/feishin/pull/305)
- In the fullscreen player use dynamic resolution for the main image by
[@&#8203;TacoCake](https://togithub.com/TacoCake) in
[https://github.com/jeffvli/feishin/pull/290](https://togithub.com/jeffvli/feishin/pull/290)
- \[bugfix]: properly implement Jellyfin getSongDetail by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/298](https://togithub.com/jeffvli/feishin/pull/298)
- \[bugfix]: do not duplicate tracks when adding to multiple playlists
by [@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/300](https://togithub.com/jeffvli/feishin/pull/300)
- \[feature]: support running feishin on custom path by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/307](https://togithub.com/jeffvli/feishin/pull/307)
- Reset Carousel position on data refresh by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/303](https://togithub.com/jeffvli/feishin/pull/303)
- \[Remote] Full PWA support, misc bugfixes by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/280](https://togithub.com/jeffvli/feishin/pull/280)
- add more emphasis to current song by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/283](https://togithub.com/jeffvli/feishin/pull/283)
- \[bugfix]: fix queue offset when removing tracks by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/301](https://togithub.com/jeffvli/feishin/pull/301)
- \[feature]: Support using system fonts by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/304](https://togithub.com/jeffvli/feishin/pull/304)
- \[bugfix/feat]: always fetch artist image for Navidrome by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/317](https://togithub.com/jeffvli/feishin/pull/317)
- \[Feature] Support changing accent/primary color by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/282](https://togithub.com/jeffvli/feishin/pull/282)
- Support changing playback rate by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/275](https://togithub.com/jeffvli/feishin/pull/275)
- Add favorite hotkey options by
[@&#8203;GermanDarknes](https://togithub.com/GermanDarknes) in
[https://github.com/jeffvli/feishin/pull/326](https://togithub.com/jeffvli/feishin/pull/326)
- \[bugfix/feature]: Improve ratings by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/332](https://togithub.com/jeffvli/feishin/pull/332)
- \[bugfix]: prevent default by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/334](https://togithub.com/jeffvli/feishin/pull/334)
- Build docker container for arm by
[@&#8203;bubylou](https://togithub.com/bubylou) in
[https://github.com/jeffvli/feishin/pull/336](https://togithub.com/jeffvli/feishin/pull/336)
- Fix clear rating hotkey by
[@&#8203;GermanDarknes](https://togithub.com/GermanDarknes) in
[https://github.com/jeffvli/feishin/pull/338](https://togithub.com/jeffvli/feishin/pull/338)
- Add localization support by
[@&#8203;jeffvli](https://togithub.com/jeffvli) in
[https://github.com/jeffvli/feishin/pull/333](https://togithub.com/jeffvli/feishin/pull/333)

#### New Contributors

- [@&#8203;LilyRose2798](https://togithub.com/LilyRose2798) made their
first contribution in
[https://github.com/jeffvli/feishin/pull/312](https://togithub.com/jeffvli/feishin/pull/312)
- [@&#8203;TacoCake](https://togithub.com/TacoCake) made their first
contribution in
[https://github.com/jeffvli/feishin/pull/290](https://togithub.com/jeffvli/feishin/pull/290)
- [@&#8203;GermanDarknes](https://togithub.com/GermanDarknes) made their
first contribution in
[https://github.com/jeffvli/feishin/pull/326](https://togithub.com/jeffvli/feishin/pull/326)
- [@&#8203;bubylou](https://togithub.com/bubylou) made their first
contribution in
[https://github.com/jeffvli/feishin/pull/336](https://togithub.com/jeffvli/feishin/pull/336)

**Full Changelog**:
jeffvli/feishin@v0.4.1...v0.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNi4zIiwidXBkYXRlZEluVmVyIjoiMzcuMzYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants