diff --git a/tv_movies/tv_movies.py b/tv_movies/tv_movies.py index 8e67b2e..2240547 100644 --- a/tv_movies/tv_movies.py +++ b/tv_movies/tv_movies.py @@ -168,7 +168,7 @@ def get_movie(tmdb_id): directors_cut = request.args.get("directors_cut", default=False, type=bool) res_4k = request.args.get("res_4k", default=False, type=bool) movie_data = database.db_get_movie_by_tmdb_id(tmdb_id, extended=extended, directors_cut=directors_cut) - filename = movie_data.path.replace(func.MOVIES_DIRECTORY, "") + filename = movie_data.path.replace(str(func.MOVIES_DIRECTORY), "") if res_4k: filename = filename.replace(f"({movie_data.year})", f"({movie_data.year})(4K)") response = make_response(send_from_directory(func.MOVIES_DIRECTORY, filename)) @@ -180,7 +180,7 @@ def get_movie(tmdb_id): @login_required def get_episode(tmdb_id): episode_data = database.db_get_episode_by_tmdb_id(tmdb_id) - filename = episode_data.path.replace(func.TV_SHOWS_DIRECTORY, "") + filename = episode_data.path.replace(str(func.TV_SHOWS_DIRECTORY), "") response = make_response(send_from_directory(func.TV_SHOWS_DIRECTORY, filename)) response.headers["content-type"] = "video/webm" return response