Commit 7df5d8f4 authored by echel0n's avatar echel0n

Resolves issues for PosixPath being returned instead of string when trying to get subtitles path.

parent 38173705
......@@ -21,9 +21,9 @@
import os
import pathlib
import re
import subprocess
from pathlib import Path
import subliminal
from babelfish import language_converters, Language
......@@ -228,17 +228,17 @@ class Subtitles(object):
return video
def get_subtitles_path(self, video_path):
if Path( and Path(
if pathlib.Path( and pathlib.Path(
new_subtitles_path =
new_subtitles_path = Path(os.path.dirname(video_path)).joinpath('/'))
new_subtitles_path = str(pathlib.Path(os.path.dirname(video_path)).joinpath('/')))
dir_exists = make_dir(new_subtitles_path)
if not dir_exists:'Unable to create subtitles folder {}'.format(new_subtitles_path))
new_subtitles_path = Path(video_path).parent
new_subtitles_path = str(pathlib.Path(video_path).parent)
return new_subtitles_path
Markdown is supported
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