예제 #1
0
def main(av=None):
    if not av or av[0] == "help":
        print("next")
        print("update [serie]")
        print("add <serie> [season] [ep]")
        print("del <serie>")
        return
    iface = Interface()
    if av[0] == "next":
        if len(av) == 1:
            iface.show()
        elif len(av) == 2:
            iface.show(av[1])
        return
    elif av[0] == "sort":
        repo = Repo(iface) # FIXME AM 20130406: wtf?
        repo.fate()
        repo.couple()
    elif av[0] == "update":
        if len(av) == 1:
            iface.update()
            iface.show()
        elif len(av) == 2:
            iface.update(av[1])
            iface.show(av[1])
    elif av[0] == "add":
        if len(av) == 4:
            iface.add(av[1], av[2], av[3], force=True)
        elif len(av) == 3:
            iface.add(av[1], av[2], 0, force=True)
        elif len(av) == 2:
            iface.add(av[1], 1, 0, force=True)
        iface.show(av[1])
    elif av[0] == "del":
        iface.delete(av[1])
예제 #2
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)

        self.setWindowTitle('Puma')
        self.setWindowIcon(QtGui.QIcon(":/icons/icons/manager.png"))

        screen = QtGui.QDesktopWidget().screenGeometry()
        size = self.geometry()
        self.move((screen.width() - size.width()) / 2,
                  (screen.height() - size.height()) / 2)

        self.ifc = Interface()