Esempio n. 1
0
        public async Task GetByIDShouldReturnValidTitle()
        {
            //ARRANGE
            var handlerMock = new Mock <HttpMessageHandler>(MockBehavior.Strict);

            handlerMock
            .Protected()
            // Setup the PROTECTED method to mock
            .Setup <Task <HttpResponseMessage> >(
                "SendAsync",
                ItExpr.IsAny <HttpRequestMessage>(),
                ItExpr.IsAny <CancellationToken>()
                )
            // prepare the expected response of the mocked http call
            .ReturnsAsync(new HttpResponseMessage()
            {
                StatusCode = HttpStatusCode.OK,
                Content    = new StringContent(jsonString),
            })
            .Verifiable();

            // use real http client with mocked handler here
            var httpClient = new HttpClient(handlerMock.Object)
            {
                BaseAddress = new Uri("http://test.com/"),
            };

            SerializerFactory serializerFactory = new SerializerFactory();

            MusicbrainzClient musicbrainz = new MusicbrainzClient(httpClient, serializerFactory);
            Musicbrainz       artist      = await musicbrainz.GetAsync("5b11f4ce-a62d-471e-81fc-a69a8278c7da");

            Assert.Equal("Q11649", artist.WikidataId);
        }
Esempio n. 2
0
        public async Task <List <CoverartArchive> > GetAsync(Musicbrainz musicbrainz)
        {
            var tasks = new List <Task <CoverartArchive> >();

            foreach (MusicbrainzAlbum musicbrainzAlbum in musicbrainz.Albums)
            {
                tasks.Add(Task.Run(() => getImage(musicbrainzAlbum.Id)));
            }

            return((await Task.WhenAll(tasks)).ToList());
        }
        public void JsonStringMagnusUgllaShouldReturnWikipediaURL()
        {
            string jsonString = "{\"id\":\"af45b4e2-eaf8-4a2f-a661-395911c1b256\",\"life-span\":{\"begin\":\"1954-06-18\",\"ended\":false,\"end\":null},\"disambiguation\":\"\",\"isnis\":[\"0000000371840480\"],\"name\":\"Magnus Uggla\",\"gender\":\"Male\",\"type-id\":\"b6e035f4-3ce9-331c-97df-83397230b0df\",\"area\":{\"sort-name\":\"Sweden\",\"iso-3166-1-codes\":[\"SE\"],\"disambiguation\":\"\",\"id\":\"23d10872-f5ae-3f0c-bf55-332788a16ecb\",\"name\":\"Sweden\"},\"release-groups\":[{\"primary-type\":\"Album\",\"title\":\"1975-2008\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"secondary-types\":[\"Compilation\"],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"2008-07-07\",\"id\":\"09f3ca7e-8b62-321a-9f77-f1e8a59a6a1c\",\"disambiguation\":\"\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[],\"secondary-type-ids\":[],\"title\":\"Alla får påsar\",\"primary-type\":\"Album\",\"disambiguation\":\"\",\"id\":\"141de8e0-1954-3b55-a998-3505832ecf6b\",\"first-release-date\":\"1993\"},{\"first-release-date\":\"2011\",\"id\":\"1a77763e-2563-4d09-aa80-c4320be0e4e9\",\"disambiguation\":\"\",\"primary-type\":\"Album\",\"title\":\"Innan filmen tagit s**t…\",\"secondary-type-ids\":[],\"secondary-types\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\"},{\"first-release-date\":\"2000\",\"disambiguation\":\"\",\"id\":\"3c303091-d42c-3d79-a0fc-11efe383bcbf\",\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Där jag är e’re alltid bäst\"},{\"primary-type\":\"Album\",\"title\":\"Godkänd Pirat - Live\",\"secondary-types\":[\"Live\"],\"secondary-type-ids\":[\"6fd474e2-6b58-3102-9d17-d6f7eb7da0a0\"],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1981\",\"disambiguation\":\"\",\"id\":\"3d420ca6-07fd-3e57-af4f-9459ab640c9c\"},{\"disambiguation\":\"\",\"id\":\"40cebbe5-6fc5-3e2c-8c23-57fbed8404ef\",\"first-release-date\":\"1980\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[],\"secondary-type-ids\":[],\"title\":\"Den ljusnande framtid är vår\",\"primary-type\":\"Album\"},{\"disambiguation\":\"\",\"id\":\"41691c04-1fe2-3f08-b43c-e49a00827ef7\",\"first-release-date\":\"1976\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[],\"secondary-type-ids\":[],\"title\":\"Livets Teater\",\"primary-type\":\"Album\"},{\"first-release-date\":\"2004\",\"disambiguation\":\"\",\"id\":\"5c47944b-801a-332e-b20a-4e88d3b073c4\",\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Den tatuerade generationen\"},{\"primary-type\":\"Album\",\"title\":\"Karaoke\",\"secondary-type-ids\":[],\"secondary-types\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1997\",\"id\":\"5c99d3c2-ceae-3c32-9796-eb23d94eb5db\",\"disambiguation\":\"\"},{\"primary-type\":\"Album\",\"title\":\"Vittring\",\"secondary-type-ids\":[],\"secondary-types\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1978\",\"id\":\"79f03e8a-752d-3bf2-a64f-5407d6d87940\",\"disambiguation\":\"\"},{\"title\":\"Ett bedårande barn av sin tid\",\"primary-type\":\"Album\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[],\"secondary-type-ids\":[],\"disambiguation\":\"\",\"id\":\"85d0c2c8-a669-304f-bb55-6e9f1404e40c\",\"first-release-date\":\"2006-02-22\"},{\"primary-type\":\"Album\",\"title\":\"Karl Gerhard passerar i revy\",\"secondary-type-ids\":[],\"secondary-types\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"2010-10-29\",\"id\":\"877e7235-ec33-4f87-be05-ee1a33fdedf6\",\"disambiguation\":\"\"},{\"secondary-types\":[\"Compilation\"],\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Klassiska mästerverk\",\"first-release-date\":\"2002\",\"disambiguation\":\"\",\"id\":\"8c2cb66e-2fa0-388a-be68-c6b0fae998bd\"},{\"title\":\"100% Uggla\",\"primary-type\":\"Album\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[\"Compilation\"],\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"id\":\"917504b1-1b35-3048-b31d-59876a0b785d\",\"first-release-date\":\"1994\"},{\"disambiguation\":\"\",\"id\":\"ab3056f9-c77d-3c65-98e7-d8471fbddcd7\",\"first-release-date\":\"1977\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[],\"secondary-type-ids\":[],\"title\":\"Va ska man ta livet av sig för när man ändå inte får höra snacket efteråt\",\"primary-type\":\"Album\"},{\"title\":\"Kung För En Dag\",\"primary-type\":\"Single\",\"primary-type-id\":\"d6038452-8ee0-3f68-affc-2de9a1ede0b9\",\"secondary-types\":[],\"secondary-type-ids\":[],\"disambiguation\":\"\",\"id\":\"b3bb4ef0-cf44-4b17-a680-03a535102767\",\"first-release-date\":\"1997\"},{\"first-release-date\":\"1985\",\"disambiguation\":\"\",\"id\":\"b4d07aa9-88e5-3074-ab83-f8f5677ae3d6\",\"primary-type\":\"Album\",\"title\":\"Retrospektivt Collage\",\"secondary-types\":[\"Compilation\"],\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\"},{\"first-release-date\":\"1983\",\"disambiguation\":\"\",\"id\":\"bdb132f9-5b43-3022-83ac-543f49ea3326\",\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Välkommen Till Folkhemmet\"},{\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Den döende dandyn\",\"first-release-date\":\"1986\",\"disambiguation\":\"\",\"id\":\"be1d7ba8-6f9b-33d8-adbf-65ce5c72771d\"},{\"first-release-date\":\"1987\",\"id\":\"d18447ef-d89e-3750-9bda-fd0585151351\",\"disambiguation\":\"\",\"secondary-type-ids\":[],\"secondary-types\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Allting som ni gör kan jag göra bättre\"},{\"primary-type\":\"Album\",\"title\":\"35-åringen\",\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1989\",\"disambiguation\":\"\",\"id\":\"d6f5940b-2035-35c2-9292-be3e369d3b73\"},{\"id\":\"e9074e6e-9f9b-3b6b-bbfa-04a9d905f5f9\",\"disambiguation\":\"\",\"first-release-date\":\"2007-10-24\",\"title\":\"Pärlor åt svinen\",\"primary-type\":\"Album\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-type-ids\":[],\"secondary-types\":[]},{\"first-release-date\":\"1989\",\"disambiguation\":\"\",\"id\":\"ec5492f8-81bf-4ce8-92ad-910ef359780c\",\"primary-type\":\"Single\",\"title\":\"Jag Mår Illa\",\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"d6038452-8ee0-3f68-affc-2de9a1ede0b9\"},{\"id\":\"fbe6d7d1-2cb8-3eef-98f7-1edf2027b9eb\",\"disambiguation\":\"\",\"first-release-date\":\"2008-08-14\",\"title\":\"Magnus Uggla! 1975-1979\",\"primary-type\":\"Album\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"secondary-types\":[\"Compilation\"]},{\"secondary-types\":[],\"secondary-type-ids\":[],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"title\":\"Om Bobbo Viking\",\"first-release-date\":\"1975\",\"disambiguation\":\"\",\"id\":\"feccec4a-01e8-3b6b-8015-6d8026261063\"}],\"end_area\":null,\"gender-id\":\"36d3d30a-839d-3eda-8cb3-29be4384e4a9\",\"ipis\":[],\"country\":\"SE\",\"relations\":[{\"type\":\"IMDb\",\"target-credit\":\"\",\"attribute-values\":{},\"end\":null,\"ended\":false,\"type-id\":\"94c8b0cc-4477-4106-932c-da60e63de61c\",\"target-type\":\"url\",\"begin\":null,\"source-credit\":\"\",\"direction\":\"forward\",\"attribute-ids\":{},\"attributes\":[],\"url\":{\"resource\":\"https://www.imdb.com/name/nm0880083/\",\"id\":\"eb32c7c7-f72b-48da-9123-b635f5e7ee33\"}},{\"url\":{\"resource\":\"http://viaf.org/viaf/95619078\",\"id\":\"f391b7ed-ea69-45e7-814f-236fecc02703\"},\"attributes\":[],\"direction\":\"forward\",\"attribute-ids\":{},\"source-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"type-id\":\"e8571dcc-35d4-4e91-a577-a3382fd84460\",\"ended\":false,\"end\":null,\"type\":\"VIAF\",\"attribute-values\":{},\"target-credit\":\"\"},{\"target-type\":\"url\",\"begin\":null,\"type-id\":\"04a5b104-a4c2-4bac-99a1-7b837c37d9e4\",\"end\":null,\"ended\":false,\"type\":\"discogs\",\"target-credit\":\"\",\"attribute-values\":{},\"attributes\":[],\"url\":{\"resource\":\"https://www.discogs.com/artist/74170\",\"id\":\"ee0c3a50-20dd-4a33-96ac-6d6d9e4872f9\"},\"direction\":\"forward\",\"attribute-ids\":{},\"source-credit\":\"\"},{\"url\":{\"id\":\"3ac5503a-46b6-480c-81af-62844797e5dd\",\"resource\":\"http://www.vittring.se/\"},\"attributes\":[],\"direction\":\"forward\",\"attribute-ids\":{},\"source-credit\":\"\",\"target-type\":\"url\",\"begin\":null,\"type-id\":\"f484f897-81cc-406e-96f9-cd799a04ee24\",\"ended\":false,\"end\":null,\"type\":\"fanpage\",\"attribute-values\":{},\"target-credit\":\"\"},{\"attribute-values\":{},\"target-credit\":\"\",\"type\":\"lyrics\",\"end\":null,\"ended\":false,\"type-id\":\"e4d73442-3762-45a8-905c-401da65544ed\",\"target-type\":\"url\",\"begin\":null,\"source-credit\":\"\",\"attribute-ids\":{},\"direction\":\"forward\",\"url\":{\"id\":\"7afd3928-4e96-40c8-a5ef-a2c07d8027f9\",\"resource\":\"http://decoda.com/magnus-uggla-lyrics\"},\"attributes\":[]},{\"direction\":\"forward\",\"attribute-ids\":{},\"attributes\":[],\"url\":{\"id\":\"610db9ea-3dac-4201-a9a1-c8e2e6de27d1\",\"resource\":\"http://www.magnusuggla.nu/\"},\"source-credit\":\"\",\"type-id\":\"fe33d22f-c3b0-4d68-bd53-a856badf2b15\",\"target-type\":\"url\",\"begin\":null,\"type\":\"official homepage\",\"attribute-values\":{},\"target-credit\":\"\",\"ended\":false,\"end\":null},{\"source-credit\":\"\",\"url\":{\"id\":\"ea65a28a-4930-4970-8226-f4c3d84d4c07\",\"resource\":\"https://d-nb.info/gnd/139021116\"},\"attributes\":[],\"attribute-ids\":{},\"direction\":\"forward\",\"ended\":false,\"end\":null,\"target-credit\":\"\",\"attribute-values\":{},\"type\":\"other databases\",\"target-type\":\"url\",\"begin\":null,\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\"},{\"url\":{\"resource\":\"https://twitter.com/KungUggla\",\"id\":\"2e591207-4af8-43dc-9dbb-48cc636a753c\"},\"attributes\":[],\"direction\":\"forward\",\"attribute-ids\":{},\"source-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"type-id\":\"99429741-f3f6-484b-84f8-23af51991770\",\"ended\":false,\"end\":null,\"type\":\"social network\",\"attribute-values\":{},\"target-credit\":\"\"},{\"type-id\":\"aac9c4bc-a5b9-30b8-9839-e3ac314c6e58\",\"begin\":null,\"target-type\":\"url\",\"attribute-values\":{},\"target-credit\":\"\",\"type\":\"songkick\",\"end\":null,\"ended\":false,\"attribute-ids\":{},\"direction\":\"forward\",\"attributes\":[],\"url\":{\"resource\":\"https://www.songkick.com/artists/436472\",\"id\":\"e560841f-ba23-4a9d-8d05-b6857fcfc4b2\"},\"source-credit\":\"\"},{\"direction\":\"forward\",\"attribute-ids\":{},\"attributes\":[],\"url\":{\"id\":\"e9a2e547-5aed-4f32-8547-25c7b8e9a21f\",\"resource\":\"https://www.wikidata.org/wiki/Q946885\"},\"source-credit\":\"\",\"type-id\":\"689870a4-a1e4-4912-b17f-7b2664215698\",\"begin\":null,\"target-type\":\"url\",\"type\":\"wikidata\",\"target-credit\":\"\",\"attribute-values\":{},\"ended\":false,\"end\":null},{\"direction\":\"forward\",\"attribute-ids\":{},\"url\":{\"id\":\"2b2e499c-49eb-40d1-8869-e7546996d3c3\",\"resource\":\"https://en.wikipedia.org/wiki/Magnus_Uggla\"},\"attributes\":[],\"source-credit\":\"\",\"type-id\":\"29651736-fa6d-48e4-aadc-a557c6add1cb\",\"begin\":null,\"target-type\":\"url\",\"type\":\"wikipedia\",\"attribute-values\":{},\"target-credit\":\"\",\"end\":null,\"ended\":false},{\"type-id\":\"6a540e5b-58c6-4192-b6ba-dbc71ec8fcf0\",\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"target-credit\":\"\",\"type\":\"youtube\",\"end\":null,\"ended\":false,\"attribute-ids\":{},\"direction\":\"forward\",\"url\":{\"resource\":\"https://www.youtube.com/user/magnusugglaVEVO\",\"id\":\"5ca9d5f6-217b-434e-830e-eae6606552ab\"},\"attributes\":[],\"source-credit\":\"\"}],\"sort-name\":\"Uggla, Magnus\",\"type\":\"Person\",\"begin_area\":{\"sort-name\":\"Stockholm\",\"disambiguation\":\"\",\"id\":\"1127ddc2-eab3-4662-8718-6adbdeea3b10\",\"name\":\"Stockholm\"}}";

            JsonTextReader reader = new JsonTextReader(new StringReader(jsonString));

            var         musicbrainzDeserializer = new MusicbrainzSerializer();
            Musicbrainz artist = musicbrainzDeserializer.Deserialize(reader, "http://musicbrainz.org/ws/2/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da?&fmt=json&inc=url-rels+release-groups");

            Assert.Equal("af45b4e2-eaf8-4a2f-a661-395911c1b256", artist.MBID);
            Assert.Equal("Q946885", artist.WikidataId);
            Assert.Equal("Magnus_Uggla", artist.WikipediaTitle);
            Assert.Equal(25, artist.Albums.Count);
        }
        public void JsonStringNirvanaShouldReturnWikidataURL()
        {
            string jsonString = "{\"country\":\"US\",\"begin_area\":{\"disambiguation\":\"\",\"sort-name\":\"Aberdeen\",\"id\":\"a640b45c-c173-49b1-8030-973603e895b5\",\"name\":\"Aberdeen\"},\"sort-name\":\"Nirvana\",\"type-id\":\"e431f5f6-b5d2-343d-8b36-72607fffb74b\",\"disambiguation\":\"90s US grunge band\",\"isnis\":[\"0000000123486830\",\"0000000123487390\"],\"id\":\"5b11f4ce-a62d-471e-81fc-a69a8278c7da\",\"name\":\"Nirvana\",\"life-span\":{\"end\":\"1994-04-05\",\"begin\":\"1988-01\",\"ended\":true},\"type\":\"Group\",\"end_area\":null,\"release-groups\":[{\"secondary-types\":[\"Compilation\"],\"title\":\"Incesticide\",\"id\":\"01cf1391-141b-3c87-8650-45ade6e59070\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"first-release-date\":\"1992-12-14\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\"},{\"primary-type\":\"Album\",\"first-release-date\":\"1993\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"title\":\"Wipeout\",\"secondary-types\":[\"Compilation\"],\"id\":\"178b993e-fa9c-36d3-9d73-c5a8ba0c748d\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"id\":\"1a0edfef-ed8a-4664-8911-1ee69c39ae26\",\"title\":\"Verse Chorus Verse\",\"secondary-types\":[\"Compilation\"],\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"first-release-date\":\"1994\",\"primary-type\":\"Album\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"title\":\"Nevermind\",\"secondary-types\":[],\"id\":\"1b022e01-4da6-387b-8658-8678046e4cef\",\"secondary-type-ids\":[],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1991-09-23\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"id\":\"2a0981fb-9593-3019-864b-ce934d97a16e\",\"title\":\"In Utero\",\"secondary-types\":[],\"disambiguation\":\"\",\"secondary-type-ids\":[],\"first-release-date\":\"1993-09-21\",\"primary-type\":\"Album\"},{\"secondary-types\":[\"Compilation\"],\"title\":\"Down With Me\",\"id\":\"339ab911-1568-32cf-8997-f00a538208c9\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"first-release-date\":\"1992\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\"},{\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"first-release-date\":\"1994\",\"primary-type\":\"Album\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"id\":\"37b1659c-7560-34cd-8946-d6f3c5c9ad92\",\"title\":\"It’s Better to Burn Out Than to Fade Away…\",\"secondary-types\":[\"Compilation\"]},{\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1994\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[\"Compilation\"],\"title\":\"Fatal Attraction\",\"id\":\"3c99a385-2ee7-339e-836e-97032a53cd23\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"title\":\"Seventh Heaven\",\"secondary-types\":[\"Compilation\"],\"id\":\"3f09f97d-3b18-336c-9760-9ebb7df3497e\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1992\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"title\":\"Outcesticide II: The Needle & The Damage Done\",\"secondary-types\":[\"Compilation\"],\"id\":\"584b7e62-d8b5-378e-986c-dfc78e1fc06e\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1994\"},{\"primary-type\":\"Album\",\"first-release-date\":\"1994\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"secondary-types\":[\"Compilation\"],\"title\":\"The Very Best\",\"id\":\"5bcaeba6-a532-3fa0-b540-75c09f70f759\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\"},{\"title\":\"Outcesticide III: The Final Solution\",\"secondary-types\":[\"Compilation\"],\"id\":\"5dba01ed-b4e9-394e-a875-c7c2ff052133\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"primary-type\":\"Album\",\"first-release-date\":\"1995\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\"},{\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1995\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"title\":\"B-Side Themselves\",\"secondary-types\":[\"Compilation\"],\"id\":\"60c826fb-8853-3796-8ff2-16c35f362ec9\"},{\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1995\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"title\":\"Pay to Play\",\"secondary-types\":[\"Compilation\"],\"id\":\"6c44f64a-58e4-3e94-8458-788712f6c6aa\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[\"Compilation\"],\"title\":\"Before We Ever Minded\",\"id\":\"85155291-222f-388a-a5f7-dcaa60b65afd\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1992\"},{\"first-release-date\":\"1993\",\"primary-type\":\"Album\",\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"id\":\"915dc49e-8203-31b8-bb19-ca5996a2b810\",\"title\":\"In Utero Demos\",\"secondary-types\":[\"Compilation\"],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\"},{\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1994\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[\"Compilation\"],\"title\":\"Outcesticide: In Memory of Kurt Cobain\",\"id\":\"9f42e883-12a4-3790-b3c1-0e2982f2d832\"},{\"id\":\"bcbe3ddf-7901-315c-8282-f0e9d5b88285\",\"title\":\"Heart Shaped Box, Volume 2\",\"secondary-types\":[\"Compilation\"],\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1994\",\"primary-type\":\"Album\",\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"]},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[\"Compilation\"],\"title\":\"Dark Emotion\",\"id\":\"e602b067-c9eb-31eb-bed0-80e4245d5d54\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1999\"},{\"secondary-type-ids\":[],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"title\":\"Incesticide\",\"secondary-types\":[],\"id\":\"ec50e04b-bec9-4f18-bff8-59e4be64f7bd\"},{\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"id\":\"ee7695bc-fde5-3a84-8ebb-195fa5ee6c2d\",\"title\":\"Outcesticide V: Disintegration\",\"secondary-types\":[\"Compilation\"],\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"first-release-date\":\"1998\",\"primary-type\":\"Album\"},{\"id\":\"f19ee94e-afaf-37c8-a80a-413da055740d\",\"secondary-types\":[\"Compilation\"],\"title\":\"Never the Same Thing\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1996\",\"primary-type\":\"Album\",\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"]},{\"disambiguation\":\"\",\"secondary-type-ids\":[],\"first-release-date\":\"1989-06-01\",\"primary-type\":\"Album\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"id\":\"f1afec0b-26dd-3db5-9aa1-c91229a74a24\",\"secondary-types\":[],\"title\":\"Bleach\"},{\"id\":\"fdeebee4-b749-31c4-8a9b-d8d25cd9a43a\",\"secondary-types\":[\"Compilation\"],\"title\":\"Grunge Is Dead\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"first-release-date\":\"1994\",\"primary-type\":\"Album\",\"disambiguation\":\"\",\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"]},{\"secondary-type-ids\":[\"dd2a21e1-0c00-3729-a7a0-de60b84eb5d1\"],\"disambiguation\":\"\",\"primary-type\":\"Album\",\"first-release-date\":\"1995\",\"primary-type-id\":\"f529b476-6e62-324f-b0aa-1f3e33d313fc\",\"secondary-types\":[\"Compilation\"],\"title\":\"Twilight of the Gods\",\"id\":\"ff9dec8b-3674-35a3-aa39-9f9ba3d30b71\"}],\"relations\":[{\"begin\":null,\"target-type\":\"url\",\"attribute-values\":{},\"end\":null,\"target-credit\":\"\",\"source-credit\":\"\",\"type-id\":\"d028a975-000c-4525-9333-d3c8425e4b54\",\"attributes\":[],\"direction\":\"forward\",\"ended\":false,\"url\":{\"id\":\"627ce98c-0eef-41c7-b28f-cc3387b98aab\",\"resource\":\"https://www.bbc.co.uk/music/artists/5b11f4ce-a62d-471e-81fc-a69a8278c7da\"},\"type\":\"BBC Music page\",\"attribute-ids\":{}},{\"type-id\":\"94c8b0cc-4477-4106-932c-da60e63de61c\",\"attributes\":[],\"direction\":\"forward\",\"ended\":false,\"url\":{\"resource\":\"https://www.imdb.com/name/nm1110321/\",\"id\":\"85229dcd-cc79-4ce8-a3be-4b0539e9148a\"},\"attribute-ids\":{},\"type\":\"IMDb\",\"begin\":null,\"target-type\":\"url\",\"end\":null,\"attribute-values\":{},\"source-credit\":\"\",\"target-credit\":\"\"},{\"type-id\":\"e8571dcc-35d4-4e91-a577-a3382fd84460\",\"attributes\":[],\"direction\":\"forward\",\"ended\":false,\"type\":\"VIAF\",\"url\":{\"resource\":\"http://viaf.org/viaf/138573893\",\"id\":\"421a959a-c50f-4a52-99e4-3c603dd37145\"},\"attribute-ids\":{},\"begin\":null,\"target-type\":\"url\",\"end\":null,\"attribute-values\":{},\"source-credit\":\"\",\"target-credit\":\"\"},{\"url\":{\"resource\":\"https://www.allmusic.com/artist/mn0000357406\",\"id\":\"4a425cd3-641d-409c-a282-2334935bf1bd\"},\"attribute-ids\":{},\"type\":\"allmusic\",\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"6b3e3c85-0002-4f34-aca6-80ace0d7e846\",\"target-credit\":\"\",\"source-credit\":\"\",\"attribute-values\":{},\"end\":null,\"target-type\":\"url\",\"begin\":null},{\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"end\":null,\"target-credit\":\"\",\"source-credit\":\"\",\"type-id\":\"4fb0eeec-a6eb-4ae3-ad52-b55765b94e8f\",\"direction\":\"forward\",\"attributes\":[],\"ended\":false,\"attribute-ids\":{},\"url\":{\"resource\":\"http://www.livenirvana.com/bootography/listing85a9.html?listingquery=all\",\"id\":\"73a6779b-8aaa-42ff-9833-e550ad974be4\"},\"type\":\"discography\"},{\"ended\":false,\"url\":{\"id\":\"aa2f9928-f2d0-4ce3-9714-af7566b9df94\",\"resource\":\"http://www.livenirvana.com/digitalnirvana/discography/index.html\"},\"type\":\"discography\",\"attribute-ids\":{},\"type-id\":\"4fb0eeec-a6eb-4ae3-ad52-b55765b94e8f\",\"attributes\":[],\"direction\":\"forward\",\"target-credit\":\"\",\"source-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"attribute-values\":{},\"end\":null},{\"end\":null,\"attribute-values\":{},\"target-type\":\"url\",\"begin\":null,\"source-credit\":\"\",\"target-credit\":\"\",\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"4fb0eeec-a6eb-4ae3-ad52-b55765b94e8f\",\"attribute-ids\":{},\"url\":{\"resource\":\"http://www.nirvanaarchive.com/\",\"id\":\"d0498330-0679-4174-a145-273dd974e09e\"},\"type\":\"discography\",\"ended\":false},{\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"end\":null,\"target-credit\":\"\",\"source-credit\":\"\",\"type-id\":\"04a5b104-a4c2-4bac-99a1-7b837c37d9e4\",\"direction\":\"forward\",\"attributes\":[],\"ended\":false,\"type\":\"discogs\",\"url\":{\"resource\":\"https://www.discogs.com/artist/125246\",\"id\":\"81846eca-af41-43d0-bcae-b62dbf5cfa2f\"},\"attribute-ids\":{}},{\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"f484f897-81cc-406e-96f9-cd799a04ee24\",\"type\":\"fanpage\",\"url\":{\"resource\":\"http://www.livenirvana.com/\",\"id\":\"74c7fc4f-cb3d-45ef-9c83-f7a1061f0272\"},\"attribute-ids\":{},\"ended\":false,\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\",\"source-credit\":\"\",\"target-credit\":\"\"},{\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"end\":null,\"target-credit\":\"\",\"source-credit\":\"\",\"type-id\":\"f484f897-81cc-406e-96f9-cd799a04ee24\",\"attributes\":[],\"direction\":\"forward\",\"ended\":false,\"attribute-ids\":{},\"url\":{\"id\":\"e42476ce-e923-498e-8e98-d11ae200aebb\",\"resource\":\"http://www.nirvanaclub.com/\"},\"type\":\"fanpage\"},{\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"target-type\":\"url\",\"begin\":null,\"url\":{\"id\":\"c29fa499-8e33-455a-aaa0-d93ea088c55f\",\"resource\":\"http://www.pandora.com/nirvana\"},\"attribute-ids\":{},\"type\":\"free streaming\",\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"769085a1-c2f7-4c24-a532-2375a77693bd\"},{\"type-id\":\"769085a1-c2f7-4c24-a532-2375a77693bd\",\"direction\":\"forward\",\"attributes\":[],\"ended\":false,\"type\":\"free streaming\",\"url\":{\"resource\":\"http://www.staimusic.com/en/bands/nirvana_3237.html\",\"id\":\"3b8fd2ea-4090-4328-9c2a-bb11bd038f8b\"},\"attribute-ids\":{},\"target-type\":\"url\",\"begin\":null,\"end\":null,\"attribute-values\":{},\"source-credit\":\"\",\"target-credit\":\"\"},{\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"769085a1-c2f7-4c24-a532-2375a77693bd\",\"type\":\"free streaming\",\"url\":{\"resource\":\"https://open.spotify.com/artist/6olE6TJLqED3rqDCT0FyPh\",\"id\":\"f6a499eb-5959-4861-95f1-13caec960006\"},\"attribute-ids\":{},\"ended\":false,\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\",\"source-credit\":\"\",\"target-credit\":\"\"},{\"begin\":null,\"target-type\":\"url\",\"end\":null,\"attribute-values\":{},\"source-credit\":\"\",\"target-credit\":\"\",\"type-id\":\"221132e9-e30e-43f2-a741-15afc4c5fa7c\",\"attributes\":[],\"direction\":\"forward\",\"ended\":false,\"url\":{\"id\":\"88867281-e540-4b37-9fce-870dda1bfd8b\",\"resource\":\"https://commons.wikimedia.org/wiki/File:Nirvana_around_1992.jpg\"},\"type\":\"image\",\"attribute-ids\":{}},{\"begin\":null,\"target-type\":\"url\",\"attribute-values\":{},\"end\":null,\"target-credit\":\"\",\"source-credit\":\"\",\"type-id\":\"08db8098-c0df-4b78-82c3-c8697b4bba7f\",\"direction\":\"forward\",\"attributes\":[],\"ended\":false,\"url\":{\"resource\":\"https://www.last.fm/music/Nirvana\",\"id\":\"36dc918b-2a58-4d31-9ccd-10af003e7386\"},\"type\":\"last.fm\",\"attribute-ids\":{}},{\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"e4d73442-3762-45a8-905c-401da65544ed\",\"url\":{\"id\":\"2759d810-5a97-446e-b168-09d2dec389a9\",\"resource\":\"http://decoda.com/nirvana-lyrics\"},\"type\":\"lyrics\",\"attribute-ids\":{},\"ended\":false,\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\",\"source-credit\":\"\",\"target-credit\":\"\"},{\"target-credit\":\"\",\"source-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"attribute-values\":{},\"end\":null,\"ended\":false,\"url\":{\"id\":\"eb2efdf0-05cf-4ea8-bc00-b1b0d2bcdcfb\",\"resource\":\"http://genius.com/artists/Nirvana\"},\"attribute-ids\":{},\"type\":\"lyrics\",\"type-id\":\"e4d73442-3762-45a8-905c-401da65544ed\",\"attributes\":[],\"direction\":\"forward\"},{\"ended\":false,\"url\":{\"id\":\"47e69f92-e4b3-46ca-9f95-28cc11bedf34\",\"resource\":\"http://lyrics.wikia.com/Nirvana\"},\"attribute-ids\":{},\"type\":\"lyrics\",\"type-id\":\"e4d73442-3762-45a8-905c-401da65544ed\",\"direction\":\"forward\",\"attributes\":[],\"source-credit\":\"\",\"target-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"end\":null,\"attribute-values\":{}},{\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"e4d73442-3762-45a8-905c-401da65544ed\",\"url\":{\"resource\":\"http://muzikum.eu/en/122-4216/nirvana/lyrics.html\",\"id\":\"740505c7-3a30-4482-8ca6-10183b37d308\"},\"attribute-ids\":{},\"type\":\"lyrics\",\"ended\":false,\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\",\"source-credit\":\"\",\"target-credit\":\"\"},{\"ended\":false,\"attribute-ids\":{},\"url\":{\"resource\":\"https://myspace.com/nirvana\",\"id\":\"706cb178-5d5c-49e0-a07f-149751b94043\"},\"type\":\"myspace\",\"type-id\":\"bac47923-ecde-4b59-822e-d08f0cd10156\",\"direction\":\"forward\",\"attributes\":[],\"target-credit\":\"\",\"source-credit\":\"\",\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"end\":null},{\"begin\":null,\"target-type\":\"url\",\"end\":null,\"attribute-values\":{},\"source-credit\":\"\",\"target-credit\":\"\",\"type-id\":\"fe33d22f-c3b0-4d68-bd53-a856badf2b15\",\"direction\":\"forward\",\"attributes\":[],\"ended\":false,\"type\":\"official homepage\",\"url\":{\"id\":\"4347ffe2-82ec-4059-9520-6a1a3f73a304\",\"resource\":\"http://www.nirvana.com/\"},\"attribute-ids\":{}},{\"attribute-values\":{},\"end\":null,\"target-type\":\"url\",\"begin\":null,\"target-credit\":\"\",\"source-credit\":\"\",\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\",\"url\":{\"id\":\"88a3f586-d383-4cd8-9458-f48512533799\",\"resource\":\"http://d-nb.info/gnd/10295339-9\"},\"attribute-ids\":{},\"type\":\"other databases\",\"ended\":false},{\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\",\"attributes\":[],\"direction\":\"forward\",\"ended\":false,\"attribute-ids\":{},\"url\":{\"id\":\"222144c5-b46d-4d67-9f56-e9fb654e2e86\",\"resource\":\"http://id.loc.gov/authorities/names/n92011111\"},\"type\":\"other databases\",\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"end\":null,\"target-credit\":\"\",\"source-credit\":\"\"},{\"ended\":false,\"url\":{\"resource\":\"http://musicmoz.org/Bands_and_Artists/N/Nirvana/\",\"id\":\"21daaa31-4c41-4fc9-b07d-e77b3f01d3e6\"},\"attribute-ids\":{},\"type\":\"other databases\",\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\",\"direction\":\"forward\",\"attributes\":[],\"target-credit\":\"\",\"source-credit\":\"\",\"target-type\":\"url\",\"begin\":null,\"attribute-values\":{},\"end\":null},{\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"target-type\":\"url\",\"begin\":null,\"type\":\"other databases\",\"url\":{\"id\":\"07a468c6-3ceb-4e44-b0b9-f46cca1151dc\",\"resource\":\"http://rateyourmusic.com/artist/nirvana\"},\"attribute-ids\":{},\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\"},{\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\",\"type\":\"other databases\",\"url\":{\"resource\":\"http://www.whosampled.com/Nirvana/\",\"id\":\"805e0346-cdfb-4eae-a8c4-f27937288cda\"},\"attribute-ids\":{},\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\"},{\"type\":\"other databases\",\"url\":{\"id\":\"2127a8c5-befb-401c-a6f0-057b4f4a4581\",\"resource\":\"http://www.worldcat.org/wcidentities/lccn-n92-11111\"},\"attribute-ids\":{},\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\",\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"target-type\":\"url\",\"begin\":null},{\"target-credit\":\"\",\"source-credit\":\"\",\"attribute-values\":{},\"end\":null,\"begin\":null,\"target-type\":\"url\",\"url\":{\"id\":\"96d41441-df74-4dda-8a0f-c99462b22a7c\",\"resource\":\"https://catalogue.bnf.fr/ark:/12148/cb13944446b\"},\"type\":\"other databases\",\"attribute-ids\":{},\"ended\":false,\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\"},{\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\",\"attribute-ids\":{},\"url\":{\"id\":\"1631d12d-9c1f-4899-a2d4-f54ffe615ca1\",\"resource\":\"https://nla.gov.au/nla.party-1179730\"},\"type\":\"other databases\",\"ended\":false,\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\"},{\"url\":{\"resource\":\"https://www.musik-sammler.de/artist/nirvana/\",\"id\":\"902a6503-ed52-4207-ae6e-f1a64dc53888\"},\"type\":\"other databases\",\"attribute-ids\":{},\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"d94fb61c-fa20-4e3c-a19a-71a949fb2c55\",\"target-credit\":\"\",\"source-credit\":\"\",\"attribute-values\":{},\"end\":null,\"begin\":null,\"target-type\":\"url\"},{\"source-credit\":\"\",\"target-credit\":\"\",\"target-type\":\"url\",\"begin\":null,\"end\":null,\"attribute-values\":{},\"ended\":false,\"type\":\"purchase for download\",\"url\":{\"id\":\"9fc44b9f-8ca9-4079-952f-fcd8a2976dbf\",\"resource\":\"https://itunes.apple.com/us/artist/id112018\"},\"attribute-ids\":{},\"type-id\":\"f8319a2f-f824-4617-81c8-be6560b3b203\",\"attributes\":[],\"direction\":\"forward\"},{\"target-credit\":\"\",\"source-credit\":\"\",\"attribute-values\":{},\"end\":null,\"begin\":null,\"target-type\":\"url\",\"url\":{\"id\":\"adb16d0b-c38d-471c-b3da-4f715267f620\",\"resource\":\"https://play.google.com/store/music/artist?id=Apyli2ev5del3s42qsjpnmqwuue\"},\"type\":\"purchase for download\",\"attribute-ids\":{},\"ended\":false,\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"f8319a2f-f824-4617-81c8-be6560b3b203\"},{\"target-credit\":\"\",\"source-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"attribute-values\":{},\"end\":null,\"ended\":false,\"attribute-ids\":{},\"url\":{\"id\":\"61139a11-0318-481d-b305-bf569e400e50\",\"resource\":\"http://www.purevolume.com/Nirvana109A\"},\"type\":\"purevolume\",\"type-id\":\"b6f02157-a9d3-4f24-9057-0675b2dbc581\",\"attributes\":[],\"direction\":\"forward\"},{\"attribute-ids\":{},\"url\":{\"resource\":\"http://www.secondhandsongs.com/artist/169\",\"id\":\"5f33ae58-aa56-40bd-ad14-ab7db9b3d3fd\"},\"type\":\"secondhandsongs\",\"ended\":false,\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"79c5b84d-a206-4f4c-9832-78c028c312c3\",\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"target-type\":\"url\",\"begin\":null},{\"attribute-values\":{},\"end\":null,\"begin\":null,\"target-type\":\"url\",\"target-credit\":\"\",\"source-credit\":\"\",\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"bf5d0d5e-27a1-4e94-9df7-3cdc67b3b207\",\"url\":{\"resource\":\"https://www.setlist.fm/setlists/nirvana-7bd69ee8.html\",\"id\":\"47616077-74cb-47c6-8bd4-cf34753a9af0\"},\"type\":\"setlistfm\",\"attribute-ids\":{},\"ended\":false},{\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"99429741-f3f6-484b-84f8-23af51991770\",\"url\":{\"resource\":\"https://twitter.com/Nirvana\",\"id\":\"f5cfd704-b99a-45fc-9aed-8747257cad03\"},\"attribute-ids\":{},\"type\":\"social network\",\"ended\":false,\"attribute-values\":{},\"end\":null,\"target-type\":\"url\",\"begin\":null,\"target-credit\":\"\",\"source-credit\":\"\"},{\"ended\":false,\"url\":{\"id\":\"a9cec2d1-0544-4dc9-a4b2-640751654573\",\"resource\":\"https://www.facebook.com/Nirvana\"},\"attribute-ids\":{},\"type\":\"social network\",\"type-id\":\"99429741-f3f6-484b-84f8-23af51991770\",\"direction\":\"forward\",\"attributes\":[],\"source-credit\":\"\",\"target-credit\":\"\",\"target-type\":\"url\",\"begin\":null,\"end\":null,\"attribute-values\":{}},{\"url\":{\"id\":\"24639f7d-d335-4ced-9e02-0971d71c29d4\",\"resource\":\"https://www.instagram.com/nirvana/\"},\"type\":\"social network\",\"attribute-ids\":{},\"ended\":false,\"direction\":\"forward\",\"attributes\":[],\"type-id\":\"99429741-f3f6-484b-84f8-23af51991770\",\"source-credit\":\"\",\"target-credit\":\"\",\"end\":null,\"attribute-values\":{},\"begin\":null,\"target-type\":\"url\"},{\"target-credit\":\"\",\"source-credit\":\"\",\"attribute-values\":{},\"end\":null,\"begin\":null,\"target-type\":\"url\",\"type\":\"soundcloud\",\"url\":{\"id\":\"14c6ec03-4bd8-4f12-bfef-f2450746adab\",\"resource\":\"https://soundcloud.com/nirvana\"},\"attribute-ids\":{},\"ended\":false,\"attributes\":[],\"direction\":\"forward\",\"type-id\":\"89e4a949-0976-440d-bda1-5f772c1e5710\"},{\"source-credit\":\"\",\"target-credit\":\"\",\"begin\":null,\"target-type\":\"url\",\"end\":null,\"attribute-values\":{},\"ended\":false,\"type\":\"wikidata\",\"url\":{\"resource\":\"https://www.wikidata.org/wiki/Q11649\",\"id\":\"1221730c-3a48-49fa-8001-beaa6e93c892\"},\"attribute-ids\":{},\"type-id\":\"689870a4-a1e4-4912-b17f-7b2664215698\",\"direction\":\"forward\",\"attributes\":[]},{\"type-id\":\"6a540e5b-58c6-4192-b6ba-dbc71ec8fcf0\",\"direction\":\"forward\",\"attributes\":[],\"ended\":false,\"attribute-ids\":{},\"url\":{\"id\":\"c8d415be-b993-4ade-bd28-d3ab4806fcbd\",\"resource\":\"https://www.youtube.com/user/NirvanaVEVO\"},\"type\":\"youtube\",\"target-type\":\"url\",\"begin\":null,\"end\":null,\"attribute-values\":{},\"source-credit\":\"\",\"target-credit\":\"\"}],\"gender-id\":null,\"gender\":null,\"area\":{\"iso-3166-1-codes\":[\"US\"],\"disambiguation\":\"\",\"id\":\"489ce91b-6658-3307-9877-795b68554c98\",\"sort-name\":\"United States\",\"name\":\"United States\"},\"ipis\":[]}";

            JsonTextReader reader = new JsonTextReader(new StringReader(jsonString));

            var         musicbrainzDeserializer = new MusicbrainzSerializer();
            Musicbrainz artist = musicbrainzDeserializer.Deserialize(reader, "http://musicbrainz.org/ws/2/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da?&fmt=json&inc=url-rels+release-groups");

            Assert.Equal("5b11f4ce-a62d-471e-81fc-a69a8278c7da", artist.MBID);
            Assert.Equal("Q11649", artist.WikidataId);
            Assert.Null(artist.WikipediaTitle);
            Assert.Equal(25, artist.Albums.Count);
        }
