21 lines
323 B
Python
21 lines
323 B
Python
from song import Song
|
|
|
|
# Use to define various operations
|
|
class Operations:
|
|
def __init__(self):
|
|
self.song = None
|
|
|
|
|
|
# Begin playback
|
|
def play(self,widget,data):
|
|
if self.song == None:
|
|
return
|
|
self.song.play()
|
|
|
|
|
|
# Pause playback
|
|
def pause(self,widget,data):
|
|
if self.song == None:
|
|
return
|
|
self.song.pause()
|