From 58be3c8d8bcaa3240734b3cd9d39a9a5447004ae Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sat, 26 Jul 2014 10:04:44 +0100
Subject: [PATCH] fix for upstream gompd changes

---
 client/mpd/djrandom.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/client/mpd/djrandom.go b/client/mpd/djrandom.go
index 1fb6e49..95b483e 100644
--- a/client/mpd/djrandom.go
+++ b/client/mpd/djrandom.go
@@ -60,6 +60,13 @@ func (s *DJRandomSong) SampleRate() float64 {
 	return 44100
 }
 
+func (s *DJRandomSong) Duration() int {
+	if s.audiofile != nil {
+		return int(s.audiofile.Duration)
+	}
+	return 0
+}
+
 func (s *DJRandomSong) URL() string {
 	return fmt.Sprintf("djrandom://%s", s.Id.String())
 }
-- 
GitLab