-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
59 lines (39 loc) · 1.87 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
import sys
import tempfile
def find_FFMEG(**args):
localFFMPEG = None
locations = ['/opt/local/bin', '/usr/local/bin', '/usr/local/ffmpeg', '/usr/local/opt/']
for location in locations:
if os.path.isfile("/".join([location, 'ffmpeg'])):
localFFMPEG = "/".join([location, 'ffmpeg'])
return localFFMPEG
# THESE ARE DEFAULT SETTINGS..
ffmpeg_path = os.getenv('FFMPEG', find_FFMEG())
ffmpeg_path=r'C:\Users\rokdd\Documents\Eigene-Programme\50_Portables\ffmpeg\bin'+chr(92)
DEBUG=True
VERBOSE=True
#not used currently
BACKUP=True
#asks after and before each chapter to continue or not
CAREFUL=True
MAIN_DIRS=[{'path':'.'}]
MAIN_SUFFIX=[".mkv",".mp4",".m4v",".mpg",".mpeg",".wmv",".vdr"]
MAIN_FILES_IGNORE=["index.vdr",'info.vdr']
PATH_DATA_FILE="data.xlsx"
TEMP_DIR=tempfile.gettempdir()
# HERE IT IS MORE CONFIG DO NOT CHANGE THIS-->>>>>>>>>
#list of titles which will be set empty if they match (the filename as a chapter name gets always replaced!)
chapterfile = r'FFMETADATAFILE' # os.path.basename(filepath)+'-'+str(entry['start'])+
secure_suffix = ''
TITLES_NOT_TIDY=["Start","Ende","End"]
import datetime as dt
time_index=dt.datetime.now()
import logging
logging.basicConfig(filename='chapter-universe.log',filemode='a',format='%(asctime)s %(name)s %(funcName)s %(levelname)s %(message)s',datefmt='%Y-%m-%d %H:%M:%S',level=logging.DEBUG if DEBUG else logging.info)
lg=logging.getLogger('main')
if VERBOSE:
lg.addHandler(logging.StreamHandler())
default_entry={'file_indexed': time_index,"chapter_indexed":time_index, 'end': None, 'src_format': 'registry', 'src_file': 'mpc-be',
'src_id': "", 'title': "", 'dest_file': "", 'start': None, 'fingerprint': ''}
default_columns=['file_indexed','chapter_indexed','runned', 'applied', 'status', 'src_file', 'src_format', 'src_id', 'title', 'start', 'end', 'dest_file','fingerprint']