Commit e67d7b88 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix ConvertFB2

parent 60dfbf0a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@ def ConvertFB2(request, book_id, convert_type):
        
    tmp_conv_path=os.path.join(settings.TEMP_DIR,dlfilename)
    popen_args = ("\"%s\" \"%s\" \"%s\""%(converter_path,file_path,tmp_conv_path))
    print(popen_args)
    proc = subprocess.Popen(popen_args, shell=True, stdout=subprocess.PIPE)
    #proc = subprocess.Popen((converter_path.encode('utf8'),file_path.encode('utf8'),tmp_conv_path.encode('utf8')), shell=True, stdout=subprocess.PIPE)
    out = proc.stdout.readlines()
@@ -181,7 +180,7 @@ def ConvertFB2(request, book_id, convert_type):

    try: 
        if tmp_fb2_path:
            os.remove(tmp_fb2_path.encode('utf-8'))
            os.remove(tmp_fb2_path)
    except: 
        pass
    try: 
+4 −5
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.9/ref/settings/
"""

import os
import sys

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -158,12 +159,10 @@ SOPDS_AUTH = True
SOPDS_SCAN_SHED_MIN ='0'
SOPDS_SCAN_SHED_HOUR ='0,12'

#Конвертеры для Linux

#Конвертеры EPUB и MOBI
#SOPDS_FB2TOEPUB = os.path.join(BASE_DIR,'convert/fb2toepub/unix_dist/fb2toepub')
#SOPDS_FB2TOEPUB = os.path.join(BASE_DIR,'convert/fb2conv/fb2epub')
#SOPDS_FB2TOMOBI = os.path.join(BASE_DIR,'convert/fb2conv/fb2mobi')
SOPDS_FB2TOEPUB = os.path.join(BASE_DIR,'convert/fb2epub/fb2epub')

#Конвертеры для Windows
SOPDS_FB2TOEPUB = os.path.join(BASE_DIR,'convert\\fb2epub\\fb2epub.cmd')
SOPDS_FB2TOEPUB = os.path.join(BASE_DIR, 'convert\\fb2epub\\fb2epub.cmd' if sys.platform =='win32' else 'convert/fb2epub/fb2epub' )

tmp/374017.fb2

deleted100644 → 0
+0 −4585

File deleted.

Preview size limit exceeded, changes collapsed.

Loading