danondso / bedfellow Goto Github PK
View Code? Open in Web Editor NEWA tiny react native app that tells you who sampled the song you're listening to on Spotify and lets you queue them up.
A tiny react native app that tells you who sampled the song you're listening to on Spotify and lets you queue them up.
right now if login fails we just stay on the screen without any indication, let's add a snackbar or modal to indicate what happened
To help with ease of hosting the server
direct and fuzzy matching is great but it's not going to work 100% of the time, so we should create a menu of tracks from the search results and allow users to directly select the track based on the results if matching fails.
Right now we do a very rigid matching on artist and track_name in order to find the id we send to spotify to queue. We should employ some fuzzy string matching in order to match against tracks
extract_img_srcset relies on a brittle set of functions to extract the attribute, we should be doing it more safely using match and expects
Base level feature, this is needed so users can queue up the sample they're wanting to listen to
When I started the project, I was eager to get the html parsing for whosampled, and in order to move fast I went ahead and created python parsers instead of rust because I wasn't able to get the html document for the pages (cloudflare kept blocking me).
tl;dr there's a fix for that, it's using the rustls-tls feature. Here's how to configure the client correctly
let client_builder = reqwest::ClientBuilder::new();
let client = client_builder
.user_agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36")
.cookie_store(true)
.use_rustls_tls() // this is needed
.build().unwrap();
So now that we can pull the data back correctly, we can write the html parsers in rust instead!
It'll give the app a little more depth if we have a shadow on the card
Not a good feeling to have weird colors and text you can't read appear while loading.
The details screen test suite has no tests yet, but if we write IT style tests for queueing up tracks it'd be good to do it in the parent screen.
Due to the RN upgrade and the legacy setup of react-native-spotify-auth package with its aar file imports android fails to login properly.
This could be related to the configuration of the oauth in the spotify dashboard, by the time this is available to work on I'll have investigated that and eliminated that possibility
The API contract for errors is straight up bad (read: non-existent). We need:
We've moved to react-native-app-auth. We'll need to update the README TO explain the server setup steps and some other things.
Keeping 1x/2x, etc prevents us from showing the image without doctoring every url.
There's not skeleton loader so it's hard to know when data is getting fetched.
It's great that you can currently see samples, but it'd be better if we can access the entire payload so even more data can be seen.
Padding isn't fontSize, so we need to create an export of several sizes to reign in the rampant use of padding values.
If we're going to release this or run it not in dev mode, we'll have to get a build script setup.
Going to use fastlane for this.
To duplicate:
Listen to Energy by Drake
Queue up Winchester Rifle Co.. track from the hollywood sound effects library
Get Winchester by Woodkid
Easy enough to check ahead of time if there's more than 3 words in the selected track name than the matching result. if there is a disparity that large we'll opt to skip over it
Since we're scraping whosampled all the time, the solution is fundamentally flimsy. So let's offload parsed results we get into a DB via some data ingestion pipeline and store it in a DB
Right now Tracklist/index.tsx is getting a little large, let's move files out to separate components
Right now we're banking on having values in the places we expect so we're unwrap()ing without checking if it's actually safe to inside of the parse_track function. This should be rewritten with some matches in place to better protect against panics.
Goal: Rewrite parse_track function to safely unwrap and navigate thru the tree.
Right now certain artists are too long for the card to be seen, we should implement a marquis or adjust the text size so the full track and artist name are visible
Look up this song:
The app creates this URL: https://bedfellow-api.tunnelto.dev/sample-info/Milo/Pablum-//-CELESKINGIII
The actual URL is:
https://www.whosampled.com/Milo/Pablum-CELESKINGIII/
Seems safe to just strip anything that's not alphanumeric and try that instead
We're getting a warning because the ScrollView in details has the tracklist nested inside of it
We need to refactor the spotify API work so it lives within its own context export instead of sitting in the nav root. Additionally let's get the persistence of the spotify session setup.
Right now we trigger the loadData() function inside a useEffect inside of the component that's consuming the hook. Let's see if we can move that into the hook itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.