NaPs / Kolekto

Kolekto is a really KISS movie catalog software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show more infos in search results

tetraf opened this issue · 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.

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?

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.

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 :-).

Hi, feature has been implemented! :-)

Tell me if you have idea to enhance it!

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?).

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.