Giter Club home page Giter Club logo

Comments (10)

robinfriedli avatar robinfriedli commented on May 28, 2024

The only reasonable reason I could think of for this is that Botify is, on the back end, not playing the spotify playlist, but is instead grabbing metadata from the playlist, searching for the song, and finding the wrong one.

That's probably exactly what's happening. Since Spotify does not allow third party applications to stream tracks they are looked up and streamed from YouTube instead.

I presume you're using botify 1 (so either the master branch or any release branch). The branch development/v2.0 features an improvement of the algorithm for net.robinfriedli.botify.audio.youtube.YouTubeService#redirectSpotify which generally yields better results in my experience if you want to give that a try, the migration to v2 is pretty big though. If you do give that a try, mind that the old results are still stored by the spotify_redirect_index table and those entries are only refreshed once every 4 weeks by the RefreshSpotifyRedirectIndicesTask cron job since those lookups are expensive in terms of quota usage and time, so you might want to clear that table. Though botify 1 was already accurate most of the time for me, depends what you play.

Else you could lookup those tracks on youtube or some other supported source manually and create a botify playlist based on that.

from aiode.

DDarkInferno avatar DDarkInferno commented on May 28, 2024

That's probably exactly what's happening. Since Spotify does not allow third party applications to stream tracks they are looked up and streamed from YouTube instead.

I was doing some research and it seems like they do now, just not really sure how it works. If you take a look at the popular music bot, Rythm, they are able to play the exact same song from spotify. Would be really really cool if you were able to add that feature to this bot.

from aiode.

robinfriedli avatar robinfriedli commented on May 28, 2024

No, it's definitely not possible and if Rythm streamed directly from Spotify they would have been taken down and sued by Spotify. Spotify obviously does not legally allow third party applications to stream their content without requiring an athorized Spotify account per user undercutting their entire business. Spotify makes sure no one can create software that distributes their licensed content while evading their monetization policies. The only way to stream content from Spotify is through their Web Playback SDK which works with Encrypted Media Extensions. Other than that there is no way to receive Spotify content for a third party application, much less manipulate and redestribute the raw audio output.

Besides, Rythm has the exact same issue as Botify. I've tried it out for 5 minutes and the first audio book track played completely different audio. The only difference seems to be that the YouTube lookup seems more reliable compared to botify 1, haven't compared it to botify 2 yet.

from aiode.

DDarkInferno avatar DDarkInferno commented on May 28, 2024

Yup, sorry about that, you're right. When I thought Rythm could do it, I looked into those same articles, the EME player and the github issue and was surprised that Rythm could do it. The way I was testing the Rythm bot was I tried to play a song that was on spotify but not on youtube, and I thought I found one, but I wasn't checking youtube properly. Sorry about that. I appreciate your response though.

from aiode.

salocinyeet avatar salocinyeet commented on May 28, 2024

The only way you could prob make it play from Spotify is that if you can put Client Secret and Client Key and self host the bot. That is prob the only way. The people who host Botify can't really tell you give us your Client Secret and Client Key. Because why would you trust them with your spotify account and plus it would be very expensive to store all those secrets and you don't know if the data is breached.

from aiode.

robinfriedli avatar robinfriedli commented on May 28, 2024

You mean the Client Secret for the Web API client? Why wouldn't it work then and why would that have to be provided by the end user? The problem is the Web API can simply not be used to stream any music other than fetching the URL for song previews (which is what the $preview argument does). It is only intended for metadata. Logging in to Spotify is not the problem, botify can do that already to specifically find items in the user's library.

from aiode.

robinfriedli avatar robinfriedli commented on May 28, 2024

I have now backported the improved spotify redirection algorithm from botify 2 to botify 1.6 (#145). Note that the old results are still stored by the spotify_redirect_index table, so you either have to wait for the RefreshSpotifyRedirectIndicesTask to update all indices, this task runs every day at 3 AM and updates all indices that haven't been updated in 4 weeks, or you could just clear the contents of this table if you're hosting your own instance.

from aiode.

CaitlinTheAwesome avatar CaitlinTheAwesome commented on May 28, 2024

Going to preface this with: I don't actually code, please excuse my ignorance if this is not how any of this works / if this suggestion is super complicated to implement, but...

If I'm understanding correctly, it looks at the tracklist on Spotify, then goes to youtube and finds videos, and saves that data in a table for future reference? Is there maybe a way to add a "flag as incorrect track" button or command for the currently playing track, that will tell it to go check youtube for the next result for that song and try that one instead (or that would make it clear the table entry for that one track and try pulling it from youtube again)?

I'm running into this issue quite a lot on my D&D playlists, I suspect there's something in the code that will say, if result 1 has 200k views and result 3 has 1.5M views, choose result 3? (In this example scenario, result 1 is the correct song and the rest are different songs as it's not popular enough to have anyone else upload it besides the creator lol)

from aiode.

robinfriedli avatar robinfriedli commented on May 28, 2024

Yeah I though about a similar feature where you can even manually specify the correct YouTube video but with both implementations the issue is that it could easily be abused. It's not quite as bad when you can't explicitly define the video but even then you could just flag the result as incorrect a few times until the remaining results are terrible. One thing I could do is requiring that the new or manually set result still receives a certain minimum score when applying the algorithm but that would still allow users to deliberately worsen the result and on the other hand might reject valid suggestions. It might be a feature that could be activated for self-hosters but I'm not sure if I'll ever enable something like that on the public instance.

from aiode.

Amara97-sysz avatar Amara97-sysz commented on May 28, 2024

The Spotify app itself will queue wrong songs sometime. You can try to download Spotfy music offline to get the offline playback so that you can stay away from this kind of issue. Try some third-party tools like Tunelf Spotify Music Converter.

from aiode.

Related Issues (20)

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.