DxCx / plugin.video.9anime

plugin.video.9anime - 9Anime plugin for kodi
GNU General Public License v3.0
143 stars 47 forks source link

Naming Episodes Code? #270

Closed HackedGameMaker closed 6 years ago

HackedGameMaker commented 6 years ago

Which codes did you use to name the episodes in the first place because I'm not sure if I'm in the right place, and if I am not in the right place I think I might of figured out the duplicated episode glitch but I'm unable to fix it because I'm unsure of myself. If the creator sees this please show me the proper coding so that I know how you named the episode links in the first place, and then I'll show you what I think will hopefully fix the issue and then you can show me how to properly insert the code and then we can add it to the original source code. As I've said many times before I'm still a bit rusty when it comes to coding since I haven't coded in a while so this plan of mine might not work but it never hurts to try, that way everyone doesn't have to worry about this duplicated episode glitch anymore.

DxCx commented 6 years ago

The name coding is done by the website.. nothing fancy in the addon itself

HackedGameMaker commented 6 years ago

Well changing the test_browser.py and the NameAnimeBrowser.py def test_get_anime_episodes(self): "get_anime_episodes works for one-piece" episodes = self.browser.get_anime_episodes("one-piece.ov8") self.assertGreaterEqual(len(episodes), 750) self.assertEqual(episodes[-1], { 'url': u'play/one-piece.ov8/1', 'is_dir': False, 'image': '', 'name': u"UncenEpisode 1 (Dec 25, 2016 - 10:39)" }) self._sleep()

def _format_episode(self, anime_url, extra): def f(einfo): base = {} base.update(extra) base.update({ "id": int(einfo[1]), "url": "play/" + anime_url + "/" + einfo[1], "source": self._to_url("watch/%s/%s" % (anime_url, einfo[0])), "name": "UncenEpisode %s (%s)" % (einfo[1], einfo[2]) }) return base I got it to come out like this in the kodi app, though I'm unsure how to add this code as well as the original code without having it override the previous one and staying like this rather so that it can combine them both and have both of the code's show up together. screenshot_2018-06-21-15-22-52