Página 41 de 95

Re: Italian channels issues and development

Publicado: 02 Sep 2015, 22:50
por zanzibar1982
Hola!
Grat to know vvvvid.it was fixed. I talked to original author francesco dicarlo and he said it was
too busy to take care for plugin development and he was thinking about
dropping the progect.
Good to know someone is helding it up.

Good job DrZ3r0, I also updated my repo with your fixes.
Tantifilm's a good site.

https://github.com/Zanzibar82/plugin.vi ... a.italiano

Re: Italian channels issues and development

Publicado: 03 Sep 2015, 17:24
por MikeW.
But the page for search trailer is disappeared also at you with pelisalacarta 4.0.3?
Even if it didn't work (i given always zero results) first i saw the option, now not, also if i see the file "trailertools.py" there is still under folder "core".
I was thinking, probably a stupid idea... to create a new channel to put with all others, named for example "cerca trailer" or similar, that connect only at the search page of youtube... it would be a difficult or useless job you think? I see others channel give yet youtube sometimes between the results when research an movie, and it's pratically always the trailer...
I known there is yet the youtube addon, very complete, but that ipotetic channel perhaps could be usefull for fast research directly on pelisalacarta without exit...and it will be usable for all type of research not only trailer.

Re: Italian channels issues and development

Publicado: 03 Sep 2015, 21:11
por dentaku65
MikeW. escribió:But the page for search trailer is disappeared also at you with pelisalacarta 4.0.3?
Even if it didn't work (i given always zero results) first i saw the option, now not, also if i see the file "trailertools.py" there is still under folder "core"...
mmm the global search it works... the results are not accurate as before but it works... at least with my repack (search only in the italian channels)

https://github.com/dentaku65/plugin.vid ... lacarta.it

You must uninstall the actual pelis, install this one and reboot.

Re: Italian channels issues and development

Publicado: 03 Sep 2015, 21:33
por robalo
@MikeW.
It may not be what you want. You step what I did for the little ones. :)

Código: Seleccionar todo

# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para youtube para mis criaturas
# Buscador simple para visonar o descargar desde YouTube
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re, sys

from core import logger
from core import scrapertools
from core import jsontools
from core.item import Item

from platformcode import library

__channel__ = "youtube"
__category__ = "F,S,D,A"
__type__ = "generic"
__title__ = "Buscar en YouTube"
__language__ = "ES"

## Normal page
page_url = "https://www.youtube.com/watch?v=%s"

## key
key0 = "AIzaSyAd-YEOqZz9nXVzGtn3KWzYLbLaajhqIDA"
key1 = "AIzaSyDXWo8-scFY-Ugcn2A0vGo8023hpcWtXto"

## Googleapi search
api_search = "https://www.googleapis.com/youtube/v3/search" + \
             "?q=%s" + \
             "&regionCode=ES" + \
             "&part=snippet" + \
             "&hl=es_ES" + \
             "&key=" + key0 + \
             "&type=video" + \
             "&maxResults=%s" + \
             "&pageToken=%s"

## Googleapi video
api_video = "https://www.googleapis.com/youtube/v3/videos" + \
            "?part=snippet,contentDetails" + \
            "&id=%s" + \
            "&key=" + key0

### Arts
## thumbnails high (hq) 480x360
art_thumbnail = "https://i.ytimg.com/vi/%s/hqdefault.jpg"

## thumbnails standard (sd) 640x480
art_fanart = "https://i.ytimg.com/vi/%s/sddefault.jpg"

def isGeneric():
    return True

def mainlist(item):

    itemlist = []

    itemlist.append( Item( channel=__channel__, action="search", title="Iniciar búsqueda..." ) )

    return itemlist

def search(item,texto):

    item.url = api_search % (texto, "50", "")

    try:
        return fichas(item)
    # Se captura la excepción, para no interrumpir al buscador global si un canal falla
    except:
        import sys
        for line in sys.exc_info():
            logger.error( "%s" % line )
        return []

