Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show more infos in search results #25

Open
tetraf opened this issue Jan 3, 2014 · 6 comments
Open

Show more infos in search results #25

tetraf opened this issue Jan 3, 2014 · 6 comments
Assignees
Milestone

Comments

@tetraf
Copy link

tetraf commented Jan 3, 2014

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.

@ghost ghost assigned NaPs Jan 3, 2014
@NaPs
Copy link
Owner

NaPs commented Jan 3, 2014

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?

@tetraf
Copy link
Author

tetraf commented Jan 3, 2014

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.

@NaPs
Copy link
Owner

NaPs commented Jan 3, 2014

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
Copy link
Owner

NaPs commented Jan 5, 2014

Hi, feature has been implemented! :-)

Tell me if you have idea to enhance it!

@NaPs NaPs closed this as completed Jan 5, 2014
@tetraf
Copy link
Author

tetraf commented Jan 5, 2014

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

@NaPs
Copy link
Owner

NaPs commented Jan 5, 2014

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 NaPs reopened this Jan 5, 2014
@NaPs NaPs added this to the Later milestone Jun 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants