Closed HackedGameMaker closed 6 years ago
does the two share the same ID? can you paste here the relevant raw HTML of such case (or link to the page)
As I've said before that adding
_EPISODES_RE = \
re.compile("<li>\s<a.+?data-id=\"(.+?)\" data-base=\"(\d+)\".+?data-comment=\"(.+?)\".+?data-title=\"(.+?)\".+?href=\"\/watch\/.+?\">.+?</li> <li>"
Makes the plugin play the videos that weren't playing before and doesn't want to play the videos that were playing before, however it seems to override the previous edit I made where it lists the videos properly but still doesn't play the new videos. I was hoping you'd know a way around this and get both fixes to cooperate with each other.
Hold on let me make another commit to show you what I meant
So adding < l i > (without the spaces) at the end of NineAnimeBrowser.py causes it to clash with the previous edit and make a new edit to where it plays the episodes that weren't working. Try them both out to see what I mean, just remove < l i > at the end to try out the other version of my fix
i've seen the change, but i want to see the code it is trying to parse thats why i need either a link to such episode(anime) or the html as raw..
The show I've been using to test this is My First Girlfriend is a Gal that way I could tell the difference between the cen and uncen versions, this is also how I discovered the fixes/issues. Here's a link to the show (view-source:https://www6.9anime.is/watch/my-first-girlfriend-is-a-gal.wyrl/9qjqv8) viewing this really helped me out to discover the fixes/issues
Here's the line of code that gave me the idea in the first place data-id="9qjqv8" data-base="1" data-comment="1" data-toggle="tooltip" data-title="Jul 12, 2017 - 09:00" href="/watch/my-first-girlfriend-is-a-gal.wyrl/9qjqv8">01
from the page you gave me:
<li> <a class="active" data-id="9qjqv8" data-base="1" data-comment="1" data-toggle="tooltip" data-title="Jul 12, 2017 - 09:00" href="/watch/my-first-girlfriend-is-a-gal.wyrl/9qjqv8" data-original-title="" title="">01</a> </li>
<li> <a data-id="m8j89v" data-base="1" data-comment="01uncen" data-toggle="tooltip" data-title="Jul 12, 2017 - 11:43" href="/watch/my-first-girlfriend-is-a-gal.wyrl/m8j89v" data-original-title="" title="">01-Uncen</a> </li>
Now, note that data-id is different, this id is the one that needs to be sent to play inorder to play the correct episode. so from what i'm seeing your fix is correct, execpt for the extra "LI" you've added right after it. i belive that removing it will solve the problem. which means new regex should be:
<li>\s<a.+?data-id=\"(.+?)\" data-base=\"(\d+)\".+?data-comment=\"(.+?)\".+?data-title=\"(.+?)\".+?href=\"\/watch\/.+?\">.+?</li>
I've tested those changes:
--- a/resources/lib/NineAnimeBrowser.py
+++ b/resources/lib/NineAnimeBrowser.py
@@ -24,7 +24,7 @@ class NineAnimeBrowser(BrowserBase.BrowserBase):
re.compile("<li>\s<a\shref=\"/genre\/(.+?)\"\stitle=\"(.+?)\">",
re.DOTALL)
_EPISODES_RE = \
- re.compile("<li>\s<a.+?data-id=\"(.+?)\" data-base=\"(\d+)\".+?data-title=\"(.+?)\".+?href=\"\/watch\/.+?\">.+?</li>",
+ re.compile("<li>\s<a.+?data-id=\"(.+?)\" data-base=\"(\d+)\".+?data-comment=\"(.+?)\".+?data-title=\"(.+?)\".+?href=\"\/watch\/.+?\">.+?</li>",
re.DOTALL)
_PLOT_RE = \
re.compile('<div class="desc">(.+?)</div>', re.DOTALL)
@@ -144,7 +144,7 @@ class NineAnimeBrowser(BrowserBase.BrowserBase):
"id": int(einfo[1]),
"url": "play/" + anime_url + "/" + einfo[1],
"source": self._to_url("watch/%s/%s" % (anime_url, einfo[0])),
- "name": "Episode %s (%s)" % (einfo[1], einfo[2])
+ "name": "Episode %s (%s)" % (einfo[2], einfo[3])
})
return base
This works for me, or at least it looks good, i didnt really play the videos the make sure they are playing correct, can you give that changes a try and verify it is what expected?
No it still doesn't work, like I said before the only way the altered versions play is by adding the li part at the end so we'll have to see if we can find another way around that.
i'll fix it properly later today, thanks you helped :)
@HackedGameMaker i've released new version with a fix, you can verify it yourself if you like
No now none of the episodes are playing, but I'll double check and try again. I'll also look into the code to see if I can figure something out, though I think I'd be better if we both take a look at it.
None is working? Did you update plugin?
Yeah I updated the plugin though I'm going to double check in case something went wrong on my end, though just to be sure have you tried the plugin yourself too.
Yeah I am seeing censor using heart on 01 version while 01-Uncen doesnt have it..
@DxCx Sorry the fix did work for me now it's just kodi was needing to be uninstalled and reinstalled for me lately, but I'm glad I was able to help you with this issue.
I've managed to fix the naming of the episodes by adding these to the plugin however they still don't work just like before. I did manage to also get the plugin to play the other version of the episodes by adding something else to it but now it doesn't list them properly anymore and it only plays the other version that didn't want to play before.