Git Product home page Git Product logo

Comments (4)

cbix avatar cbix commented on July 16, 2024

Hi, can you post the lines above as well, so I can see which cmd triggered your error? Thanks.

Quickfix would be changing line 291
currentTime := data["currentTime"].(string)
to

currentTime := 0
if data["currentTime"] != nil {
    currentTime = data["currentTime"].(string)
}

Anyway I'll integrate more data checks soon, thanks for reporting this one :)

from gotubecast.

abhinavprateek avatar abhinavprateek commented on July 16, 2024

Will try that and revert.

Also I am noticing delay in music playback, after I select the video and the video starts playing on the Raspberry Pi. The delay is in the range 15 - 20 seconds. Is it normal?

from gotubecast.

cbix avatar cbix commented on July 16, 2024

Yea the script uses youtube-dl, which can take around 15 secs to start and fetch the video stream URL. Because there is no open API for obtaining the stream link from a video ID, we have to rely on youtube-dl here for now.

from gotubecast.

banyip avatar banyip commented on July 16, 2024

Hi, can you post the lines above as well, so I can see which cmd triggered your error? Thanks.

Quickfix would be changing line 291
currentTime := data["currentTime"].(string)
to

currentTime := 0
if data["currentTime"] != nil {
    currentTime = data["currentTime"].(string)
}

Anyway I'll integrate more data checks soon, thanks for reporting this one :)

after Quickfix, the following build errors occurs:
root@raspberrypi:~/gotubecast# GOARCH=arm go build

_/root/gotubecast

./main.go:293: cannot use data["currentTime"].(string) (type string) as type int in assignment
./main.go:306: cannot convert "s" to type int
./main.go:306: invalid operation: currentTime + "s" (mismatched types int and string)
./main.go:321: cannot use currentTime (type int) as type string in map value
./main.go:329: cannot use currentTime (type int) as type string in map value

from gotubecast.

Related Issues (18)

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.