From 46d8aef1ca022e7237c278b3deea1481e96f553f Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 22 Nov 2022 14:35:06 -0300 Subject: [PATCH] Added new Capturer: Music Aggregator --- README.md | 1 + design/deezer.md | 3 ++- design/music.md | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 design/music.md diff --git a/README.md b/README.md index 899b841..a3eab4b 100644 --- a/README.md +++ b/README.md @@ -21,5 +21,6 @@ Currently, I'm considering the following Capturers (based on my own life): - [ ] [Steam Capturer](design/steam.md) - [ ] [Netflix](design/netflix.md) - [ ] [Deezer](design/deezer.md) +- [ ] [Music Aggregator](design/music.md) - [ ] [Calendar/CalDav](design/caldav.md) - [ ] [Email](design/email.md) diff --git a/design/deezer.md b/design/deezer.md index 8d508bb..e4c54fa 100644 --- a/design/deezer.md +++ b/design/deezer.md @@ -8,7 +8,8 @@ user. ## Configuration -Configuration requires the OAuth token, besides the IP and PORT of the Store. +Configuration requires the OAuth token, besides the IP and PORT of the Store, +and IP and PORT of the Music Aggregator. ## Internals diff --git a/design/music.md b/design/music.md new file mode 100644 index 0000000..9b22b2f --- /dev/null +++ b/design/music.md @@ -0,0 +1,36 @@ +# Music Aggregator + +Music Aggregator is a Capturer of sorts, but uses information coming from other +services to produce its result. + +## Configuration + +Requires the IP and PORT of the Store, and a list of musical Capturers that are +running. + +## Internals + +The service must receive Artist Name, Album Name and Song Title. It aggregates +information on all musical services and produces a count of each played song. + +We keep: + +- `artist`: Text. +- `album`: Text. +- `song`: Text. +- `count`: int, increases on each song send. + +Also, we need to keep a list of capturers we receive per day: + +- `day`: Day being generated. +- `capturer`: Capturer name. + +The output is not produced till all musical Capturers send their information. + +## Output + +``` +{% for song in todays_songs %} +{{ song.name }}, by {{ song.artist }} played {{ song.count }} times. +{% endfor %} +```