fix: keep western labels near their planets and chats on the current person
Cap planet captions at 30 degrees with a third ring, fall back only within the current person's sessions, and load self when the people catalog fails.
This commit is contained in:
@@ -14412,40 +14412,6 @@ def cmd_tajika(args):
|
||||
if age is None:
|
||||
return {"error": "请提供 --age 参数(当前年龄)"}
|
||||
|
||||
def _resolve_tajika_year_lord() -> Dict:
|
||||
fallback = calc_year_lord(asc_si, age)
|
||||
try:
|
||||
second = _arg_second(args)
|
||||
target_year = int(args.year) + int(age)
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
sr = calc_solar_return_chart(
|
||||
int(args.year), int(args.month), int(args.day),
|
||||
int(args.hour), int(args.minute),
|
||||
float(args.lat), float(args.lon), float(args.tz),
|
||||
target_year,
|
||||
getattr(args, 'ayanamsa', 'raman'),
|
||||
)
|
||||
if not isinstance(sr, dict) or sr.get('error'):
|
||||
return fallback
|
||||
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
year_lord = calc_panchadhikari_year_lord(
|
||||
sr.get('planet_lons') or planet_lons,
|
||||
annual_asc_sign_idx=sr.get('asc_sign_idx', asc_si),
|
||||
natal_lagna_sign_idx=asc_si,
|
||||
years_from_dob=int(age),
|
||||
annual_jd=((sr.get('solar_return') or {}).get('jd_ut')),
|
||||
annual_dt=((sr.get('solar_return') or {}).get('dt_local') or (sr.get('solar_return') or {}).get('dt_ut')),
|
||||
lat=float(args.lat),
|
||||
lon=float(args.lon),
|
||||
tz=float(args.tz),
|
||||
)
|
||||
if isinstance(year_lord, dict) and year_lord.get('status') == 'partial_verified':
|
||||
return year_lord
|
||||
except Exception:
|
||||
pass
|
||||
return fallback
|
||||
|
||||
result = {}
|
||||
mode = args.mode or 'all'
|
||||
if mode in ('all', 'muntha'):
|
||||
|
||||
Reference in New Issue
Block a user