def fichas(item):

    itemlist = []

    texto = scrapertools.get_match( item.url, "search...([^&]+)&" )

    data = jsontools.load_json( scrapertools.cache_page( item.url ) )

    nextPageToken = data.get('nextPageToken')

    _items = data.get('items', {})

    for _item in _items:

        url = page_url % _item['id']['videoId']
        title = _item['snippet']['title']
        plot = _item['snippet']['description']
        thumbnail = art_thumbnail % _item['id']['videoId']
        fanart = art_thumbnail % _item['id']['videoId']

        fulltitle = title
        title = scrapertools.htmlclean( title )
        show = library.title_to_folder_name( title )
        plot = scrapertools.htmlclean( plot )

        itemlist.append( Item( channel=__channel__, title=title, url=url, action="play", thumbnail=thumbnail, fanart=fanart, plot=plot, server="youtube", fulltitle=fulltitle, show=show, folder=False ) )

    ## Paginación
    url = api_search % (texto, "50", nextPageToken)
    itemlist.append( Item( channel=__channel__, title=">> Página siguiente", url=url, action="fichas", folder=True ) )

    return itemlist

Re: Italian channels issues and development

Publicado: 03 Sep 2015, 22:22
por fenice82
robalo escribió:@MikeW.
It may not be what you want. You step what I did for the little ones. :)

Código: Seleccionar todo

# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para youtube para mis criaturas
# Buscador simple para visonar o descargar desde YouTube
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re, sys

from core import logger
from core import scrapertools
from core import jsontools
from core.item import Item

from platformcode import library

__channel__ = "youtube"
__category__ = "F,S,D,A"
__type__ = "generic"
__title__ = "Buscar en YouTube"
__language__ = "ES"

## Normal page
page_url = "https://www.youtube.com/watch?v=%s"

## key
key0 = "AIzaSyAd-YEOqZz9nXVzGtn3KWzYLbLaajhqIDA"
key1 = "AIzaSyDXWo8-scFY-Ugcn2A0vGo8023hpcWtXto"

## Googleapi search
api_search = "https://www.googleapis.com/youtube/v3/search" + \
             "?q=%s" + \
             "&regionCode=ES" + \
             "&part=snippet" + \
             "&hl=es_ES" + \
             "&key=" + key0 + \
             "&type=video" + \
             "&maxResults=%s" + \
             "&pageToken=%s"

## Googleapi video
api_video = "https://www.googleapis.com/youtube/v3/videos" + \
            "?part=snippet,contentDetails" + \
            "&id=%s" + \
            "&key=" + key0

### Arts
## thumbnails high (hq) 480x360
art_thumbnail = "https://i.ytimg.com/vi/%s/hqdefault.jpg"

## thumbnails standard (sd) 640x480
art_fanart = "https://i.ytimg.com/vi/%s/sddefault.jpg"

def isGeneric():
    return True

def mainlist(item):

    itemlist = []

    itemlist.append( Item( channel=__channel__, action="search", title="Iniciar búsqueda..." ) )

    return itemlist

def search(item,texto):

    item.url = api_search % (texto, "50", "")

    try:
        return fichas(item)
    # Se captura la excepción, para no interrumpir al buscador global si un canal falla
    except:
        import sys
        for line in sys.exc_info():
            logger.error( "%s" % line )
        return []

def fichas(item):

    itemlist = []

    texto = scrapertools.get_match( item.url, "search...([^&]+)&" )

    data = jsontools.load_json( scrapertools.cache_page( item.url ) )

    nextPageToken = data.get('nextPageToken')

    _items = data.get('items', {})

    for _item in _items:

        url = page_url % _item['id']['videoId']
        title = _item['snippet']['title']
        plot = _item['snippet']['description']
        thumbnail = art_thumbnail % _item['id']['videoId']
        fanart = art_thumbnail % _item['id']['videoId']

        fulltitle = title
        title = scrapertools.htmlclean( title )
        show = library.title_to_folder_name( title )
        plot = scrapertools.htmlclean( plot )

        itemlist.append( Item( channel=__channel__, title=title, url=url, action="play", thumbnail=thumbnail, fanart=fanart, plot=plot, server="youtube", fulltitle=fulltitle, show=show, folder=False ) )

    ## Paginación
    url = api_search % (texto, "50", nextPageToken)
    itemlist.append( Item( channel=__channel__, title=">> Página siguiente", url=url, action="fichas", folder=True ) )

    return itemlist
