FIX: website/myspass.lua:63: bad argument #3 to format
commit3265307edee14071694a0bd74c528c2d04395cb0
authorToni Gundogdu <legatvs@gmail.com>
Sun, 16 Jun 2013 11:55:12 +0000 (16 14:55 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Sun, 16 Jun 2013 12:09:02 +0000 (16 15:09 +0300)
treeb61495b3d9ab6d9782127dd304192997742f5171
parent121cc76b7708081cc44627837123bc90c492172d
FIX: website/myspass.lua:63: bad argument #3 to format

This commit fixes the:
  myspass.lua:63: bad argument #3 to format (number expected, got string)

This is caused by MySpass.getMetadataValue returning an empty string
value ("").  Check for what we assume to be an expired video (all
metadata fields are empty).

Other:
* Apply correct code indentation convention
  See, <http://quvi.sourceforge.net/contrib.html#indent> for 0.4
  convention.

* Do not set self.metadata in MySpass.getMetadataValue
  Instead, fetch it to a local variable and pass that to the function.
  This saves us a (repeated) if-then check without polluting the `self'
  table.

Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
share/lua/website/myspass.lua