ChandimaPrabath commited on
Commit
29ec663
·
1 Parent(s): db2ea61
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -269,11 +269,6 @@ def get_episode_id_api():
269
  episode_id = f"{title}_S{season}_E{episode}"
270
  return jsonify({"episode_id": episode_id})
271
 
272
- @app.route('/api/proxy', methods=['GET'])
273
- def get_proxy_api():
274
- proxies = get_system_proxies()
275
- return jsonify({"proxies": proxies})
276
-
277
  @app.route('/api/cache/size', methods=['GET'])
278
  def get_cache_size_api():
279
  total_size = 0
@@ -292,7 +287,7 @@ def clear_cache_api():
292
  os.remove(fp)
293
  return jsonify({"status": "Cache cleared"})
294
 
295
- @app.route('/api/store/tv', methods=['GET'])
296
  def get_tv_store_api():
297
  """Endpoint to get the TV store JSON."""
298
  if os.path.exists(TV_STORE_JSON_PATH):
@@ -301,6 +296,15 @@ def get_tv_store_api():
301
  return jsonify(tv_store_data)
302
  return jsonify({}), 404
303
 
 
 
 
 
 
 
 
 
 
304
  @app.route('/api/film/metadata', methods=['GET'])
305
  def get_film_metadata_api():
306
  """Endpoint to get the film metadata by title."""
@@ -340,7 +344,7 @@ def get_tv_metadata_api():
340
  return jsonify({'error': 'Metadata not found'}), 404
341
 
342
 
343
- @app.route("/api/films/all")
344
  def get_all_films_api():
345
  return get_all_films(file_structure)
346
 
 
269
  episode_id = f"{title}_S{season}_E{episode}"
270
  return jsonify({"episode_id": episode_id})
271
 
 
 
 
 
 
272
  @app.route('/api/cache/size', methods=['GET'])
273
  def get_cache_size_api():
274
  total_size = 0
 
287
  os.remove(fp)
288
  return jsonify({"status": "Cache cleared"})
289
 
290
+ @app.route('/api/tv/store', methods=['GET'])
291
  def get_tv_store_api():
292
  """Endpoint to get the TV store JSON."""
293
  if os.path.exists(TV_STORE_JSON_PATH):
 
296
  return jsonify(tv_store_data)
297
  return jsonify({}), 404
298
 
299
+ @app.route('/api/film/store', methods=['GET'])
300
+ def get_film_store_api():
301
+ """Endpoint to get the TV store JSON."""
302
+ if os.path.exists(FILM_STORE_JSON_PATH):
303
+ with open(FILM_STORE_JSON_PATH, 'r') as json_file:
304
+ tv_store_data = json.load(json_file)
305
+ return jsonify(tv_store_data)
306
+ return jsonify({}), 404
307
+
308
  @app.route('/api/film/metadata', methods=['GET'])
309
  def get_film_metadata_api():
310
  """Endpoint to get the film metadata by title."""
 
344
  return jsonify({'error': 'Metadata not found'}), 404
345
 
346
 
347
+ @app.route("/api/film/all")
348
  def get_all_films_api():
349
  return get_all_films(file_structure)
350