Background script with language
#1
Hey guys!

I need help filtering fanart with language.

I'm using the script below to bring background, but it's bringing no language.

How do I bring with language?

<content sortby="random" limit="5">plugin://plugin.video.themoviedb.helper/?info=upcoming&;type=movie</content>
Reply
#2
As I said fanart from TMDb with no language/text is written into fanart by the addon:-

Code:
ListItem.Art(fanart)

And any fanart from TMDb with a language/text is written into landscape by the addon:-

Code:
ListItem.Art(landscape)

So just create a variable to check if landscape art is available or not:-

Code:
<variable name="art">
  <value condition="!String.IsEmpty(Container(12341).ListItem.Art(landscape))>$INFO[Container(12341).ListItem.Art(landscape)]</value>
  <value>$INFO[Container(12341).ListItem.Art(fanart)]</value>
</variable>

Then use the variable in your list/widget.

<imagepath>$VAR[art]</imagepath>
Reply
#3
Can help where I enter this command line. Please
Reply
#4
When I add this line, it doesn't bring up any image, just black screen. How much shooting brings fanart. Looking at the tmdb helper plugin Wiki, there is nothing lanscape, I think the plugin does not have landscape support
Reply
#5
After reading a lot lol, I did what you asked me to, but with the command line:

<value condition="!String.IsEmpty(Container(12341).ListItem.Art(landscape))>$INFO[Container(12341).ListItem.Art(landscape)]</value>

Nothing happens just black screen.

If I remove the first line leaving just like this:
<variable name="art">
  <value>$INFO[Container(12341).ListItem.Art(fanart)]</value>
</variable>


He brings back the fanarts, without language.

Can you still help me?
s the plugin compatible with landscape TMDB?

 If it helps I'm using the PELLUCID skin

I'm using this plugin for home screen background, to search for images of movies and TV Show in a random way, but that will have the name of the movie or TV SHow in the image.

Thank you very much for your attention.
Reply
#6
I don't know if it helps.

But in a file plugin.video.themoviedb.helper

FILE: tmdb.py

There is this setting where it deals with image language.

But I don't have any knowledge to modify.


class TMDb(RequestAPI):
    def __init__(self, api_key=None, language=None, cache_long=None, cache_short=None, append_to_response=None, mpaa_prefix=None, filter_key=None, filter_value=None, exclude_key=None, exclude_value=None):
        super(TMDb, self).__init__(
            cache_short=cache_short, cache_long=cache_long,
            req_api_name='TMDb', req_api_url='https://api.themoviedb.org/3', req_wait_time=0,
            req_api_key='api_key=a07324c669cac4d96789197134ce272b')
        api_key = api_key if api_key else 'a07324c669cac4d96789197134ce272b'
        language = language if language else 'en-US'
        self.iso_language = language[:2]
        self.iso_country = language[-2:]
        self.req_language = '{0}-{1}&include_image_language={0},null'.format(self.iso_language, self.iso_country)

        self.req_api_key = 'api_key={0}'.format(api_key)
        self.req_append = append_to_response if append_to_response else None
        self.imagepath_original = 'https://image.tmdb.org/t/p/original'
        self.imagepath_poster = 'https://image.tmdb.org/t/p/w500'
        self.mpaa_prefix = '{0} '.format(mpaa_prefix) if mpaa_prefix else ''
        self.filter_key = filter_key if filter_key else None
        self.filter_value = filter_value if filter_value else None
        self.exclude_key = exclude_key if exclude_key else None
        self.exclude_value = exclude_value if exclude_value else None
        self.library = 'video'
Reply
#7
Hi, I've tested this with the PELLUCID skin and it works perfectly for me.

Home.xml change line 129 from

Code:
<imagepath>$INFO[Container(12341).ListItem.Art(fanart)]</imagepath>
to

Code:
<imagepath>$VAR[TMDB_Background]</imagepath>
Then at the top of Includes_variables.xml add the following so it looks like this:-

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--Skin variables-->
<includes>
    <variable name="TMDB_Background">
        <value condition="!String.IsEmpty(Container(12341).ListItem.Art(landscape))">$INFO[Container(12341).ListItem.Art(landscape)]</value>
        <value>$INFO[Container(12341).ListItem.Art(fanart)]</value>
    </variable>

    <!--folder titles-->
    <variable name="listTitle">
This will display landscape art (art with text) if it is available for the movie and is not it will fallback to standard fanart.

But remember that not all movies on TMDb have landscape art (art with text).
Reply
#8
Good evening! That's what I did, see he brought me this image but it has text and he doesn't.

Image



He always brings this one, no text.

Image
Reply
#9
I want him to bring me pictures with text.

Image

Image
Reply
#10
Did you add the changes to both files?

Are you sure you made no mistakes in the code?

The changes I posted work perfectly fine for me.
Reply
#11
Yes, I did exactly as you asked

It brings me the image below

Image

I would like this.

Image

See the link below, there are several languages ​​and several images, but it only comes with an image without a language.

https://www.themoviedb.org/movie/774825-...uage=pt-BR
Reply
#12
Test with the line below

plugin://plugin.video.themoviedb.helper/?info=upcoming&;type=movie

plugin://plugin.video.themoviedb.helper/?info=popular&;type=movie
Reply
#13
Here you go, using your popular link:-

https://streamable.com/yi7f9f

As I said, works perfectly.
Reply
#14
This, this is what I want

 kkk

https://streamable.com/yi7f9f
This video turned out really good, that's what I want.

Could you share with me the xml files you changed please.

I'll just replace it, maybe I'm doing something wrong.
Reply
#15
https://gist.github.com/roidy/6c74826337...abf41a0447

I've also changes from a multiimage to a standard image as multiimage isn't needed.
Reply

Logout Mark Read Team Forum Stats Members Help
Background script with language0