Plugins check_version()
Plugins need a check_version() to return True if we are using a compatible version and False if we aren't.
This commit is contained in:
parent
99c510dd20
commit
f93b8178d5
|
@ -23,3 +23,10 @@ def start():
|
|||
|
||||
def stop():
|
||||
pass
|
||||
|
||||
def check_version():
|
||||
if ocarina.__major__ != 4:
|
||||
return False
|
||||
if ocarina.__minor__ != 1:
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -41,7 +41,13 @@ def start():
|
|||
children.append("Groove Shark")
|
||||
ocarina.add_tab("Groove Shark", groove)
|
||||
|
||||
|
||||
def stop():
|
||||
for child in children:
|
||||
ocarina.remove_tab(child)
|
||||
|
||||
def check_version():
|
||||
if ocarina.__major__ != 4:
|
||||
return False
|
||||
if ocarina.__minor__ != 1:
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -27,6 +27,12 @@ def start():
|
|||
invite("POSTLOAD", tweak_title)
|
||||
invite("POSTGETART", tweak_icon)
|
||||
|
||||
|
||||
def stop():
|
||||
pass
|
||||
|
||||
def check_version():
|
||||
if ocarina.__major__ != 4:
|
||||
return False
|
||||
if ocarina.__minor__ != 1:
|
||||
return False
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue