Skip to content

Commit

Permalink
Update filepath for mp3 files
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinmartian committed Nov 3, 2023
1 parent 8aef669 commit f39b95a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions player/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func playHandler(w http.ResponseWriter, r *http.Request) {
defer mu.Unlock()

if currentID == previousID {
fmt.Println("Received the same ID again")
fmt.Printf("Received the same ID again. Current ID: %s, Previous ID: %s\n", currentID, previousID)
// Reset the timer
if timer != nil {
timer.Stop()
Expand All @@ -105,7 +105,7 @@ func playHandler(w http.ResponseWriter, r *http.Request) {
filePath, _ := data["file"].(string)
offset, ok := data["offset"].(float64)
if ok {
playMP3(filePath, int(offset))
playMP3("../"+filePath, int(offset))
} else {
fmt.Println("Offset field not found in JSON for ID:", currentID)
}
Expand Down

0 comments on commit f39b95a

Please sign in to comment.