Giter VIP home page Giter VIP logo

Comments (19)

Danondso avatar Danondso commented on August 17, 2024

Hmm I'm looking at it now, I'm thinking a way around it would be to save a timestamp in ms when you pause then pass that back when you play it again. I'll try to figure something out with that.

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Cool It would be amazing to figure that out. Would you use flask-ask to get the timestamp in ms? We would have to "restart" the song with the offset included since the .resume() function won't take it.

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

Right now I'm using Python's time library. I have that working sort of.. my timestamps are off at the moment so if you let it sit too long (I'm talking like less than a minute here) the offset becomes greater than the length of the song and nothing plays back.

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

I need to take into the account the song length right now, if I can get that I'll have it pausing and resuming no problem.

UPDATE:
Looks like songs returned have a durationmillis associated with them.

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

I'm capturing the time when the song is acquired and then subtracting that from the time it's paused to use later for the resume. There's a bit of an offset to it.

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Sweet! I've been working on playing playlist support and about have that wrapped up but I need to figure out a better way to choose the playlist, right now it's pretty bad. Is the offset of the offset like 3 seconds or 5?

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Wait, I just looked and you reverted it? Did it not work?

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

Pausing and playing again worked fine once but after that the timestamp isn't exactly right I think so I reverted it. I have a development branch for it now. Once I get it sorted out locally I'll push up my branch.

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Okay cool.

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

Pushed what I have up to the pause/resume branch, it's not much right now. I'll try to wrap it up when I have some time.

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Looks great so far. I almost have upvote/downvote working but their seems to be a problem with the gmusicapi. I made an issue so hopefully something comes of it.

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

Turns out the context dict saves the song offset when it stops, I'm pulling that now so there's accurate pause and resume times. Problem now is that when you resume it doesn't always pick up again, not sure how to fix that at the moment. I've pushed the changes up if you'd like to take a look at them.

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Could you do a wait 5 or something and then try again if it failed?

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

maybe wait 2. Does it throw an error message if it doesn't pick up?

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

When I resume ngrok gives a code 200 then several 400s afterwards. Sometimes the song picks up but other times it doesn't

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

https://github.com/stevenleeg/geemusic so It looks like this guy made a thing like yours too.

from googleplayechomusicservice.

PostsDesert avatar PostsDesert commented on August 17, 2024

Should we merge our code and features into his?

from googleplayechomusicservice.

stevenleeg avatar stevenleeg commented on August 17, 2024

👋 damn, I wish I had known about this a few days ago before I started geemusic.

this project looks great though; I'm glad someone else has been working on the same idea 😄 . feel free to open PRs/issues on geemusic if there's anything in this skill that you'd like to see incorporated!

from googleplayechomusicservice.

Danondso avatar Danondso commented on August 17, 2024

Hey that's cool! The only reason I started one was because no one else had anything out there. I think it'd be best to merge. I started this as a hobby project to see if I could make it work. I honestly wasn't expecting anyone to pick up on it xD

from googleplayechomusicservice.

Related Issues (3)

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.