Commit 4023f710 authored by Rob Nelson's avatar Rob Nelson
Browse files

Fixes

parent 446a4ee2
/files-upl
/tmp_files
/source
......@@ -4,7 +4,7 @@ python convert.py
MIT license
REQUIRES:
apt-get install -y sox libsox-fmt-all libav-tools
sudo apt-get install -y sox libsox-fmt-all libav-tools
pip install mutagen pyyaml
'''
import glob, os, hashlib, logging, subprocess, shutil, sys, json, yaml, time
......@@ -13,7 +13,7 @@ import glob, os, hashlib, logging, subprocess, shutil, sys, json, yaml, time
sys.path.append('lib/ryetalin')
import ryetalin
OUTPUT_DIR=u'files-upl'
OUTPUT_DIR=os.path.abspath(u'files-upl')
OUTPUT_EXT=u'mp3' # WAS MP3
TIME_SOURCE = time.time # time.clock on windows
......@@ -212,8 +212,8 @@ def update_tags(origf, newf):
sys.exit()
if 'artist' not in orig and 'album' not in orig and 'title' not in orig:
logging.critical(u'Tags not set on: {0}'.format(origf))
sys.exit(1)
logging.warn(u'Tags not set on: {0}'.format(origf))
#sys.exit(1)
# you can iterate over the tag names
# they will be the same for all file types
......@@ -379,7 +379,9 @@ for plID,plConfig in config['playlists'].items():
if 'include' in plConfig:
if 'files' in plConfig['include']:
for nf in plConfig['include']['files']:
md5 = revmd5s[os.path.join('tmp_files',nf)]
pathkey = os.path.join('tmp_files',nf)
if pathkey in revmd5s:
md5 = revmd5s[pathkey]
if plID not in fileRegistry[md5]['playlists']:
#logging.info('Media file %s included to playlist %s.',nf,plID)
fileRegistry[md5]['playlists'] += [plID]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment