ChandimaPrabath commited on
Commit
1103f52
·
1 Parent(s): 911a5e0
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -111,9 +111,7 @@ def get_movie():
111
  if os.path.exists(cache_path):
112
  return send_from_directory(os.path.dirname(cache_path), os.path.basename(cache_path))
113
 
114
- # If not cached, find the movie path in the index file
115
- json_data = load_json(INDEX_FILE)
116
- movie_path = find_movie_path(json_data, title)
117
 
118
  if not movie_path:
119
  return jsonify({"error": "Movie not found"}), 404
 
111
  if os.path.exists(cache_path):
112
  return send_from_directory(os.path.dirname(cache_path), os.path.basename(cache_path))
113
 
114
+ movie_path = find_movie_path(file_structure, title)
 
 
115
 
116
  if not movie_path:
117
  return jsonify({"error": "Movie not found"}), 404