Giter Club home page Giter Club logo

relistenapi's Introduction

Local Development

For local development you need redis and postgres. To make things easier there is a docker-compose.yml with a script wrapper to preload the database with information.

Pre-requistes

  1. Docker
  2. Visual Studio Code (with C# extension)
  3. .NET Core SDK 2.1+ (macOS: brew cask install dotnet-sdk)

Database Setup

Run ./start-local-databases.sh. This will check if you have the latest development backup of the database. This won't change all the time be prepared to have your database blown away and recreated when running this command in the future.

If you don't have the latest version, it will download a database backup and restore it to your docker container. This docker container is persisted to local-dev/postgers-data/pgdata so it will persist between docker launches.

In the future, if you would like to start the databases without checking for a new database backup, you can run:

docker-compose -f local-dev/docker-compose.yml up -d # the -d is optional to send the command to background

Both commands will start an Adminer server at http://localhost:18080 so that you can view the tables in the Postgres database. Here are the various connection infos to use Adminer or any other GUI tool (all hosts are 127.0.0.1 or localhost):

service port database name username password url
redis 16379 - - -
postgres 15432 relisten_db relisten local_dev_password -
adminer 18080 relisten_db relisten local_dev_password http://localhost:18080

Code Setup

  1. Open this repo folder in Visual Studio Code
  2. If prompted, restore the packages for the project
  3. Debug > Start Debugging (F5) or Debug > Start without Debugging (shift+F5)

Open the API Server at: http://localhost:3823/api-docs

relistenapi's People

Contributors

alecgorge avatar switz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

relistenapi's Issues

Shows file name instead of track name

I see stuff like DeadCo2021-08-16t01.flac instead of the title.

I have to use the “view on archive.org” to see the the titles.
The Android app “Deadhead Archives” does not have this issue.

Example are Dead And Company

  • 2021-09-07 (all)
  • 2021-09-11 (some)

Database backup curl fails

Trying to get set up for local development, after some tweaking for M1 environment I can't download the backup db and the migrations fail (and they seem to be skipping the schema creation step).

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 403
the curl command failed with: 22
gunzip: relisten.tgz: unexpected end of file
tar: Error opening archive: Failed to open 'relisten.tar'

Bubble up more metadata to collections

Our most interesting data is at the track and source level. We need to make this available efficiently at higher levels:

  • show_source_information

    • source: has_soundboard_source
    • source: source_count
    • source: max_avg_rating_weighted
    • source: has_flac
    • track: jamchart_track_count
  • year

    • source: duration
    • source: avg_duration
    • show/source: avg_rating
    • source: source_count
    • show: show_count
    • track: jamchart_track_count
  • venue_show_counts

    • show: shows_at_venue
    • track: jamchart_track_count
  • setlist_songs_plays_information

    • track: is_jamchart (only possible for features.setlist_song_play_maps_to_track, uses track_id)
    • track: duration (only possible for features.setlist_song_play_maps_to_track, uses track_id)

Scrape db.etree.org for setlist info

db.etree.org is probably a great source for setlist info. Any knowledge of how complete/accurate it is?

We might even be able to match up sources with torrent which would be cool.

@switz thoughts?

phish.in importer needs API key

See jcraigk/phishin#54.

All requests must be in the form of HTTP GET and must include the Accept: application/json header as well as a bearer auth header:

Authorization: Bearer <your_api_key>

API key is in my pnet slack

Lookup via Archive.org identifier

Hey Alec and friends,

I'm working on a project right now that is linking a webpage to Archive.org content. It would be nice to provide a link to open a show in the relisten app.

Looking at the code, I don't see a way to look up a Relisten show URL by its archive.org identifier (i.e. jrad2022-12-04 => https://relisten.net/jrad/2022/12/04 or rre2004-09-08.shnf => https://relisten.net/railroad-earth/2004/09/08?source=58709).

Am I overlooking something?

Another alternative would be a route to get the Relisten artistIdOrSlug from the upstream_identifier and then manually parse the date, which would be fine too.

recently-added should take a date limit rather than a show count

It seems like a date range is a more natural argument for the recently-added endpoint than a limit on the number of shows to return.
I'd like to display the last 90 days worth of shows rather than having to guess about what a reasonable number of shows is for each artist.

Detect 24 bit/16 bit sources

24 bit sources for the most part have a 24 bit FLAC in the formats list. 16 bits use 16 bit FLAC. shn is a 16 bit format, so that's automatically 16 bit.

Delete and reimport a single source

There's a checkbox to delete content & an input to refresh a single source, but the issue is that hitting the checkbox will delete all sources and only reimport a single.

We should make it so if a source is inputted, it only deletes that single source before re-importing.

Change archive.org reindexing logic

Right now it updates if reviewdate > created_at. This will always be true when there is a review that took place after the show was first imported. Due to archiveorg not having a reliable updateddate field we must do this:

  1. cache all latest review dates
  2. Pull details and update everything if _iguana_index_date > source last review created date or if _iguana_updated_at > source.updated_at
  3. Set source.updated_at to _iguana_updated_at

Shows display incorrect venue names

Examples: Disco Biscuits @ Revolution in 2006-03-10 gets the metadata from the show in St Pete instead of downtown Ft. Lauderdale where I set up the mics. Others include NYE 2006-12-31 which was at the tweeter center, and incorrectly says it was at the E factory in Philly.

This is not limited to the artist, other tapes of mine are not reflecting archive.org metadata. We should work together in ensuring what you pull from there is correct and in sync with etree.org and archive.org.

This is my first visit to the repo, I look forward to moving the posts forward with you on the iOS version. If you tag some issue with help-wanted I can move through them with priority. Cheers!

Missing Grateful Dead show: 1989-08-29

The 1989-08-29 show appears in Relisten, but it can't be found on archive.org. Trying to stream any of the tracks results in an error page from archive.org.

Add tier column to artists

Artists should be separated into tiers (1 = featured, 2 = normal, 3 = backlog/secondary).

Thinking each UI will have a setting to declare what tiers you want to see by default, and the rest will be hidden beneath a "folder".

Rename to relisten-api?

Should we make the naming consistent with the other repos or since its C# is that the convention?

Add deeper Phish.in integreation

Jamchart track tagging

Use Feature jam_charts. Add a column is_jamchart to source_track. Add has_jamchart_source to show_source_information

Duration for songs/:song

Showing the duration of instances of a tracks for a song requires a new Feature (setlist_song_play_maps_to_track) indicating a strong one to many relationship between song and tracks. This will require a song_id column on source_tracks and setlist_song_id

Add an endpoint to fetch recently performed shows

I'm adding a view to the Relisten app for recently performed shows. I'm currently pulling this from the recently added list and filtering it to the last three months of shows, but that means that no shows appear for artists like the Dead. It'd be great if I could just ask the API for the most recent N shows performed by an artist.

Security: API Compromised

SSL cert pinning:

SSL Report: weasley.alecgorge.com (142.44.136.241)
Assessed on: Sun, 09 May 2021 17:06:51 UTC
Try these other domain names (extracted from the certificates):

www.goudadoodle.com goudadoodle.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.