Esempio n. 5
0
        public async Task <ActionResult <ArtistViewModel> > GetAsync(string mbid)
        {
            Musicbrainz musicbrainz = await _musicbrainz.GetAsync(mbid);

            if (musicbrainz.MBID == null)
            {
                return(new NotFoundResult());
            }

            var wikipediaTask = _wikipedia.GetAsync(musicbrainz);
            var coverartTask  = _coverartArchive.GetAsync(musicbrainz);

            await Task.WhenAll(wikipediaTask, coverartTask);

            return(buildAlbumViewModel(musicbrainz, await wikipediaTask, await coverartTask));
        }
Esempio n. 6
0
        public async Task TestMockedController()
        {
            var musicbrainz = new Musicbrainz(
                "5b11f4ce-a62d-471e-81fc-a69a8278c7da",
                "wikidata-id",
                "wikipedia-title",
                new List <MusicbrainzAlbum>()
            {
                new MusicbrainzAlbum("album-id", "album-title")
            }
                );

            var mockMusicbrainzClient = new Mock <IMusicbrainzClient>(MockBehavior.Strict);

            mockMusicbrainzClient.Setup(x => x.GetAsync("5b11f4ce-a62d-471e-81fc-a69a8278c7da")).Returns(Task.FromResult(
                                                                                                             musicbrainz
                                                                                                             ));

            var mockWikipediaClient = new Mock <IWikipediaClient>(MockBehavior.Strict);

            mockWikipediaClient.Setup(x => x.GetAsync(musicbrainz)).Returns(Task.FromResult(
                                                                                new Wikipedia(
                                                                                    "testar bara description"
                                                                                    )
                                                                                ));

            var mockCoverartClient = new Mock <ICoverartArchiveClient>(MockBehavior.Strict);

            mockCoverartClient.Setup(x => x.GetAsync(musicbrainz)).Returns(Task.FromResult(
                                                                               new List <CoverartArchive>()
            {
                new CoverartArchive(
                    "5b11f4ce-a62d-471e-81fc-a69a8278c7da",
                    "coverart-image"
                    )
            }
                                                                               ));

            MashupController controller = new MashupController(mockMusicbrainzClient.Object, mockWikipediaClient.Object, mockCoverartClient.Object);

            ActionResult <ArtistViewModel> result = await controller.GetAsync("5b11f4ce-a62d-471e-81fc-a69a8278c7da");

            Assert.Equal("5b11f4ce-a62d-471e-81fc-a69a8278c7da", result.Value.MBID);
        }
        public static Collection <PartialMatche> Search(string album, string artistName)
        {
            Uri      strUrl       = new Uri(string.Format(@"http://www.musicbrainz.org/ws/2/release/?query=release:%22{0}%22%20AND%20artist:%22{1}%22", album, artistName));
            XElement restResponse = null;
            string   rest         = Util.GetRest(strUrl);

            if (string.IsNullOrWhiteSpace(rest) == false)
            {
                restResponse = XElement.Parse(rest);
            }

            if (restResponse == null)
            {
                return(null);
            }
            else
            {
                return(Musicbrainz.ToPartialMatche(restResponse));
            }
        }
