skuill / concertbuddy Goto Github PK
View Code? Open in Web Editor NEWA Telegram bot that will become your buddy at a concert, written in C#/.NET 😎
A Telegram bot that will become your buddy at a concert, written in C#/.NET 😎
Can't read app.config in docker with volume.
Spotify
11.01.22. Configured restart docker service and containers always
Original .NET API version: https://github.com/Winster332/Yandex.Music.Api
Use moderated fork: https://github.com/K1llMan/Yandex.Music.Api
Create my fork: https://github.com/skuill/Yandex.Music.Api
Created Issue in fork project: Nuget - публикация пакета последней версии #1
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.
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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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, Func
2 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
Yandex API don't work with U/P authorization
Instead, switch to auth via token (MarshalX/yandex-music-api#513)
Used a long time ago: https://vds.selectel.ru/ru/pricing.html
Thinking about the new one
Read about:
Pipeline:
Partially complete by getting track file directly to listen in Telegram.
For example async/await. If an error occurs during the execution of the command, then nothing is returned to the user and there is nothing in the logs.
12.01.22. Release v0.0.1
Added MemoryCache with size 256.
MemoryCacheEntryOptions:
AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(10),
SlidingExpiration = TimeSpan.FromMinutes(5),
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
Logs rotation: last 20 files up to 1MB
Configure logging adapter like serilog
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.