Skip to content

added recommendations api + minor bug fix - #37

Open
s9swata wants to merge 10 commits into
Itz-Agasta:mainfrom
s9swata:ui
Open

added recommendations api + minor bug fix#37
s9swata wants to merge 10 commits into
Itz-Agasta:mainfrom
s9swata:ui

Conversation

@s9swata

@s9swata s9swata commented Mar 3, 2025

Copy link
Copy Markdown
Contributor

Added recommendations api that autoplays songs and fixed minor bugs

  • New similar tracks logic where tracks are added from a random album of the current artist(s)
  • Added UI for spotify importer
  • User can now play playlists created by him or imported from spotify
  • Added skip, next and previous track options
  • Added data scroll feature
  • Fixed spotify importer logic to add only the playlist chosen by the user instead of all playlists
  • Fixed logic for playing songs which are added to queue by the user
  • Fixed logic for pause and resume commands

@s9swata s9swata changed the title bug fixes added recommendations api + minor bug fix Mar 13, 2025
Comment thread ethos/utils.py Outdated
def get_artist_albums(artist_name):
"""Fetch all albums of a given artist."""

CLIENT_ID = "e904c35efb014b76bd8999a211e9b1e1"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broooo don't pass keys like this and pushed it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay will access it from env then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solved in commit f06fbd7

Comment thread ethos/utils.py
playlist_file = playlist_dir / f"{playlist_name}.json"
playlist_dir.mkdir(parents=True, exist_ok=True)
open(playlist_file, "w").close()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but how much effective is this recommendation methos?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not the reccomendation code tho, but let me explain the recommendation system - We search for the albums of the current artist, then choose an album randomly, then add the songs to the current queue. In case of 2 or more artists, the artist name is chosen randomly too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants