Página 2 de 3

Re: Update System development by Chryses user

Publicado: 06 Sep 2015, 19:49
por robalo
Para los servidores se debería buscar una forma alternativa a la forma que se hace con los canales. Para los conectores es más complicado.

Una solución podría ser anunciar que existe actualizaciones o nuevos servidores o incluir un item para comprobara y actualizar la lista de servidores y servidores y que sea el ususario el que ejecute la acción.

Esta opción es como todo, siempre es una es cuentión de gustos y forma de hacer la cosas.

Re: Update System development by Chryses user

Publicado: 07 Sep 2015, 00:30
por zanzibar1982
Why is it more complicated for servers?
Wouldn't it be necessary "just" to use a command at start of pelisalacarta?
So that just as it checks for channelselector.xml changes online, it would check online
also for a "serverlist.xml" to be checked too, where each server is named with a version value.
If changes are made to a server, or a server is being created/added, this should be
noted in serverlist.xml by developers, so that the update can take place for the users.

I hope I have been clear :roll:

...or is it just me doing it too easy?

Re: Update System development by Chryses user

Publicado: 07 Sep 2015, 01:26
por robalo
:)
Esa podría ser otra forma, como te comenté, es cuestión de gustos y forma de hacer las cosas. Puedes hacerlo así y que el que quiera actualizar los conectores deberá reabrir pelisalacarta y esperar que compruebe todos los conectores y las descargas.

Si te fijas, lo que tu sugieres es lo mismo que he sugerido yo. Tu sugerencia pasa por reiniciar peliasalacarta y la mía un item para comprobar si hay actualizaciones.

Re: Update System development by Chryses user

Publicado: 07 Sep 2015, 01:34
por zanzibar1982
Yep, a "server-update button" would be a nice idea for servers, as you said.
But I know people is lazy. Lazy a lot :)
So I think the more it's automated at start, the better.
Most users using pelisalacarta I suppose they have
a good bandwidth for HD streams and decent hardware to play it,
enough for pelisalacarta to check online and download
updated servers in a couple of seconds.

So, how do we proceed? :)

EDIT:

So, in my mind a file "serverlist.xml" like this should exist both online and local:
https://raw.githubusercontent.com/Zanzi ... erlist.xml

Código: Seleccionar todo

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<servers>
<server>
    <id>nowvideo</id>
    <update_url>https://raw.githubusercontent.com/Zanzibar82/plugin.video.pelisalacarta.italiano/master/servers/nowvideo.py</update_url>
    <active>true</active>
    <version>1</version>
    <date>07/09/2015</date>
    <changes>PRUEBA</changes>
</server>

<server>
    <id>rapidvideo</id>
    <update_url>https://raw.githubusercontent.com/Zanzibar82/plugin.video.pelisalacarta.italiano/master/servers/rapidvideo.py</update_url>
    <active>true</active>
    <version>1</version>
    <date>07/09/2015</date>
    <changes>PRUEBA</changes>
</server>

</servers>
the online .xml should be scraped at add-on startup looking for server <id> and <version>.
For each server id, if version value is different from locale servelist.xml then the updated version
must be downloaded from <update_url> automatically.

I understand that in order to add new servers, also "servertools" would need to be modified, as for channelselector
when you add new channels, but at the moment I am interested in only doing eventual servers' updates.

How should we edit launcher.py and updater.py to do that?

Re: Update System development by Chryses user

Publicado: 08 Sep 2015, 13:45
por robalo
He creado un script para actualizar los servidores. He hecho Pull Request para que le eche un ojo jesus. Puedes verlo en el repositorio oficial o en mi Fork de pelisalacarta. No se si te llegaran notificaciones de mis commits.

Re: Update System development by Chryses user

Publicado: 08 Sep 2015, 13:50
por zanzibar1982
OMG I'm going to check that earlier than now! :shock:

EDIT: Applied your server update system on my machine, added the lines in library_service and created update_servers in core,
linked to my repo raw/server folder so that it looks for servertools.py there.
No errors recorded in local pelisalacarta.
Then I created a new online file for test, bitmovie.py, and added it in online servertools servers list,
but restarting pelisalacarta even if it is enabled to check for updates, bitmovie.py is not present in local folder.
Then I added a line to online shareflare.py to see if local gets the changes, but no luck neither.
So I guess A) I am doing something wrong B) something is not working properly C) this is not supposed to create new servers

EDIT 2: I restarted Kodi and it's working :)

Thank you, master :D

Added you as collaborator to
https://github.com/Zanzibar82/plugin.vi ... a.italiano

Re: Update System development by Chryses user

Publicado: 08 Sep 2015, 20:54
por zanzibar1982
Uhm... it works but takes some time at each boot to pelisalacarta. This cannot be made "silent", can't it?

Re: Update System development by Chryses user

Publicado: 08 Sep 2015, 21:41
por robalo
zanzibar1982 escribió:Uhm... it works but takes some time at each boot to pelisalacarta. This cannot be made "silent", can't it?
Te refieres a que trabaje igual que ahora pero que no se vea en la parte superior derecha 'Remote server: "bankin" MD5: 12ef01....'?

Si es eso sólo tienes que comentar o eliminar las líneas de código que están entre las líneas '# ----------------------------'

Re: Update System development by Chryses user

Publicado: 08 Sep 2015, 21:45
por zanzibar1982
No, I mean user can not access pelisalacarta until server update is running. So I wonder if it can be done silent in the meaning servers updates while user browses the menus.
The messages on top are cool :D

Re: Update System development by Chryses user

Publicado: 08 Sep 2015, 22:01
por robalo
ah :) No había probado eso. :oops:

Puedes probar cambiar la parte final del archivo update_server.py con

Código: Seleccionar todo

### Run
from threading import Thread
Thread( target=update_servers ).start()
La actualización se ha más lenta pero se puede haceder a pelisalacarta