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

Add flairs CSS animations #3027

Merged
merged 81 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
f9af16a
Force size of icons for Youtube
MonkeyDo Oct 25, 2024
8d61954
Donations: add a note that user flairs are coming soon
MonkeyDo Oct 28, 2024
8027afa
Update AddData.tsx with ListenBrainz macOS Scrobbler for Music.app
Aerozol Oct 28, 2024
8bd0199
Add the github wellknown file (#3017)
mayhem Oct 29, 2024
44259b9
Merge pull request #3012 from metabrainz/donate-flair-coming-soon
MonkeyDo Oct 29, 2024
d75d125
Merge pull request #3009 from metabrainz/youtube-icon-size
MonkeyDo Oct 29, 2024
e8dc1d8
Merge pull request #3013 from Aerozol/Update-AddData.tsx-with-macOS-S…
MonkeyDo Oct 29, 2024
3b90679
Add last.fm backend importer - interim check in
amCap1712 Aug 4, 2024
4f4e51f
Add last.fm backend importer - interim check in
amCap1712 Aug 4, 2024
498716d
fix lastfm importer container
amCap1712 Oct 20, 2024
dd82ad3
remove imports
amCap1712 Oct 20, 2024
c1e0ca6
add endpoint for users to link their last.fm account
amCap1712 Oct 24, 2024
daa4fb5
rollback transaction to avoid deadlock
amCap1712 Oct 24, 2024
34f1c77
Add LastFM UI to music services page
MonkeyDo Oct 25, 2024
da39ea1
Update listenbrainz/webserver/views/settings.py
amCap1712 Oct 28, 2024
4540502
fix tests
amCap1712 Oct 28, 2024
f4ecca2
fix tests - 2
amCap1712 Oct 29, 2024
02274cd
fix tests - 3
amCap1712 Oct 30, 2024
7aa61ee
fix tests - 4
amCap1712 Oct 30, 2024
d6beba1
Remove LastFM from deprecated manual importer
MonkeyDo Oct 30, 2024
bb78349
linting.
MonkeyDo Oct 30, 2024
a360ea3
LFM importer: fix tests
MonkeyDo Oct 30, 2024
6143a68
Move "import love tracks" feature for LastFM
MonkeyDo Oct 30, 2024
a7c5e4e
Rename test files
MonkeyDo Oct 30, 2024
0c1247a
Fix typo
MonkeyDo Oct 30, 2024
f493894
typo
MonkeyDo Oct 31, 2024
dae08a5
LB-1664: Only show "full discography" button when required
MonkeyDo Oct 31, 2024
dcf6073
Show user information in last.fm settings page
amCap1712 Oct 31, 2024
fea9142
Merge pull request #3019 from metabrainz/LB-1664
MonkeyDo Nov 1, 2024
1adb44a
fix tests
amCap1712 Nov 1, 2024
a6a422c
fix: Playlist count and Listen Count are null
anshg1214 Nov 4, 2024
9cf302e
Merge pull request #3021 from metabrainz/LB-1668
anshg1214 Nov 4, 2024
48e707d
Update AddData.tsx with Discord BrainzBot + tidying
Aerozol Nov 4, 2024
ac3a438
Update AddData.tsx with TIDAL + neptune client mod + plugin
Aerozol Nov 4, 2024
18b8937
feat: Sort rgs for generating cover art
anshg1214 Nov 5, 2024
8d61c88
fix: Improve mobile view
anshg1214 Nov 5, 2024
2dd9245
Merge pull request #3024 from metabrainz/LB-1667
MonkeyDo Nov 5, 2024
2d692c6
Add flairs CSS definitions
MonkeyDo Nov 7, 2024
6659775
Update prettier, stylelint and less plugins
MonkeyDo Nov 7, 2024
8d858c4
Lint flairs.css
MonkeyDo Nov 7, 2024
c4c058c
Revert "Update prettier, stylelint and less plugins"
MonkeyDo Nov 7, 2024
9486c4c
Lint: disable rules in flairs.less
MonkeyDo Nov 7, 2024
790ff09
LFM: Separate state values
MonkeyDo Nov 7, 2024
90453e5
Merge pull request #3020 from metabrainz/lfm-fixes
MonkeyDo Nov 7, 2024
1e0baeb
Merge branch 'master' into deprecate-lfm-import
MonkeyDo Nov 7, 2024
5e346ee
LFM: Remove ResetLatestImports
MonkeyDo Nov 7, 2024
a171787
Flairs css tweaks
MonkeyDo Nov 8, 2024
0cb85ca
Use typescript enum for flairs definition
MonkeyDo Nov 8, 2024
231aa27
Update frontend/js/src/about/add-data/AddData.tsx
Aerozol Nov 10, 2024
55e15f9
Update frontend/js/src/about/add-data/AddData.tsx
Aerozol Nov 10, 2024
4a290ba
Update frontend/js/src/about/add-data/AddData.tsx
Aerozol Nov 10, 2024
66879ac
Update AddData.tsx
Aerozol Nov 10, 2024
40f215a
feat: Hide the player on homepage
anshg1214 Nov 11, 2024
cc3bd57
test: Mock UseLocation
anshg1214 Nov 11, 2024
81ce5a8
Merge branch 'donation-flairs' into flairs-css
MonkeyDo Nov 12, 2024
4efb163
Username: split letters and add data-text attribute
MonkeyDo Nov 12, 2024
51a3d89
Username: allow overriding selected flair
MonkeyDo Nov 12, 2024
e075789
Flairs: User react-select to preview flairs in select options
MonkeyDo Nov 12, 2024
bd40c6c
Fix some flairs CSS
MonkeyDo Nov 12, 2024
dfe1ce7
Tweak flair selection UI
MonkeyDo Nov 12, 2024
9d8ff22
Merge pull request #3025 from metabrainz/ansh/fix-mobile-view
MonkeyDo Nov 12, 2024
81fe291
Update flair settings text
MonkeyDo Nov 12, 2024
372fea8
Fix LFM connection button
MonkeyDo Nov 12, 2024
45e331d
Formatting
MonkeyDo Nov 12, 2024
54b49f3
Merge pull request #3023 from Aerozol/Update-AddData.tsx-with-Tidal-N…
MonkeyDo Nov 12, 2024
70d63a2
Merge branch 'master' into Update-AddData.tsx-with-Discord-BrainzBot
MonkeyDo Nov 12, 2024
3f74261
Merge pull request #3022 from Aerozol/Update-AddData.tsx-with-Discord…
MonkeyDo Nov 12, 2024
5b778d1
feat: Handle Sorting where total_listen_count is null
anshg1214 Nov 13, 2024
bcad255
Merge pull request #3032 from metabrainz/LB-1660
anshg1214 Nov 13, 2024
c428605
Flais: Use enum label for display
MonkeyDo Nov 13, 2024
bcf015c
Flairs: invalidate flair cache when changed
MonkeyDo Nov 13, 2024
2fe7bdc
Flairs: tweak colors and positions
MonkeyDo Nov 13, 2024
5dfbca2
Adjust extruded flair
MonkeyDo Nov 13, 2024
5120662
Adjust sliced flair
MonkeyDo Nov 13, 2024
6ded0b3
Flairs: add tooltip explanation for active flair
MonkeyDo Nov 13, 2024
957db7d
Linty lint
MonkeyDo Nov 13, 2024
f85f106
Flair settings: tweak select
MonkeyDo Nov 13, 2024
3213235
Merge pull request #3018 from metabrainz/deprecate-lfm-import
MonkeyDo Nov 13, 2024
3931fa0
Reword flair explanation tooltip
MonkeyDo Nov 14, 2024
0217422
Allow preflight (OPTIONS) requests for flair endpoint
MonkeyDo Nov 14, 2024
788f069
Merge branch 'master' into flairs-css
MonkeyDo Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .well-known/funding-manifest-urls
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metabrainz.org/funding.json
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ COPY ./docker/services/spotify_reader/spotify_reader.service /etc/service/spotif
COPY ./docker/services/spotify_reader/spotify_reader.finish /etc/service/spotify_reader/finish
RUN touch /etc/service/spotify_reader/down

# Last.fm importer
COPY ./docker/services/lastfm_importer/consul-template-lastfm-importer.conf /etc/consul-template-lastfm-importer.conf
COPY ./docker/services/lastfm_importer/lastfm_importer.service /etc/service/lastfm_importer/run
COPY ./docker/services/lastfm_importer/lastfm_importer.finish /etc/service/lastfm_importer/finish
RUN touch /etc/service/lastfm_importer/down

# Timescale writer
COPY ./docker/services/timescale_writer/consul-template-timescale-writer.conf /etc/consul-template-timescale-writer.conf
COPY ./docker/services/timescale_writer/timescale_writer.service /etc/service/timescale_writer/run
Expand Down
2 changes: 1 addition & 1 deletion admin/sql/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ CREATE TABLE external_service_oauth (
user_id INTEGER NOT NULL, -- FK to "user".id
external_user_id TEXT,
service external_service_oauth_type NOT NULL,
access_token TEXT NOT NULL,
access_token TEXT,
refresh_token TEXT,
token_expires TIMESTAMP WITH TIME ZONE,
last_updated TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BEGIN;

ALTER TABLE external_service_oauth ALTER COLUMN access_token DROP NOT NULL;

COMMIT;
13 changes: 12 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,24 @@ services:
image: web
volumes:
- ..:/code/listenbrainz:z
command: python3 -m "listenbrainz.spotify_updater.spotify_read_listens"
command: python3 -m "listenbrainz.listens_importer.spotify"
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- lb_db
- rabbitmq

lastfm_importer:
image: web
volumes:
- ..:/code/listenbrainz:z
command: python3 -m "listenbrainz.listens_importer.lastfm"
user: "${LB_DOCKER_USER:-root}:${LB_DOCKER_GROUP:-root}"
depends_on:
- redis
- rabbitmq
- lb_db

websockets:
image: web
volumes:
Expand Down
7 changes: 7 additions & 0 deletions docker/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ then
rm -f /etc/service/spotify_reader/down
fi

if [ "${CONTAINER_NAME}" = "listenbrainz-lastfm-reader-${DEPLOY_ENV}" ]
then
log Enabling last.fm importer
rm -f /etc/service/lastfm_importer/down
fi


if [ "${CONTAINER_NAME}" = "listenbrainz-spark-reader-${DEPLOY_ENV}" ]
then
log Enabling spark reader
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
template {
source = "/code/listenbrainz/consul_config.py.ctmpl"
destination = "/code/listenbrainz/listenbrainz/config.py"
}

exec {
command = ["run-lb-command", "python3", "-m", "listenbrainz.listens_importer.lastfm"]
splay = "5s"
reload_signal = "SIGHUP"
kill_signal = "SIGTERM"
kill_timeout = "30s"
}
17 changes: 17 additions & 0 deletions docker/services/lastfm_importer/lastfm_importer.finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

export service="lastfm-importer"

. /etc/lb-startup-common.sh


generate_message "$service" "$@"

log "$message"

send_sentry_message "$message"

if [ "$1" != "0" ]; then
log "Exited with non-0 status, sleeping 10 seconds"
sleep 10
fi
4 changes: 4 additions & 0 deletions docker/services/lastfm_importer/lastfm_importer.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sleep 1
exec run-consul-template -config /etc/consul-template-lastfm-importer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ template {
}

exec {
command = ["run-lb-command", "python3", "-m", "listenbrainz.spotify_updater.spotify_read_listens"]
command = ["run-lb-command", "python3", "-m", "listenbrainz.listens_importer.spotify"]
splay = "5s"
reload_signal = "SIGHUP"
kill_signal = "SIGTERM"
Expand Down
3 changes: 2 additions & 1 deletion docs/users/api_usage_examples/set_latest_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
DEBUG = True
ROOT = 'http://localhost:8100' if DEBUG else 'https://api.listenbrainz.org'

def set_latest_import(timestamp, token, service="lastfm"):

def set_latest_import(timestamp, token, service="librefm"):
"""Sets the time of the latest import.

Args:
Expand Down
12 changes: 11 additions & 1 deletion frontend/css/brainzplayer.less
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,16 @@
stroke: #dedede !important;
color: #dedede !important;
}
&.music-service-icon {
max-width: 1.5em;
> svg {
// Youtube forces us to follow their branding guidelines to the letter,
// so we need to force a minimum height of 20px for the icon path inside the svg
// [poo emoji]
min-height: 26.7px;
vertical-align: middle;
}
}
}

.love,
Expand Down Expand Up @@ -348,7 +358,7 @@
transition: bottom 1s ease-in-out;
width: 100%;
max-width: 550px;
height: 500px;
height: min(500px, 100vh ~"-" @brainzplayer-height);
background-color: #f8f8f8;
border-top: 1px solid #ccc;
box-shadow: -6px -1px 10px rgba(0, 0, 0, 0.2);
Expand Down
Loading