Join 2 playercorefactory.xml files
#1
Hi,

I am using TMT5 to play:

a) .iso files
b) bluray folder structure

therefore I have to .bat files PlayIso.bat and PlayFolder.bat

Also I have right now 2 playercorefactory.xml files:

Quote:<playercorefactory>
<players>
<player name="TMT5" type="ExternalPlayer" audio="false" video="true">
<!-- the path to a cmd script - you can change to your own -->
<filename>C:\Users\Andi\Desktop\PlayFolder.bat </filename>
<args>"{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filetypes="bdmv" player="TMT5"/>
</rules>
</playercorefactory>

and

Quote:<playercorefactory>
<players>
<player name="TMT5" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andi\Desktop\PlayISO.bat </filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filetypes="iso" filename="*.iso" player="TMT5"/>
</rules>
</playercorefactory>

Can you show me how to join them to one playercorefactory.xml file that xbmc uses and processes correctly when I am clicking on a .iso or on a .bdmv file.

Don't know how to do properly.
Reply
#2
it's just xml... understand xml (there are tons and tons and tons of resources on this) and you'll understand how ehrm, unenlightened, your question is Wink

Code:
<playercorefactory>
<players>
[add both player blocks here]
</players>
<rules action="prepend">
[add both rules here]
</rules>
</playercorefactory>
Reply
#3
Hi spiff,

ok... I got confused by the rules section being split from the player section...
In general I know the structure of xml, just wasn't unenlightened in that moment :-) Maybe I should take more sleep... Wink

Ok, I think the thing is to change the player name string to get player and rule together.

Then it should look like that:

Quote:<playercorefactory>
<players>

<player name="TMT5_ISO" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andi\Desktop\PlayISO.bat </filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>

<player name="TMT5_FOLDER" type="ExternalPlayer" audio="false" video="true">
<!-- the path to a cmd script - you can change to your own -->
<filename>C:\Users\Andi\Desktop\PlayFolder.bat </filename>
<args>"{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>

</players>
<rules action="prepend">
<rule filetypes="iso" filename="*.iso" player="TMT5_ISO"/>
<rule filetypes="bdmv" player="TMT5_FOLDER"/>
</rules>
</playercorefactory>

Thank you for waking me up!
Reply
#4
yup. that looks spot on

np - and thanks for not taking offense at my ironic comment Smile
Reply
#5
I am looking to add SopCast to the playercore.xml, I tried to follow posts above but I cant quite grasp it, I am looking to add this:

<playercorefactory>
<players>
<player name="SopCast" type="ExternalPlayer" audio="false" video="true">
<filename>/usr/bin/sopcast-player.py</filename>
<args>{1}</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule protocols="sop" player="SopCast"/>
</rules>
</playercorefactory>

running unstable on NATTY, and I have the SopCast player installed.
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#6
What does the debug log show when you try to play a stream that should play with the sopcast-player?

I'm not sure about the protocols="sop" condition. How are you playing these streams? Do you have a URL in a .strm file? If so I'd be inclined to put something in the .strm file name that you can use to identify a SOP stream. Can you give an example of one of the SOP streams you're trying to play.

JR
Reply
#7
I am trying to add the sopcast player I installed on NATTY in sportsdevil right now I have the sop playercore placed according to this thread http://forum.doom9.org/showthread.php?p=...ost1488288 post #11 Do you want a log of things the way I have them set up now?

Here is a log that I posted to the sportsdevil thread.
http://forum.xbmc.org/showpost.php?p=868...tcount=311
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#8
If I want to play, for example, the BBC radio stream Radio 1, mms://wmlive-acl.bbc.co.uk/wms/bbc_ami/radio1/radio1_bb_live_eq1_sl0, I do this by creating a file called BBCRadio1.strm containing the URL. So XBMC is effectively playing the file "BBCRadio1.strm". What I'm asking is how you play the SOP streams. Are they played with an add-on, or do you create .strm files for each stream, or some other method?