@robalo if there are not problem for you I'm going to add the channel to my fork.

for the italian guys you can find the new channel on my repo . link below!

Re: Italian channels issues and development

Publicado: 03 Sep 2015, 22:38
por robalo
@fenice82: No problem, I like that interests you.

Re: Italian channels issues and development

Publicado: 04 Sep 2015, 00:22
por zanzibar1982
Thank you robalo,
I'm getting that too :)
Added youtube channel and few more strings translated in italian.
Please check
https://github.com/Zanzibar82/plugin.vi ... a.italiano

Re: Italian channels issues and development

Publicado: 04 Sep 2015, 09:54
por MikeW.
robalo escribió:@MikeW.
It may not be what you want. You step what I did for the little ones. :)
Thank's Robalo, it's exactly so i was thinking

Guys, a little problem with addition of this channel youtube.
I actually use the Pelisacarta 4.0.3 Zip of Dentaku, with all channels also not italian.
for add youtube, i take file from yours github (Zanzibar and Fenice), then i have modified my channelselector (i can't take your because i want leave all channels also english)
I try copying the string token from channelselector of Fenice, and pelisalacarta wrong, don't start.

Código: Seleccionar todo

    itemlist.append( Item(title=config.get_localized_string(50001) , channel="youtube" , action="mainlist" , thumbnail = THUMBNAIL_REMOTE+"youtube.png") )    
	#if config.is_xbmc(): itemlist.append( Item(title=config.get_localized_string(30128) , channel="trailertools" , action="mainlist" , thumbnail = urlparse.urljoin(get_thumbnail_path(preferred_thumb),"thumb_trailers.png")) )
Copying the string from channelselector of Zanzibar all works ok, also function of youtube, but where it should compare the name of this choice i have a blank space (pratically between "ricerca globale" and "preferiti")

Código: Seleccionar todo

    itemlist.append( Item(title=config.get_localized_string(40103) , channel="youtube" , action="mainlist" , thumbnail = "https://paverdeck.com/images/icon_youtube.png") )
    #if config.is_xbmc(): itemlist.append( Item(title=config.get_localized_string(30128) , channel="trailertools" , action="mainlist" , thumbnail = urlparse.urljoin(get_thumbnail_path(preferred_thumb),"thumb_trailers.png")) )
If i click on this blank space i enter in youtube research and i see the option "Ricerca...", i have been able to change "Ricerca..." in other name, but i don't undestand where to change to make view the choice in first menu, in youtube.py, in channelselector or others file....
i see the difference is on the number of voice "config.get_localized_string" but i don't be capable to go beyond.
Excuse my dummy question, it's only to try understand and learn something little more... (i wait italian section to "stress" you with many others question to try learn write new channel :lol: )
If Dentaku think to put also this channel in his zip my little problem for now is resolved :D ;)

Re: Italian channels issues and development

Publicado: 04 Sep 2015, 10:07
por fenice82
Add in resource/language/italian/string.xml

A string like the others, wirh number 40103 and the description that you prefer...

I'll try to check what wrong in my file.

Ciao
Fenice 82

Sorry if the path is not accurate, I'm writing from my phone.

Re: Italian channels issues and development

Publicado: 04 Sep 2015, 10:51
por MikeW.
fenice82 escribió:Add in resource/language/italian/string.xml

A string like the others, wirh number 40103 and the description that you prefer...

I'll try to check what wrong in my file.

Ciao
Fenice 82

Sorry if the path is not accurate, I'm writing from my phone.
Thank's Fenice, now i understand i think...
pratically, if i add a new voice, i must create a new string number (not yet in use) with the test of title...
ciao grazie ;)
Appena posso piu tardi faccio un paio di prove

Edit:
Ps : Resolved, thanks ;)