aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
Diffstat (limited to 'youtube')
-rw-r--r--youtube/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/search.py b/youtube/search.py
index 0f6bbc4..34df76f 100644
--- a/youtube/search.py
+++ b/youtube/search.py
@@ -8,6 +8,7 @@ import base64
import mimetypes
from flask import request
import flask
+import os
# Sort: 1
# Upload date: 2
@@ -106,6 +107,6 @@ def get_search_page():
@yt_app.route('/opensearch.xml')
def get_search_engine_xml():
- with open("youtube/opensearch.xml", 'rb') as f:
+ with open(os.path.join(settings.program_directory, 'youtube/opensearch.xml'), 'rb') as f:
content = f.read().replace(b'$port_number', str(settings.port_number).encode())
return flask.Response(content, mimetype='application/xml')