Giter Site home page Giter Site logo

swiftdiscogs's People

Contributors

jrtibbetts avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

iangmaia

swiftdiscogs's Issues

Fix authorized Discogs call failures in the simulator.

About a week ago, simulator calls to Discogs started failing with

Authorized GET for /oauth/identity; headers: ["User-Agent": "Mozilla/5.0; SwiftDiscogsApp (https://github.com/jrtibbetts/SwiftDiscogs)"]; params: [:]
"/oauth/identity" ["User-Agent": "Mozilla/5.0; SwiftDiscogsApp (https://github.com/jrtibbetts/SwiftDiscogs)"] [:]
2019-04-21 10:59:49.849680-0400 SwiftDiscogsApp[15261:3967886] CredStore - performQuery - Error copying matching creds.  Error=-25300, query={
    class = inet;
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    "r_Attributes" = 1;
    sdmn = "http://api.discogs.com";
    srvr = "api.discogs.com";
    sync = syna;
}
Couldn't sign in requestError[Error Domain=NSURLErrorDomain Code=401 "" UserInfo={OAuthSwiftError.response.data=<7b226d65 73736167 65223a20 22596f75 206d7573 74206175 7468656e 74696361 74652074 6f206163 63657373 20746869 73207265 736f7572 63652e22 7d>, Response-Headers={
    "Access-Control-Allow-Headers" = "Content-Type, authorization, User-Agent";
    "Access-Control-Allow-Methods" = "HEAD,OPTIONS,GET,OPTIONS";
    "Access-Control-Allow-Origin" = "*";
    "Access-Control-Expose-Headers" = Location;
    "Content-Length" = 61;
    "Content-Type" = "application/json";
    Date = "Sun, 21 Apr 2019 14:59:50 GMT";
    Server = "nginx/1.15.6";
    "Strict-Transport-Security" = "max-age=16000000";
    "Www-Authenticate" = "OAuth realm=\"http://api.discogs.com\"";
    "X-Content-Type-Options" = nosniff;
    "X-Discogs-Media-Type" = "discogs.v2";
    "X-Discogs-Ratelimit" = 60;
    "X-Discogs-Ratelimit-Remaining" = 58;
    "X-Discogs-Ratelimit-Used" = 2;
    "X-Frame-Options" = SAMEORIGIN;
    "X-XSS-Protection" = "1; mode=block";
}, NSErrorFailingURLKey=https://api.discogs.com/oauth/identity, NSLocalizedDescription=, Response-Body={"message": "You must authenticate to access this resource."}, OAuthSwiftError.response=<NSHTTPURLResponse: 0x600000339d20> { URL: https://api.discogs.com/oauth/identity } { Status Code: 401, Headers {
    "Access-Control-Allow-Headers" =     (
        "Content-Type, authorization, User-Agent"
    );
    "Access-Control-Allow-Methods" =     (
        "HEAD,OPTIONS,GET,OPTIONS"
    );
    "Access-Control-Allow-Origin" =     (
        "*"
    );
    "Access-Control-Expose-Headers" =     (
        Location
    );
    "Content-Length" =     (
        61
    );
    "Content-Type" =     (
        "application/json"
    );
    Date =     (
        "Sun, 21 Apr 2019 14:59:50 GMT"
    );
    Server =     (
        "nginx/1.15.6"
    );
    "Strict-Transport-Security" =     (
        "max-age=16000000"
    );
    "Www-Authenticate" =     (
        "OAuth realm=\"http://api.discogs.com\""
    );
    "X-Content-Type-Options" =     (
        nosniff
    );
    "X-Discogs-Media-Type" =     (
        "discogs.v2"
    );
    "X-Discogs-Ratelimit" =     (
        60
    );
    "X-Discogs-Ratelimit-Remaining" =     (
        58
    );
    "X-Discogs-Ratelimit-Used" =     (
        2
    );
    "X-Frame-Options" =     (
        SAMEORIGIN
    );
    "X-XSS-Protection" =     (
        "1; mode=block"
    );
} }}]

I looked into it briefly, but couldn't find any reason. It seems to have happened after I made the switch to specifying the Discogs secret key and ID in environment variables instead of in a plist, but I know that it did work for some time after that switch.

Add a collection view of artists

I had a placeholder in there, but it was causing runtime crashes for some unknown reason. I want to revisit this at some point.

Import user's collection

Since there's no API for requesting a full collection database dump and then ingesting it, I think we just have to retrieve everything one page at a time.

Create a song data object

The Discogs API doesn't current have a song or track object, so create one. (The one in the Immediate project will probably work.)

Create the playback sources view

When playing (or about to play) a track, I want to select the media source.

All available media sources should be listed.
If a source requires an account, it should have a way to sign in and out of the service, and should show the user's current signed-in status.
Sources should be reorderable according to the user's preference.

Parse embedded Discogs IDs in artist bio fields

I plan to subclass UILabel with a DiscogsLabel that finds Discogs references in plain text, converts all of it to attributed text, and adds a tap gesture for jumping to the referred-to scene.

Add a mock media library

The regular MPMediaQuery and other media classes aren't accessible when the app runs in the simulator or in unit tests, so create a mock one that can be used for those cases.

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.