Info about 1 track on a virtual disc.
| :lastplayed |
[R] |
|
| :path |
[R] |
|
| :secs |
[R] |
|
| :song |
[R] |
|
| :trk |
[R] |
|
|
new(trk, path, secs, song, lastplayed = 0)
|
Set up from parts.
- trk
- trk # on disc
- path
- path to the song
- secs
- duration in seconds
- song
- song object describing the track
- lastplayed
- time last played in Unix secs (default = 0)
# File db/disc.rb, line 83
def initialize(trk, path, secs, song, lastplayed = 0)
@trk = trk
@path = path
@secs = secs
@song = song
@lastplayed = lastplayed
end
Mark as being played at current time.
# File db/disc.rb, line 94
def markPlayed()
@lastplayed = Time.now.to_i
end
# File db/disc.rb, line 98
def queueInfo()
[ @song.artist, @song.title, @path, @secs ]
end