summaryrefslogtreecommitdiffhomepage
path: root/not/MusicPlayer.lua
diff options
context:
space:
mode:
Diffstat (limited to 'not/MusicPlayer.lua')
-rw-r--r--not/MusicPlayer.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/not/MusicPlayer.lua b/not/MusicPlayer.lua
index e838d96..4634ed9 100644
--- a/not/MusicPlayer.lua
+++ b/not/MusicPlayer.lua
@@ -32,6 +32,14 @@ function MusicPlayer:setTrack (trackName)
end
end
+function MusicPlayer:getCurrentTrack ()
+ for key,track in pairs(self.tracks) do
+ if self.tracks[key] == self.source then
+ return key
+ end
+ end
+end
+
function MusicPlayer:play ()
self.source:play()
end