{"action":"created","issue":{"url":"https://api.github.com/repos/tvalacarta/pelisalacarta/issues/381","repository_url":"https://api.github.com/repos/tvalacarta/pelisalacarta","labels_url":"https://api.github.com/repos/tvalacarta/pelisalacarta/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/tvalacarta/pelisalacarta/issues/381/comments","events_url":"https://api.github.com/repos/tvalacarta/pelisalacarta/issues/381/events","html_url":"https://github.com/tvalacarta/pelisalacarta/pull/381","id":171600612,"number":381,"title":"Mejoras en la clase Item","user":{"login":"superberny70","id":7559559,"avatar_url":"https://avatars.githubusercontent.com/u/7559559?v=3","gravatar_id":"","url":"https://api.github.com/users/superberny70","html_url":"https://github.com/superberny70","followers_url":"https://api.github.com/users/superberny70/followers","following_url":"https://api.github.com/users/superberny70/following{/other_user}","gists_url":"https://api.github.com/users/superberny70/gists{/gist_id}","starred_url":"https://api.github.com/users/superberny70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superberny70/subscriptions","organizations_url":"https://api.github.com/users/superberny70/orgs","repos_url":"https://api.github.com/users/superberny70/repos","events_url":"https://api.github.com/users/superberny70/events{/privacy}","received_events_url":"https://api.github.com/users/superberny70/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-17T08:21:26Z","updated_at":"2016-08-23T22:17:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tvalacarta/pelisalacarta/pulls/381","html_url":"https://github.com/tvalacarta/pelisalacarta/pull/381","diff_url":"https://github.com/tvalacarta/pelisalacarta/pull/381.diff","patch_url":"https://github.com/tvalacarta/pelisalacarta/pull/381.patch"},"body":"Esta es una clase vital y siempre es jodido tocarla, pero creo q vale la pena intentar mejorarla.\r\n\r\n- Ahora el atributo item.infoLabels es de la nueva clase InfoLabels que hereda de dict. La ventaja de esto es q ya no es necesario (ni en los canales ni en ningun sitio) comprobaciones del tipo:\r\nif \"plot\" in item.infoLabels:\r\nif item.infoLables.has_key(\"plot\"):\r\nif item.infoLables.get(\"plot\",\"\") != \"\":\r\nYa q si hacemos sinopsis = item.infoLabels['plot'] y resulta q la key 'plot' no existe no dara error, sino q retornara una cadena vacia.\r\nSegun la key se puede personalizar el tipo y valor retornado, como ejemplo he incluido 'rating' q retorna un float\r\n\r\n- Eliminar duplicidad en los datos entre item.plot, item.contentPlot y item.infoLabels['plot'] ya q en todos los casos se guardaba lo mismo. Ahora solo se guarda internamente en infoLabels, pero continua siendo accesible desde los tres puntos. La razon principal para aligerar el peso del objeto Item es que kodi tiene un limite en las urls de los archivos strm (entre 3500 y 4000 bytes aprox)"},"comment":{"url":"https://api.github.com/repos/tvalacarta/pelisalacarta/issues/comments/241898086","html_url":"https://github.com/tvalacarta/pelisalacarta/pull/381#issuecomment-241898086","issue_url":"https://api.github.com/repos/tvalacarta/pelisalacarta/issues/381","id":241898086,"user":{"login":"superberny70","id":7559559,"avatar_url":"https://avatars.githubusercontent.com/u/7559559?v=3","gravatar_id":"","url":"https://api.github.com/users/superberny70","html_url":"https://github.com/superberny70","followers_url":"https://api.github.com/users/superberny70/followers","following_url":"https://api.github.com/users/superberny70/following{/other_user}","gists_url":"https://api.github.com/users/superberny70/gists{/gist_id}","starred_url":"https://api.github.com/users/superberny70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superberny70/subscriptions","organizations_url":"https://api.github.com/users/superberny70/orgs","repos_url":"https://api.github.com/users/superberny70/repos","events_url":"https://api.github.com/users/superberny70/events{/privacy}","received_events_url":"https://api.github.com/users/superberny70/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T22:17:06Z","updated_at":"2016-08-23T22:17:06Z","body":"Ahora el atributo 'mediatype' por **defecto** de cualquier objeto InfoLabels se fijara entre: \"movie\", \"tvshow\", \"season\" o \"episode.\r\n\r\n- Si no existe el atributo 'tvshowtitle': mediatype = 'movie'\r\n- Si existen los atributos 'tvshowtitle' y 'episode' o 'episodeName' : mediatype ='episode'\r\n- Si existen los atributos 'tvshowtitle' y 'season': mediatype ='season'\r\n- Si existe el atributo 'tvshowtitle', pero no existen 'episode', 'episodeName' ni 'season': mediatype ='tvshow'\r\n\r\nEvidentemente se puede fijar manualmente cualquier otro valor con oInfoLabels['mediatype']='cualquierCosa'"}}
{"actor":{"display_login":"superberny70"}}