def display_name(magnet_uri): import urlparse from kodipopcorntime.utils import first magnet_args = urlparse.parse_qs(magnet_uri.replace("magnet:?", "")) return first(magnet_args.get("dn", []))
def get_studio(): return (first(sorted(m("production_companies") or [], key=lambda x: x["id"])) or {}).get("name") or ""
def m_crew(job): return first([crew["name"] for crew in (m("credits", default={}).get("crew") or []) if crew["job"] == job])
def get_studio(): return (first( sorted(m("production_companies") or [], key=lambda x: x["id"])) or {}).get("name") or ""
def m_crew(job): return first([ crew["name"] for crew in (m("credits", default={}).get("crew") or []) if crew["job"] == job ])