Giter Site home page Giter Site logo

nliautaud / trakttvstats Goto Github PK

View Code? Open in Web Editor NEW
29.0 5.0 5.0 4.42 MB

A chrome extension adding various improvements to trakt.tv

License: MIT License

CSS 24.87% JavaScript 67.86% HTML 7.27%
trakt trakt-tv charts statistics translation extension browser-extension chrome chrome-extension

trakttvstats's People

Contributors

nliautaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

trakttvstats's Issues

TMDb API caching

Cache API responses in LocalStorage to retrieve already known data.

  • Improve speed (in comparison to browser caching) from 150ms to 50ms
  • Allow retrieval of cached requests without API calls (see #30 )

Custom external links : custom URLs

Add the possibility to define the URL with some templating. Use Google (I'm Lucky) by default.

Possible format of options string :
First link, Second Link "http://website.com/q=%title%"

Would result to :

  • <a href="https://www.google.fr/search?btnI&q=%search%+First+Link">First Link</a>
  • <a href="http://website.com/q=%title%">Second Link</a>

With the following templates strings :

String Example
%search% Captain Fantastic 2016
%title% Captain Fantastic
%year% 2016
%imdbid% tt234567

Based on a suggestion by @chatterer on August 29, 2017 on chrome webstore

Country codes using the additional ISO-3166-1 should not be saved as lowercase

By using #39, we noticed setting pt-BR as a language works properly but not pt-br or PT-BR.
However, when submitted by an user in the options windows, the extension always change the entered string to lowercase, making these languages to not work properly.

The case should thus be properly changed to (lowercase)-(UPPERCASE) for these "long" languages codes, when submitted in the extension's options windows

Extensions settings checkbox not rendering their states

Hello there ! Looking back into this extension, I just noticed that

Ticking a checkbox in the extension's settings does not display the "checked" state of the checkbox.

(Here, debug is actually enabled, which is why we have access to the local storage option.)
image

I confirmed this behavior on chromium browsers : Edge 82 and Chrome 79-82
I'll try to look into this and submit a PR, as I believe it is related to the CSS styles applied.

More options for posters localization

"Posters localization"

  • "No" : would not replace posters with localized versions
  • "Replace" : would replace the poster. Initiated on hover or on page load depending on the related option.
  • "On hover" : would show the localized poster on hover and then return to the original on focus lost. Would always be initiated on hover.

Add Collected and listed support in the charts

Your add-on is great and I think adding (in a different color or in an inner/outer circle) the amount of listed and collected movies to the chart would be awesome (if possible) πŸ˜ƒ

UI v3

The UI/UX should :

  • As an infographic : show useful information at page load, don't show too much information, be readable quickly and disturb the page flow as little as possible.
  • As an interactive dataviz and filter : allow to change as many parameters as possible and create the most possible combinations in the least possible interactions.

It wasn't really possible to keep the donuts of the first UI as soon as the number of data parameters increased, as the circles would take more space and the complexity increase as well. The second version of the UI allowed to show a large range of numbers in a single screen, regardless of the number of jobs. But the donuts of the first version, by making an emphase on jobs, included the graphs as a part of the author profile, of the biography. A sort of "Mr. X is a director, writer, producer born in...".

UI 1 (up to v0.3) UI 2 (v0.4...)
ui1 capture 2017-09-27 17_20_01-steven spielberg - trakt tv

As the number of parameters will rise again with the someday inclusion of type (movies/shows) #11 and duration #12, a third version need to be designed, and should mix the advantages of each previous one. It will require the selection of which information would be available at the same time.

Deduplicate filmography page by default

Would add three modes accessible in the options :

  • Full : remove categories and list movies only once, indicating every jobs below. Possibly relayout.
  • Categorized : deduplicate inside existing categories
  • Off : default duplicated movies by categories & by jobs

Custom external links improvement for shows and episodes

Hi there,

Just noticed that while clicking a custom external link on a TV show or Movie works fine, clicking one on an episode opens a Google search for the name of the episode, without the show title, which is unlikely to find a correct match.

It should add the show title in the search query, along with the episode, I believe.

Add localized releases dates

On movie/show page, show other release dates in addition to the original country release.

  • API : https://developers.themoviedb.org/3/movies/get-movie-release-dates
  • Render : display an additional date next to the original or replace the date by a drop-down containing every known dates ? In that case show the oldest first, or one set in options ? Maybe show the one from the settings if the option is set and the release exists, or else show the oldest.
  • Options : ask for a iso_3166_1 code, or the existing language code can be used in a way ?

Testing extension error / icon.png

Package is invalid. Details: "Extension icon" icon.png "can not be loaded."

Trakt improver DEV
Version de l'application : 0.4 alpha
Version du client : 5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.105 Safari/537.36 Vivaldi/1.93.941.3
Date du rapport : 29/08/17 01:53
cenobite chatterer on chrome webstore

Add localization of every dates

Translate every dates in the user language.

Ex 30 aoΓ»t 2017 Γ  21:44 instead of August 30, 2017 21:44.

Would apply on seen/rated dates under posters and on buttons, on comments...

0.5 layout update : posters filtering

Merged PR #50 is breaking vip blocks with a forced position: unset.

before after

In overall, the posters filtering would probably require more thought.

  • quick fix completely disable the functionality. The charts UX will be really bad, but some things will be there.
  • functional fix Fix the filtering controller by reflecting the layout changes, but apply it in the same way as before. Won't work with the new categorized layout and the native filtering options.
  • long term fix : design a filtering that works with the native filters.

Localization : Support world-wide title, original title and localized title

The movie page title could show up to three different titles : the world-wide title as indicated by Trakt, the original title and a localized title. The movies thumbs would show up to two of them.

Display : The alternate titles are shown one below the other, according to the options.

  • In a movie page one title would be shown as the header, along with the date and other infos, and the other titles would be shown below as sub-headings, pointing out their origin (see imdb).
  • The movies thumbs would show a main one, and another below.

Options : The options allow to choose which title to show and in what order.

  • Original title (select) : Don't show (default) / Display below / Display first
  • The localization language enable the following options :
  • Show the localized title first (checkbox)
Localization options/Original title Don't show Display below Display first
Localization disabled The Movie 2000 The Movie 2000
μ˜ν™” (original title)
μ˜ν™” 2000
The Movie (world-wide title)
Localization enabled The Movie 2000
Le Film (FR)
The Movie 2000
μ˜ν™” (original title)
Le Film (FR)
μ˜ν™” 2000
The Movie (world-wide title)
Le Film (FR)
Localized title first Le Film 2000 (FR)
The Movie (world-wide title)
Le Film 2000 (FR)
The Movie (world-wide title)
μ˜ν™” (original title)
Le Film 2000 (FR)
μ˜ν™” (original title)
The Movie (world-wide title)

These options give some possibilities without using a more complex input. But a more advanced UX could be a drag-and-drop list ordering, with a "disabled-pool" where the different options could be taken from or moved to. This would allow more possibilities, including the use of localized title only, original title only, etc.

Technical notes

When the original title is required, TMDb would be called even without a language code given. And the "on page load" / "on hover" setting should be accessible in such case.

  • World-wide title : Trakt title
  • Original title : TMDb API original_title
  • Localized title : TMDb API title (exists if i18nLang is set) or alternatives_titles.title (appended trough append_to_response)

The corresponding alternatives_titles seems to be more correct than the localized title. The second could be used as a fallback for the first if necessary. Ex: Joint Security Area gives JSA (Joint Security Area) as french title and JSA, Joint Security Area as french alternative_title.

Issue/remarks

  • The original title return the non-westernized title (ex. 곡동경비ꡬ역 JSA). The westernized original title may be present in alternate_titles (ex. Gongdong gyeongbi guyeok JSA), but is not marked as "original" so cannot be retrieved reliably.

Original suggestion by @chatterer on August 29, 2017 on chrome webstore

wrong matching on some translated posters

I've seen some weird Localized posters matching.
I attach 2 images. one with original posters and one with translated.
Look the series The Amazing World of Gumball and Modern Family,
it matches Gumball with a poster of Sherlock holmes and Modern Family with The secret of the lakes.

I've put in settings language ES for spanish

original posters

bad es posters

Improved items translation behavior, removal of translation mode option

With the api caching (#28) allowing to distinguish between items who require an API call and those who don't, and by looking for items visible on viewport, the on load and on hover modes can be removed and replaced by a smartest behavior :

  • On page load, translate every cached items
  • On scroll and resize, translate every other items which are visible on the viewport

Add stats&filtering by runtime

Each entry has [data-total-runtime], so getting the data is straightforward.

But howto UI/UX ?

  • Which graphs could give the best infos in relation to the others ?
  • How is it manipulated by the user to filter the data ?
  • Are the data gathered, like the years are treated by decades ?
  • Is there a limited range of runtimes filtered by default ?

The most useful feature may be a toggle/select to show/hide/switch between short works and feature-length works. It could work in conjunction with a runtime graph.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.