Opened 10 years ago
Last modified 9 years ago
#12490 closed Patch - Feature
Trakt.tv episode link on detail mythweb page [Implemented] — at Initial Version
Reported by: | Owned by: | Rob Smith | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | Plugin - MythWeb | Version: | Unspecified |
Severity: | medium | Keywords: | trakt.tv |
Cc: | Ticket locked: | no |
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") ?>")});