OSDN Git Service

implmenet ffmpeg's unable to encode aac issue solving function.
[rec10/rec10-git.git] / rec10 / trunk / src / rec10d.py
1 #!/usr/bin/python
2 # coding: UTF-8
3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009-2010 Yukikaze
5 import os
6
7 import warnings
8 warnings.filterwarnings('ignore', "the sets module is deprecated")
9 import configreader
10 import dbMySQL
11 import timerec
12 import recdblist
13 path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
14 global rec10db
15 def main():
16     timerec.task()
17 db = configreader.getdbpath("db")
18 if db == "MySQL":
19     dbn = configreader.getdbpath("mysql_dbname")
20     dbh = configreader.getdbpath("mysql_host")
21     dbu = configreader.getdbpath("mysql_user")
22     dbpwd = configreader.getdbpath("mysql_passwd")
23     dbport = int(configreader.getdbpath("mysql_port"))
24     rec10db = dbMySQL.DB_MySQL(dbname=dbn, host=dbh, user=dbu, passwd=dbpwd, port=dbport)
25     rec10db.new_in_status()
26 else:
27     rec10db = dbSQLite.DB_SQLite(path + "ch.db")
28 try:
29     recdblist.log_level_now=int(configreader.getlog("log_level"))
30     recdblist.verbose_level_now=int(configreader.getlog("verbose_level"))
31 except:
32     recdblist.log_level_now=900
33     recdblist.verbose_level_now=400
34 if __name__ == "__main__":
35     main()
36