Esempio n. 8
0
        private ArtistViewModel buildAlbumViewModel(Musicbrainz musicbrainz, Wikipedia wikipedia, IList <CoverartArchive> coverarts)
        {
            ArtistViewModel artistViewModel = new ArtistViewModel();

            artistViewModel.Albums = new List <AlbumViewModel>();

            artistViewModel.MBID        = musicbrainz.MBID;
            artistViewModel.Description = wikipedia.Description;

            foreach (var album in musicbrainz.Albums)
            {
                artistViewModel.Albums.Add(new AlbumViewModel()
                {
                    Id    = album.Id,
                    Title = album.Title,
                    Image = coverarts.FirstOrDefault(x => x.Id == album.Id)?.Image
                });
            }

            return(artistViewModel);
        }
Esempio n. 9
0
        public async Task <Wikipedia> GetAsync(Musicbrainz musicbrainz)
        {
            string title = musicbrainz.WikipediaTitle;

            if (String.IsNullOrEmpty(title) && musicbrainz.WikidataId != null)
            {
                Wikidata wikidata = await _wikidata.GetTitle(musicbrainz.WikidataId);

                if (wikidata != null)
                {
                    title = wikidata.Title;
                }
            }

            if (!String.IsNullOrEmpty(title))
            {
                return(await getDescription(title));
            }
            else
            {
                throw new Exception();
            }
        }
        public static Hashtable Parse(string id)
        {
            Hashtable objResuls = new Hashtable();

            try
            {
                Uri    strUrl  = new Uri(string.Format(@"http://musicbrainz.org/ws/2/release/{0}?inc=artist-credits+labels+discids+recordings+release-groups&fmt=json", id));
                string results = Util.GetRest(strUrl);
                //FIX 2.7.12.0
                if (string.IsNullOrWhiteSpace(results) == false)
                {
                    JObject     restResponse = JObject.Parse(results);
                    Musicbrainz music        = Musicbrainz.ToObject(restResponse);

                    #region FanArt
                    if (string.IsNullOrWhiteSpace(music.GroupID) == false && string.IsNullOrWhiteSpace(music.ArtistId) == false)
                    {
                        FanArt images = FanArtServices.ParseArtist(music.ArtistId, music.GroupID);
                        if (images != null)
                        {
                            if (string.IsNullOrWhiteSpace(images.Albumcover) == false)
                            {
                                objResuls.Add("Image", images.Albumcover);
                            }

                            if (string.IsNullOrWhiteSpace(images.ArtistName) == false)
                            {
                                Artist artist = new Artist();
                                artist.FulleName = images.ArtistName;
                                artist.Picture   = Util.GetImage(images.ArtistCover);

                                objResuls.Add("Artist", artist);
                            }

                            if (string.IsNullOrWhiteSpace(images.ArtistBackground) == false)
                            {
                                objResuls.Add("Background", images.ArtistBackground);
                            }

                            if (string.IsNullOrWhiteSpace(images.Cdart) == false)
                            {
                                objResuls.Add("Cdart", images.Cdart);
                            }
                        }
                    }
                    #endregion
                    objResuls.Add("Links", strUrl);
                    objResuls.Add("Title", music.AlbumName);

                    #region Album

                    objResuls.Add("Album", music.AlbumName);

                    #endregion

                    #region Editor

                    if (music.Studio != null)
                    {
                        objResuls.Add("Editor", music.Studio);
                    }

                    #endregion
                    #region ReleaseDate
                    if (string.IsNullOrWhiteSpace(music.AlbumReleased) == false)
                    {
                        DateTime date;
                        if (DateTime.TryParse(music.AlbumReleased, new CultureInfo("en-US"), DateTimeStyles.None,
                                              out date))
                        {
                            objResuls.Add("Released", date);
                        }
                    }
                    #endregion
                    #region Runtime

                    if (music.AlbumDuration > 0)
                    {
                        objResuls.Add("Runtime", music.AlbumDuration);
                    }

                    #endregion

                    #region Tracks

                    objResuls.Add("Tracks", music.AlbumTracks);

                    #endregion
                    #region BarCode

                    objResuls.Add("BarCode", music.Barcode);

                    #endregion
                }
                return(objResuls);
            }
            catch (Exception ex)
            {
                Util.LogException(ex, id);
                return(null);
            }
        }