Some rearranging of files, moved extract and gstreamer to tools
This commit is contained in:
parent
2c26652772
commit
ad2264440e
|
@ -16,7 +16,7 @@ from bt.file import *
|
|||
import settings
|
||||
|
||||
#from tools import gstream
|
||||
import gstreamer
|
||||
from tools import gstreamer
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ from bt.file import *
|
|||
import bt.proc
|
||||
from manager import manager
|
||||
from tools import database
|
||||
from tools import gstreamer
|
||||
|
||||
|
||||
settings.set("user", join(settings.get("user"),".ocarina2"))
|
||||
|
@ -32,6 +33,7 @@ bt.proc.setname("Ocarina2")
|
|||
def open():
|
||||
write("Ocarina has been started",True)
|
||||
database.init()
|
||||
gstreamer.init()
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
|
|
|
@ -11,7 +11,7 @@ type = "core"
|
|||
path = ""
|
||||
opt = []
|
||||
|
||||
import gstreamer
|
||||
from tools import gstreamer
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
|
|
|
@ -12,7 +12,7 @@ path = ""
|
|||
opt = []
|
||||
|
||||
from bt.message import write
|
||||
import gstreamer
|
||||
from tools import gstreamer
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
|
|
|
@ -20,6 +20,7 @@ import settings
|
|||
from manager import manager
|
||||
#from library import *
|
||||
from tools import database
|
||||
from tools import extract
|
||||
#from library.scan import scan
|
||||
|
||||
global root
|
||||
|
@ -44,7 +45,8 @@ def scan(dir):
|
|||
else:
|
||||
write(path,True)
|
||||
global root
|
||||
manager.run("extract", (root,path))
|
||||
#manager.run("extract", (root,path))
|
||||
extract.run((root,path))
|
||||
#database.insert(path)
|
||||
#self.files += [path]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
__author__="bjschuma"
|
||||
__date__ ="$Dec 28, 2009 12:21:59 AM$"
|
||||
|
||||
__all__ = ['database']
|
||||
__all__ = ['database', 'extract']
|
|
@ -4,13 +4,6 @@ __author__="bjschuma"
|
|||
__date__ ="$Dec 28, 2009 10:21:06 PM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "extract"
|
||||
app = "ocarina"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
from bt.message import write
|
||||
from tools import database
|
||||
import settings
|
||||
|
@ -19,7 +12,7 @@ import re
|
|||
import tagpy
|
||||
|
||||
global goodFiles
|
||||
goodFiles = []
|
||||
goodFiles = ["mp3", "ogg"]
|
||||
|
||||
global search
|
||||
|
||||
|
@ -35,6 +28,8 @@ def genSearch():
|
|||
search += file
|
||||
search += ")"
|
||||
|
||||
genSearch()
|
||||
|
||||
|
||||
# Return true if the file is valid and false if it is not
|
||||
def validFile(filename):
|
||||
|
@ -46,19 +41,6 @@ def validFile(filename):
|
|||
return True
|
||||
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
#goodFile = ".*\.(mp3|ogg)"
|
||||
goodFiles = ["mp3", "ogg"]
|
||||
genSearch()
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
pass
|
||||
|
||||
|
||||
def findId(table,name):
|
||||
result = database.select("id",table,"name=\'"+name.replace("\'","\'\'")+"\'").fetchone()
|
||||
if result == None:
|
|
@ -4,13 +4,6 @@ __author__="bjschuma"
|
|||
__date__ ="$Dec 21, 2009 11:58:37 PM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "gstreamer"
|
||||
app = "ocarina"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
from bt.file import *
|
||||
import gst
|
||||
|
||||
|
@ -49,7 +42,7 @@ def pause():
|
|||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
def init():
|
||||
global pipeline
|
||||
pipeline = gst.Pipeline()
|
||||
pipeline.set_state(gst.STATE_NULL)
|
Loading…
Reference in New Issue