Code Monkey home page Code Monkey logo

Comments (5)

AmineI avatar AmineI commented on June 14, 2024 1

Hi, I cannot reproduce specifically that.
The search query is simply the main header content. For an episode that should be the show/episode number, the episode title and the certification.

For example https://trakt.tv/shows/the-sopranos/seasons/1/episodes/3 is returning 1x03 Denial, Anger, Acceptance TV-MA.

My bad, as I was on mobile when I added this comment and I didn't remember the entire string - apologies, it would indeed search for 1x01 Episode 1 TV-MA in my case !

But, the query is not very helpful for an episode as the show title is missing.

Yes, that's what I was trying to mention above indeed :) .

That feature could be improved by :

  • removing the certification
  • formatting the query as Show title : Season number for a show, for example The Sopranos : Season 1
  • formatting the query as Show title : Season number Episode number "Episode title" for an episode, ex The Sopranos : Season 1 Episode 3 "Denial, Anger, Acceptance"

Thanks for the code link, I'll have a look at how it works soonish (exams almost over ! :) )

from trakttvstats.

nliautaud avatar nliautaud commented on June 14, 2024 1

No problem, good luck with your exams ! :)

from trakttvstats.

AmineI avatar AmineI commented on June 14, 2024

Changed the title to clarify.

Example, currently if an episode's name is "Episode 1" the custom external link will trigger a google search for "Episode 1"

from trakttvstats.

nliautaud avatar nliautaud commented on June 14, 2024

Hi, I cannot reproduce specifically that.
The search query is simply the main header content. For an episode that should be the show/episode number, the episode title and the certification.

For example https://trakt.tv/shows/the-sopranos/seasons/1/episodes/3 is returning 1x03 Denial, Anger, Acceptance TV-MA.


But, the query is not very helpful for an episode as the show title is missing.

That feature could be improved by :

  • removing the certification
  • formatting the query as Show title : Season number for a show, for example The Sopranos : Season 1
  • formatting the query as Show title : Season number Episode number "Episode title" for an episode, ex The Sopranos : Season 1 Episode 3 "Denial, Anger, Acceptance"

The lines in question :

addExternalLinks = function() {
var list = document.querySelector('.sidebar .external')
if(!list || !options.layoutExternalLinks) return
var title = document.querySelector('h1').textContent
if( list.classList.contains('is-customized') ) return
list.classList.add('is-customized')
options.layoutExternalLinks.split(',').forEach(function(domain) {
var goourl = 'http://www.google.com/search?btnI&q='
var firstlink = list.querySelector('a')
var new_el = firstlink.cloneNode(true)
new_el.href = goourl + title + ' ' + domain
new_el.innerHTML = domain
firstlink.parentElement.appendChild(new_el)
})
}

from trakttvstats.

AmineI avatar AmineI commented on June 14, 2024

Well, ended up forgetting, then remembering, then failing to figure it out, then being busy, then--- well, you know how life is :) . Anyway, I have implemented and tested the logic for doing almost as we discussed, I'll write about that in a PR right now.

from trakttvstats.

Related Issues (20)

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.