I ask because this affects what you put in the playercorefactory.xml. For example suppose I wanted to play all mms: streams like the BBC radio streams using MPlayer, an easy way would be to name my .strm files something like "BBC Radio 1 -MMS.strm". Then I could use a rule like:

<rule name="playmms" filename=".*-MMS.strm" player="MyMPlayer" />

If you're playing the streams using an add-on there isn't a filename, so I'd have to find a different method.

JR
Reply
#9
I want to try and use this http://www.webupd8.org/2011/04/install-s...-1104.html as an external player for sop streams in the sportsdevil addon, hope this clears things up. Thanks for your help regarding this matter.
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#10
Ah OK. A debug log should tell you what's going on. Enable debug logging from System settings, System, Debugging, then restart XBMC, attempt to play a stream from SportsDevil then close XBMC again. Put the xbmc.log on pastebin.com and post the link here.

See http://wiki.xbmc.org/index.php?title=Log_File for how to find the xbmc.log file.

JR
Reply
#11
will get log posted as soon as I can, having a hell of time finding sop streams at the moment, will try again in the morning.
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#12
Here is a log file when trying to access a sop channel in sportsdevil, the playercorefactory.xml is currently located in /usr/share/xbmc/userdata/playercorefactory.xml

http://pastebin.com/r8xyD661
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#13
Ok, take sop://broker.sopcast.com:3912/80562 as an example. I don't have the SportsDevil add-on so I created a file called soptest.strm containing:

sop://broker.sopcast.com:3912/80562

so playing the .strm file will try and open sop://broker.sopcast.com:3912/80562.

I create the following playercorefactory.xml:

Code:
<playercorefactory>
  <players>
    <player name="TestPlayer" type="ExternalPlayer">
     <filename>D:\temp\Test.bat</filename>
     <args>"{1}"</args>
     <hidexbmc>false</hidexbmc>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
    </player>
  </players>

  <rules action="prepend">
    <rule name="SOPTest" protocol="sop" player="TestPlayer" />
  </rules>
</playercorefactory>

where Test.bat contains:

Code:
echo ---%1---
pause

i.e. it just shows what argument it's called with.

And this works. When I play the soptest.strm file a command prompt opens containing:

Code:
C:\Program Files (x86)\XBMC>echo ---"sop://broker.sopcast.com:3912/80562"---
---"sop://broker.sopcast.com:3912/80562"---

C:\Program Files (x86)\XBMC>pause
Press any key to continue . . .

And my xbmc.log contains (unnecessary lines deleted):

Code:
DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: SOPTest
DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: SOPTest
DEBUG: CPlayerSelectionRule::GetPlayers: adding player: TestPlayer (4) for rule: SOPTest
...
NOTICE: ExternalPlayer Filename: D:\temp\Test.bat
...
NOTICE: CExternalPlayer::OpenFile: sop://broker.sopcast.com:3912/80562
...
NOTICE: CExternalPlayer::Process: Player : D:\temp\Test.bat
NOTICE: CExternalPlayer::Process: File   : sop://broker.sopcast.com:3912/80562
NOTICE: CExternalPlayer::Process: Content:
NOTICE: CExternalPlayer::Process: Args   : "{1}"
NOTICE: CExternalPlayer::Process: Start
...
NOTICE: CExternalPlayer::ExecuteAppW32:  "D:\temp\Test.bat" "sop://broker.sopcast.com:3912/80562"

I would replicate my setup as closely as you can, obviously you can't use a Windows batch file, and see what happens.

JR
Reply
#14
in theory would this work in ubuntu? both my xbmc boxes are running some form of linux.
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#15
I assume you'd replace Test.bat with a shell script, but my unix shell scripting skills are small to non-existant. I would have thought the chaps in the Linux/Live forum could help though.

JR
Reply

Logout Mark Read Team Forum Stats Members Help
Join 2 playercorefactory.xml files0