[mythtv-commits] Ticket #12490: Trakt.tv episode link on detail mythweb page [Implemented]
MythTV
noreply at mythtv.org
Mon Aug 17 19:44:13 UTC 2015
#12490: Trakt.tv episode link on detail mythweb page [Implemented]
------------------------------+-----------------------------
Reporter: tv@… | Owner: dekarl
Type: Patch - Feature | Status: accepted
Priority: minor | Milestone: unknown
Component: Plugin - MythWeb | Version: Unspecified
Severity: medium | Resolution:
Keywords: trakt.tv | Ticket locked: 0
------------------------------+-----------------------------
Changes (by dekarl):
* owner: kormoc => dekarl
* status: new => accepted
Old description:
> I added a link to trakt.tv for a tv episode, just like linking off to the
> metadata homepage on thetvdb.com. I'm not on github so I didn't submit it
> there, and I'm not sure how to properply update the language files to it
> currently yells that there is no translation...
>
> Here's the diff of mythweb/modules/tv/tmpl/default/detail.php
>
> 140d139
> < var traktPage = $("trakt-page");
> 147d145
> < traktPage && Element.remove(traktPage);
> 149,162d146
> < }
> <
> < var episodeID = item.HomePage.match(/.*&id=(\d+)/)[1];
> < var traktHREF = "http://trakt.tv//search/tvdb/" + episodeID +
> "?id_type=episode"
> <
> < // update the link or create it if this item does have a trakt
> page
> < if (traktPage) {
> < traktPage.href = traktHREF;
> < } else {
> < $($$(".x-links")[0].children[1]).insert({top:
> < new Element("a",
> < {href: traktHREF,
> < target: "mythtwebtrakt", id: "trakt-page"}).
> < update(item.Title + " " + "<?php echo t("Trakt.tv
> Home Page") ?>")});
New description:
I added a link to trakt.tv for a tv episode, just like linking off to the
metadata homepage on thetvdb.com. I'm not on github so I didn't submit it
there, and I'm not sure how to properply update the language files to it
currently yells that there is no translation...
Here's the diff of mythweb/modules/tv/tmpl/default/detail.php
{{{
140d139
< var traktPage = $("trakt-page");
147d145
< traktPage && Element.remove(traktPage);
149,162d146
< }
<
< var episodeID = item.HomePage.match(/.*&id=(\d+)/)[1];
< var traktHREF = "http://trakt.tv//search/tvdb/" + episodeID +
"?id_type=episode"
<
< // update the link or create it if this item does have a trakt
page
< if (traktPage) {
< traktPage.href = traktHREF;
< } else {
< $($$(".x-links")[0].children[1]).insert({top:
< new Element("a",
< {href: traktHREF,
< target: "mythtwebtrakt", id: "trakt-page"}).
< update(item.Title + " " + "<?php echo t("Trakt.tv
Home Page") ?>")});
}}}
--
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12490#comment:2>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list