Strange behavior when using <onclick>PlayMedia, playing without resume menu.
#1
I have a very basic skin that I have been working on and right now I am finishing up my DialogVideoInfo.xml, which is the movie/tv show information screen.  I created two buttons, one to play the video from the beginning, and the other to resume the video from where it left off.  Just FYI I don't want that little popup window asking if you want to resume coming up, I want this decision to me made within my skin itself.

The idea is I am using conditional visibility to hide or show certain buttons.  So in the end if it's a video that cannot be resumed, it will simply have a play button.  If it can be resumed, you will see two buttons, one for start over and the other for resume.

As of right now these buttons work, but they are showing strange behavior.

To play a video I have the following in the button:
<onclick>close</onclick>
<onclick>PlayMedia($INFO[ListItem.FileNameAndPath],noresume)</onclick>

I figured out quickly that the close in the first one was necessary or the dialog window stayed open when the video started playing.  Using the above the video starts fine just as normal.  The same goes if you click on the button to resume.  Here is where it get's strange.  After you are done watching the video, either if you watch it in it's entirety or stop it early.  Then you go and click on that same video in the library again, nothing happens.  If you click on it several times, you eventually get an error:

"One or more items failed to play. Check the log for more information about this message"

Or I just don't get anything.  If I click on anything else it will play just fine, so it only does this with the very last video that I played.  The only thing I can think of is perhaps my onclick code above is not correct.

Also here is my recent log that seems to show that Kodi is unable to get a filename from my selection.  I am attempting to make the selection from the library page itself, it won't even load to the info screen if this has happened.

Here is a copy of my log:
https://paste.kodi.tv/zuqerimole.kodi
Reply
#2
First...

You have WAY to many banned add-ons and repos instaled. So don't expect too much help here.

2nd
you are using a Kodi version that is outdated since more than 2 years now. If you are going to develop a skin you should really update to a more recent Kodi version because if there might be some bug in Kodi 17 itself, that won't get any fixes. Development goes on and we simply can't maintain or support such old Kodi versions.
Reply
#3
(2019-09-16, 11:19)DaVu Wrote: First...

You have WAY to many banned add-ons and repos instaled. So don't expect too much help here.

2nd
you are using a Kodi version that is outdated since more than 2 years now. If you are going to develop a skin you should really update to a more recent Kodi version because if there might be some bug in Kodi 17 itself, that won't get any fixes. Development goes on and we simply can't maintain or support such old Kodi versions.

Thanks for the heads up, I actually did not even know they were in there.  Had an old roommate who I think installed them, probably to access sports content, I don't even use them and they have been removed.

Also I figured out the issue regarding playmedia, my whole library was kind of messed up and I had multiple different sources.  I made the mistake a long time ago of establishing a network drive for my media, then mapping a network drive and using that network drive for certain sources.  The correct way to add a network share to Kodi is to actually add the network location itself using the SMB protocol.  Since I have multiple drives containing content some were set up correctly while other's were not.  The ones that gave me the issue were those that were on the mapped network drive.  I removed all mapped network drives from my box and set up all sources using the SMB protocol, no further errors when playing content.

I also was able to finally get my way and do away with the standard Kodi context menu that asks if you want to resume, start over, play trailer, etc and instead set the video info screen to have an actual menu on the screen itself.

So if it's "resumable" the menu shows "Start over", "Resume", "Cancel", and this is directly on the info screen itself.

As far as the older Kodi version, I am going to upgrade it eventually but keep in mind it's not really an issue for me.  This particular Kodi PC is connected to an old Mitsubishi CRT console TV from 1987, that runs a highly modified version of the Mimic skin that has been reduced to it's absolute basics, as to simulate what a "DVR" would have looked like back in the day.  Unless I told someone otherwise, they wouldn't even know the thing was running Kodi in the first place.  So the entire thing does what I want flawlessly, which is why I have not upgraded.
Reply

Logout Mark Read Team Forum Stats Members Help
Strange behavior when using <onclick>PlayMedia, playing without resume menu.0