Ejemplo n.º 1
0
 def info(self):
     result = []
     result.append('Title     : %s' % self.title)
     result.append('Public    : %s' % self.pubDate)
     if self.source:
         result.append('Source    : %s' % self.source.name)
     if self.time and self.duration:
         result.append('Time      : %s' % util.showtime(self.time))
         result.append('Duration  : %s' % util.showtime(self.duration))
     return '\n'.join(result)
Ejemplo n.º 2
0
 def info(self):
     output = StringIO.StringIO()
     output.write("Title     : %s\n" % self.title)
     output.write("Artist    : %s\n" % self.artist)
     output.write("Like      : %s\n" % self.like)
     output.write("Album     : %s\n" % self.album)
     if self.publicTime:
         output.write("Public    : %s\n" % self.publicTime)
     if self.source:
         output.write(u"Source    : %s\n" % u"豆瓣FM")
     if self.time and self.duration:
         output.write("Time      : %s\n" % util.showtime(self.time))
         output.write("Duration  : %s\n" % util.showtime(self.duration))
     result = output.getvalue()
     output.close()
     return result