Kolekto icon indicating copy to clipboard operation
Kolekto copied to clipboard

Show more infos in search results

Open tetraf opened this issue 11 years ago • 6 comments

Search results are listed this way:

[#] original_title (year) by director [datasource]

It would be useful to add some details like that:

[#] original_title (year) by director [datasource]
    aka "title_us" [us], "title_fr" [fr] and "title_es" [es]
    cast: actor_a, actor_b, actor_c...

with a new config parameter for prefered title's locales (default: user's locale?) and another for number of actors.

tetraf avatar Jan 03 '14 00:01 tetraf

Hi,

Some times ago I was thinking about a way to let the user format the list output himself. The problem is that the current format is such that is not easy to represent it in a simple formatted string. FYI, the current code generating the list output is here:

def __unicode__(self):
    if self.get('directors'):
        directors = ' by '
        if len(self['directors']) > 1:
            directors += '%s and %s' % (', '.join(self['directors'][0:-1]),
                                                  self['directors'][-1])
        else:
            directors += self['directors'][0]
    else:
        directors = ''
    fmt = u'{title} ({year}){directors}'
    return fmt.format(title=bold(self.get('title', 'No title')),
                      year=self.get('year', 'Unknown'),
                      directors=directors)

With some rules:

  • List of values are always formatted in the form "one, two and three"
  • Directors are always present even if the key doesn't exists
  • Bold values are represented using some markup

I can imagine using the following format for the current list output:

<b>{title}</b> ({year|"unknown"}) by {directors} [{_Datasource}]

What do you think about that?

NaPs avatar Jan 03 '14 11:01 NaPs

I don't see how to show a clean list of alternative titles with this method (no duplicate with original title and no empty title) but it's way more configurable. Adequate for me.

tetraf avatar Jan 03 '14 12:01 tetraf

Yep, you right. But it is possible to do what ever you want using the new rewrite datasource, and to include the new field in the format :-).

NaPs avatar Jan 03 '14 12:01 NaPs

Hi, feature has been implemented! :-)

Tell me if you have idea to enhance it!

NaPs avatar Jan 05 '14 17:01 NaPs

After upgrade to last commit, I've this:

[1] <b>Big Buck Bunny</b> (2008) by Sacha Goedegebure [tmdb_proxy]

without bold text (but stats have bold text yet) (python2-lxml is installed).

I did not find, in the code, how to configure this new feature (it's a new "listing" block?).

tetraf avatar Jan 05 '14 20:01 tetraf

Ok, I just figured that we speak about different things. You speak about search results (as you wrote) and I, about list command. My mistake :-).

To answer to your last message, ok, I noted the bug and it will be fixed soon.

To answer your original message: I need some time to decide. I can't use the system I implemented for the list command, and the feature you want need a lot of changes in datasources api / tmdb backend / tmdb_proxy. Furthermore, fetching alternative titles need one more request for each searched movie, and will slow down the search operation.

NaPs avatar Jan 05 '14 22:01 NaPs