Skip to content

Commit

Permalink
Merge branch 'master' into config
Browse files Browse the repository at this point in the history
  • Loading branch information
dag committed Apr 23, 2008
2 parents 2cc7a71 + 3c1ca74 commit 3700f32
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/amazing/widgets/moc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ class Moc < Widget
@bitrate = moc["Bitrate"]
@rate = moc["Rate"]
end

private

def playing?
@state == :playing
end

def paused?
@state == :paused
end

def stopped?
@state == :stopped
end
end
end
end
12 changes: 12 additions & 0 deletions lib/amazing/widgets/mpd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ class Mpd < Widget

private

def playing?
@state == :playing
end

def paused?
@state == :paused
end

def stopped?
@state == :stopped
end

def get_socket
@@connections ||= {}
mpd = nil
Expand Down

0 comments on commit 3700f32

Please sign in to comment.