Giter Club home page Giter Club logo

concertbuddy's People

Contributors

skuill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

concertbuddy's Issues

Refactoring. MusicSearcherClient has many responsibilities and bottleneck

Transfer the logic of music search (MusicSearcherClient ) on platforms (Spotify, Yandex) in the identified classes and the track/artist objects passed between them, filling in the necessary properties in the methods.

MusicTrack and MusicArtist contains contain redundant information from every platform.

Can't find Wu tang artist's information and tracks

Logs:

2022-02-01 09:49:27.143 +00:00 [Debug] [MusicSearcher.MusicSearcherClient] Find artists for [Wu tang]: Wu‐Tang Clan [score: 100]; Wu tang Switch [score: 88]; Wu-Tang Killa Bees [score: 84]; Wu-Tang Yellow Jacketz [score: 79]; Ghostface Killah [score: 58]
2022-02-01 09:49:31.823 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.ArtistCommand] Handle [/artist] command: [/artist 0febdcf7-4e1f-4661-9493-b40427de2c13]
2022-02-01 09:49:32.159 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 118
2022-02-01 09:49:35.585 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TopCommand] Handle [/top] command: [/top track 0febdcf7-4e1f-4661-9493-b40427de2c13]
2022-02-01 09:49:35.826 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 118
2022-02-01 09:49:35.834 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist [] from Spotify.
System.ArgumentException: String is empty or null (Parameter 'query')
at SpotifyAPI.Web.Ensure.ArgumentNotNullOrEmptyString(String value, String name)
at SpotifyAPI.Web.SearchRequest..ctor(Types type, String query)
at MusicSearcher.MusicSearcherClient.SearchSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 199
2022-02-01 09:49:35.839 +00:00 [Error] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TopCommand] Can't find top tracks for artist [] with mbid [0febdcf7-4e1f-4661-9493-b40427de2c13]
2022-02-01 09:49:45.565 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.SetlistsCommand] Handle [/setlists] command: [/setlists 1 0 0febdcf7-4e1f-4661-9493-b40427de2c13]
2022-02-01 09:49:51.968 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.SetlistCommand] Handle [/setlist] command: [/setlist 0febdcf7-4e1f-4661-9493-b40427de2c13 438d4b2f]
2022-02-01 09:50:01.600 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track 0febdcf7-4e1f-4661-9493-b40427de2c13 Shame on a Nigga]
2022-02-01 09:50:02.146 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 118
2022-02-01 09:50:02.453 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shame on a Nigga] for artist [] from Spotify.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 184
2022-02-01 09:50:02.999 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shame on a Nigga] for artist [] from Yandex.
System.Exception: Can't get track [Shame on a Nigga] for artist [] from Yandex.
at MusicSearcher.MusicSearcherClient.SearchYandexTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 162
2022-02-01 09:50:39.299 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track 0febdcf7-4e1f-4661-9493-b40427de2c13 Shimmy Shimmy Ya]
2022-02-01 09:50:39.535 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 118
2022-02-01 09:50:39.814 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shimmy Shimmy Ya] for artist [] from Spotify.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 184
2022-02-01 09:50:40.215 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shimmy Shimmy Ya] for artist [] from Yandex.
System.Exception: Can't get track [Shimmy Shimmy Ya] for artist [] from Yandex.
at MusicSearcher.MusicSearcherClient.SearchYandexTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 162
2022-02-01 09:51:06.827 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track 0febdcf7-4e1f-4661-9493-b40427de2c13 Shimmy Shimmy Ya]
2022-02-01 09:51:07.066 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 118
2022-02-01 09:51:07.219 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shimmy Shimmy Ya] for artist [] from Spotify.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 184
2022-02-01 09:51:07.429 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shimmy Shimmy Ya] for artist [] from Yandex.
System.Exception: Can't get track [Shimmy Shimmy Ya] for artist [] from Yandex.
at MusicSearcher.MusicSearcherClient.SearchYandexTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 162
2022-02-01 09:51:25.627 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track 0febdcf7-4e1f-4661-9493-b40427de2c13 Shimmy Shimmy Ya]
2022-02-01 09:51:25.869 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 131
2022-02-01 09:51:26.040 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shimmy Shimmy Ya] for artist [] from Spotify.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 184
2022-02-01 09:51:26.269 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shimmy Shimmy Ya] for artist [] from Yandex.
System.Exception: Can't get track [Shimmy Shimmy Ya] for artist [] from Yandex.
at MusicSearcher.MusicSearcherClient.SearchYandexTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 162
2022-02-01 09:51:29.682 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track 0febdcf7-4e1f-4661-9493-b40427de2c13 Shame on a Nigga]
2022-02-01 09:51:29.936 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 131
2022-02-01 09:51:30.095 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shame on a Nigga] for artist [] from Spotify.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 184
2022-02-01 09:51:30.466 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Shame on a Nigga] for artist [] from Yandex.
System.Exception: Can't get track [Shame on a Nigga] for artist [] from Yandex.
at MusicSearcher.MusicSearcherClient.SearchYandexTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 162
2022-02-01 10:00:46.354 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track 0febdcf7-4e1f-4661-9493-b40427de2c13 Gravel Pit]
2022-02-01 10:00:46.716 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist by mbid [0febdcf7-4e1f-4661-9493-b40427de2c13] from LastFM
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.GetSpotifyArtist(String artistName) in /src/MusicSearcher/MusicSearcherClient.cs:line 378
at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in /src/MusicSearcher/MusicSearcherClient.cs:line 131
2022-02-01 10:00:46.992 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Gravel Pit] for artist [] from Spotify.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 184
2022-02-01 10:00:47.305 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Gravel Pit] for artist [] from Yandex.
System.Exception: Can't get track [Gravel Pit] for artist [] from Yandex.
at MusicSearcher.MusicSearcherClient.SearchYandexTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 162

Allow custom track name in telegram bot

image
I'm trying to send an audio message using an external audio link. I would like to specify the performer and title. But setting these parameters has no effect when the method is called.

"Title, etc are set as ID3 tags"
It can be set with downloading track, changing metadata and sending via file

Track searching will return nothing if track not found in spotify

Logs:
2022-02-01 09:16:06.623 +00:00 [Debug] [ConcertBuddy.ConsoleApp.TelegramBot.Command.TrackCommand] Handle [/track] command: [/track f422e97e-fe40-4c9c-be9a-2bba923539ad Hobby]
2022-02-01 09:16:06.709 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't search track [Hobby] for artist [Guf] from Spotify.
System.Exception: Can't get track [Hobby] for artist [Guf] from Spotify.
at MusicSearcher.MusicSearcherClient.SearchSpotifyTrack(String artistName, String trackName) in /src/MusicSearcher/MusicSearcherClient.cs:line 182

image

Map properly MusicBrainz to Spotify track while searching

Spotify don't use MBID and use it's own ID for artists/tracks.
We can't compare artistName. For example for artist "ноганно" actual spotify name is "noganno".
Now we return first result from searching artist/track.

For example (false search):
image

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.