playercorefactory.xml for default video player?
#1
hi, what would the playercorefactory.xml for the default video player look like?

I'd like to use the internal player, but modified.

Thank you!
Reply
#2
The wiki has some examples External players (wiki) and this thread is fairly extensive https://forum.kodi.tv/showthread.php?tid=43511

You should be able to set the script up in a way that will offer a choice of players from the context menu when the movie you want to play is in focus. Just out of curiosity why do yo want to use an external player anyway? As a last note DSplayer offers Kodi functionality within the player, most others are using external player control. https://forum.kodi.tv/showthread.php?tid=223175
Reply
#3
thank you for your reply. As I said, I still want to use the internal player. I just need to edit it so it runs a script just before it plays the video file. Aim is to use "Play using...". Then my script runs. And ideally right with it play starts. But my script doesn't contain anything regarding PLAYING the video file. 

The link you provided is a bit too much with entries of 10 years of experiences in over 100 pages.

Would be great if you could be more precise.

So my playercorefactory.xml currently looks like this:

Code:
<playercorefactory>
<players>
<player name="VideoPlayer" audio="true" video="true" />
<filename>C:\Users\ME\AppData\Roaming\Kodi\userdata\myscript.bat</filename>
</player>
</players>
</playercorefactory>

I actually have to add another player (a fake external one) in order for the entry above (VideoPlayer1) to appear under "Play using...".

But still, the .bat isn't running.

On the other hand, the .bat runs when I use it as a fake external player. Problem is, I don't have and I don't want an external player. So the script runs, but the video isn't playing.

Any ideas ?
Reply
#4
actually: 

what would help is to know what the code to press "play" looks like. Maybe I can add this to my script.

Would "Play using ..." also run a python script?
Reply
#5
The 'play using' is calling up an executable with the path & name of the video in-focus, in your case it looks like it worked with your .bat "my script doesn't contain anything regarding PLAYING the video file" you would have to include launching the player with the focus loaded in your .bat This discussion/thread is getting beyond the point of a simple add-on script as per wiki and really should be relegated to the development area where there are users that can assist in either modifying a skin, or feature discussions.

"The link you provided is a bit too much with entries of 10 years of experiences in over 100 pages." Not too much to say here, perhaps start from the last and travel the pages backward? There's a lot of information pertaining to this post in that thread, and to suggest the book is too thick is undervaluing the hard dedicated developer.

Patience is the path to power.
Reply
#6
So you can't answer my question yet you keep replying. I know you like to see your posting number go up, but don't use me.

​​​​​​​Por favor...
Reply
#7
Perhaps this is a step in the right direction:run python script before play
Reply
#8
Looks promising. I'll have a look!

Thank you !
Reply
#9
(2019-01-17, 20:51)3000 Wrote: So you can't answer my question yet you keep replying. I know you like to see your posting number go up, but don't use me.
I did answer your question (wiki's) and pointed at the development section, and some kind soul pointed out the specifics within, let's hope your travels in this forum are a bit more on target. Note the search function.
Reply
#10
nope, still no luck. I edited the DialogVideoInfo.xml but the behaviour didn't change.

Other suggestions are appreciated.
Reply
#11
Editing that XML file on its own won't make the bat file run. You would need to open the video information to trigger the script.

What it sounds like you want is to add a context menu item that will run the bat file, and then play the video. That can be accomplished with a context item add-on.
Reply
#12
Thank you @MrTarantula 

I had a look. I definitely need more help with this. 

Can you give me a hint where to start?
Reply
#13
To create an add-on, you will need to know at least a little about XML, and some python. From there, you should work through the tutorials in the wiki. There's a context menu item tutorial there, but it will make more sense if you read and try all of the tutorials. Also, most add-ons are on Github if you want to look into how others do things.
Reply
#14
@MrTarantula 
ok, thank you. But do I really have to create an add-on? I just want to execute a little script just before the video starts to play.

I wrote in the other thread that I just want to combine two actions into one.
Reply
#15
You can try to hack it into a skin file like what was mentioned above, but if the skin gets updated and that file changes, then whatever change you make will be lost. If you want to do something that is not built into Kodi, then you must create an add-on.

This isn't a bad thing. In fact, Kodi's extensibility is one of its best features. It just requires a bit of learning.
Reply

Logout Mark Read Team Forum Stats Members Help
playercorefactory.xml for default video player?0