Coder Social home page Coder Social logo

Comments (9)

The-Glit-ch avatar The-Glit-ch commented on May 29, 2024 1
 time.sleep(spotify.current_user_playing_track['duration_ms']/1000) 
        #Instead of checking every second for an ad. We simply get the total length of the song and wait for that ammount of time. 
        #Now spotify returns miliseconds for song length which is weird but this can easily be fixed with some basic math.
        #We get the song duration and divide it by 1000 and we get our time in seconds

I had this code in one of my pull requests so that we dont keep pinging spotify every second. idk if it could help

from spotibyeads.

AnonymouX47 avatar AnonymouX47 commented on May 29, 2024

Umm... To quite an extent, i think the assumption is safe. So, i'm in support.

The question now is, how many minutes?

from spotibyeads.

daspartho avatar daspartho commented on May 29, 2024

As for mins ig 3 will be ok as the average length of a song is about that. We can do more as its unlikely that ad will come after 1 song. But shouldn't compromise. What others think?

from spotibyeads.

AnonymouX47 avatar AnonymouX47 commented on May 29, 2024

I think 3 minutes is just okay.

from spotibyeads.

AnonymouX47 avatar AnonymouX47 commented on May 29, 2024

Oh, that's way much better, can you please reference the PR, can't seem to find it.

Also, i think a subtraction of about 5-10 seconds would come in handy.

from spotibyeads.

The-Glit-ch avatar The-Glit-ch commented on May 29, 2024

Oh, that's way much better, can you please reference the PR, can't seem to find it.

Also, i think a subtraction of about 5-10 seconds would come in handy.

It was from PR #8

from spotibyeads.

AnonymouX47 avatar AnonymouX47 commented on May 29, 2024

Oh, i see.
You can open another PR and try to make the change specific i.e addressing just this issue alone.

from spotibyeads.

The-Glit-ch avatar The-Glit-ch commented on May 29, 2024

Done #45

from spotibyeads.

The-Glit-ch avatar The-Glit-ch commented on May 29, 2024

Had to fetch upstream ^^^

from spotibyeads.

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.