38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
|
|
|
||
|
|
import sys
|
||
|
|
import os
|
||
|
|
import traceback
|
||
|
|
|
||
|
|
# Add dev plugins path to sys.path
|
||
|
|
dev_path = '/Volumes/WD/Users/Work/python/ff_dev_plugins'
|
||
|
|
if dev_path not in sys.path:
|
||
|
|
sys.path.insert(0, dev_path)
|
||
|
|
|
||
|
|
# Mocking Logger and F for direct import test
|
||
|
|
class MockLogger:
|
||
|
|
def debug(self, msg, *args): print(f"DEBUG: {msg % args if args else msg}")
|
||
|
|
def info(self, msg, *args): print(f"INFO: {msg % args if args else msg}")
|
||
|
|
def error(self, msg, *args): print(f"ERROR: {msg % args if args else msg}")
|
||
|
|
def warning(self, msg, *args): print(f"WARNING: {msg % args if args else msg}")
|
||
|
|
|
||
|
|
import logging
|
||
|
|
logging.basicConfig(level=logging.DEBUG)
|
||
|
|
|
||
|
|
# We need to set up the environment so metadata can be imported
|
||
|
|
os.environ['PYTHONPATH'] = dev_path
|
||
|
|
|
||
|
|
try:
|
||
|
|
# Try importing directly from the plugin
|
||
|
|
# metadata/mod_ftv.py contains ModuleFtv
|
||
|
|
from metadata.mod_ftv import ModuleFtv
|
||
|
|
from support_site import SiteTmdbFtv
|
||
|
|
|
||
|
|
print("Searching for '비밀의 아이프리' with year 2024...")
|
||
|
|
# SiteTmdbFtv.search is a classmethod
|
||
|
|
result = SiteTmdbFtv.search('비밀의 아이프리', year=2024)
|
||
|
|
print(f"Result: {result}")
|
||
|
|
|
||
|
|
except Exception as e:
|
||
|
|
print(f"Error: {e}")
|
||
|
|
traceback.print_exc()
|