Example #1
0
class RadioDisplay():
  def __init__(self):
    self.index = 0
    self.name = ""
    self.frequency = ""
    self.description = "" 
    self.helper = DisplayHelper()
    
  def getLine1(self):
    return self.helper.centerText(self.name)

  def getLine2(self):
    return self.description + " - "

  def set(self, station):
    #print station
    self.index = station['index']
    self.name = station['name']
    self.frequency = station['frequency']
    self.description = station['description']
Example #2
0
class Mp3Display():
  def __init__(self):
    self.album = "Album Name"
    self.title = "Song Title Goes Here"
    self.artist = "Artist Name"
    self.helper = DisplayHelper()
    
  def getLine1(self):
    return self.helper.centerText(self.title)

  def getLine2(self):
    return self.artist + " - " + self.album + " . "

  def set(self, mp3):
    #print mp3
    try:
      self.album = mp3['album']
    except Exception, e:
      self.album = "album"

    try:
      self.title = mp3['title']
    except Exception, e:
      self.title = 'title'
Example #3
0
 def __init__(self):
   self.index = 0
   self.name = ""
   self.frequency = ""
   self.description = "" 
   self.helper = DisplayHelper()
Example #4
0
 def __init__(self):
   self.album = "Album Name"
   self.title = "Song Title Goes Here"
   self.artist = "Artist Name"
   self.helper = DisplayHelper()