-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Setlist.fm OpenScrobbler Option #248
Conversation
src/domains/home/HomeUser.tsx
Outdated
@@ -1,5 +1,5 @@ | |||
import { Row } from 'reactstrap'; | |||
import { faCompactDisc, faPencilAlt, faUserFriends } from '@fortawesome/free-solid-svg-icons'; | |||
import { faCompactDisc, faPencilAlt, faUserFriends, faList } from '@fortawesome/free-solid-svg-icons'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! This is great work, thanks for your effort! I'll be trying it soon to see how it's going so far, let me know when it's ready for review 😁 |
thanks for the reply! this is still a WIP, I just like having the PR to kinda view my changes. I'll reach out if I have questions or when it's actually functional! :) |
public/locales/uk.json
Outdated
@@ -25,6 +25,7 @@ | |||
"yourHistory": "Ваша історія", | |||
"scrobbleManually": "Скробблити вручну", | |||
"scrobbleFromOtherUser": "Скробблити за іншим користувачем", | |||
"scrobbleFromSetlist": "Скробблити зі списку", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest "Скробблити з setlist", to emphasize that user's going to scrobble from a service called "setlist". Otherwise in the current form it basically says "scrobble from a list", which makes too little sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip! If it wasn't obvious these were all just google translate attempts so I appreciate real human help! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, the project translations are handled through POEditor, so don't worry too much about it for the moment. Everyone will be able to contribute and improve translations once we add them there!
Hi, thanks for your patience! I was traveling and unable to check this out properly. I've started testing it locally now, looks good! There are a few things to adjust but nothing too bad 😅 I may push some changes to the branch, and I'll leave some comments after reviewing it more thoroughly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, you did a great job with this PR! Thanks a lot for your contribution to the project! I'll push my improvements on this branch and merge all together. A new release of the scrobbler with this functionality will be out shortly 😃
public/api/v2/setlistfm.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file I ended up doing a small refactor to simplify it, remove some unused variables and break the line that sets header into multiple lines for readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also added functionality to search by artist name
src/Constants.ts
Outdated
@@ -6,6 +6,7 @@ export const LASTFM_AUTH_URL = | |||
`&cb=${window.location.protocol}//${window.location.host}/lastfm/callback/`; | |||
export const PATREON_AUTH_URL = `https://www.patreon.com/oauth2/authorize?response_type=code&client_id=${process.env.REACT_APP_PATREON_CLIENT_ID}&redirect_uri=${window.location.protocol}//${process.env.REACT_APP_HOST}/patreon/callback`; | |||
export const OPENSCROBBLER_API_URL = '/api/v2'; | |||
export const SETLISTFM_API_URL = '/api/v2/setlistfm.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just using OPENSCROBBLER_API_URL
, at least for now, so there was no use for it here. Using a different URL -e.g. hitting setlist.fm directly- would require some other changes anyway.
src/Constants.ts
Outdated
@@ -14,18 +15,23 @@ export const MAX_SCROBBLES_PER_REQUEST = 50; | |||
export const MAX_RECENT_USERS = 6; | |||
export const MAX_RECENT_ALBUMS = 8; | |||
export const DEFAULT_SONG_DURATION = 3 * 60; // ToDo: use this value when skipping time forward after scrobble | |||
// Live music is unpredictable, but usually the band takes a few seconds to breathe / introduce song. | |||
// Adding some leeway to encapsulate this, but it will never be perfect. | |||
export const DEFAULT_CONCERT_SONG_BUFFER = 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: renamed this constant to DEFAULT_CONCERT_INTERVAL_DURATION
, as buffer may be confused with data/streaming terms.
Ahhhh Sorry for going dark on this!! Thanks for your additions and for pushing it through there |
No worries, it took me a bit of time to get back to it. I hope you find my changes useful! Thanks once again for this contribution 🙏🏼 |
Goal
The aim of this project is to add Setlist.fm as a source for scrobbling on OpenScrobbler. This would behave in the pattern of Albums, with the flow of search, select, and scrobble for the desired tracks.
What's Setlist.fm?
Setlist.fm is an wiki for tracking live music performances. Populated mainly by user volunteers, a setlist is simply a list of songs performed by an artist during a concert. Information like Date/Time, Venue, live/tape, covers, and even individual sets are tracked. All of this data is available via their free API.
In the same way that a Last.fm user may want to scrobble an offline album, they may want to track music they saw live in concert.
Design
A "Setlist" option will be added to the home page. Clicking it will take the user to a search bar, where they can search for their desired set. At the moment, this is actually an "input" bar, where the user needs to give the exam setlist.fm url. This url always has a UUID for each setlist, so we can literally rip that from the address. In the future, it could be nice to allow the user to search recent setlists from a specific artist/venue directly in OpenScrobbler, but for now I find this flow to be convenient enoughOnce the search is run, a landing page similar to the "Album" page will be brought up. The list of songs is presented, and the user can select specific ones, or just scrobble the whole setlist.
Requirements
This project will require
Initial phase complete
With this change, a user can now
Some fine details of note:
Future improvements
Language files
@elamperti pointed out that I don't actually have to write these, so I can remove my edits if you like!