AutoPlays should turn purple. AutoPlayWiths should turn red.



version 0.0.311-314
- Simpler Recording
- Settings \ Program Scheduler \ AutoPlayWiths \ ffmpeg Program (point to ffmpeg.exe)
- Settings \ Program Scheduler \ AutoPlayWiths \ ffmpeg Output Folder (for recordings)
- if ffmpeg setting is not blank recording will try to use ffmpeg
- else if playercorefactory is set it will use this player to autoplaywith
- else it will look for the autoplaywith scripts in addon_data




AutoPlays will only play the primary stream that you set up for that channel, not the Alternative Streams.
Make sure it is a simple stream that doesn't use a dialog box if you want it to just play.
I'm not convinced it still works properly on a restart of Kodi. Maybe someone can confirm or deny that?

AutoPlayWiths need a bit of setting up first.
There are 2 ways to do it.

1. Set a PlayerCoreFactory.xml player in Settings \ Program Scheduler \ PlayerCoreFactory.xml player.

2. Follow this post to copy some code from the addon folder to the addon_data folder and set it up for whatever
   external play or record method you like. You can get it to launch something on another device if you need to.


- AutoPlayWiths

This is a big addition. The database structure has changed and might need a Settings \ Reset Database.

The AutoPlayWith feature gives you the ability to schedule a Core player from playercorefactory.xml or run your own python script when a Program plays or stops.

The details and example files are in addons\script.tvguide.fullscreen\resources\playwith

The AutoPlayWith list is on Remote 7. To instantly play and stop use Remote 9 and 8 respectively.

This is quite an advanced feature but gives you a lot of potential to do things like: play with an external player, stream the program around your network, dump the stream to disk, schedule backend software like tvheadend or your own server.
If anyone comes up with some generic solutions I will add them into the addon.

As always check the legality of saving streams based on your country's laws and the stream provider's permissions.





---- Have you thought of somehow adding recording functionality? Now that we can set reminders straight from the Guide, imagine having a Record option too.
I know this would probably have to be handled by a 3rd party player so is probably a dead end. Just an idea.

It's been there ever since AutoPlayWith's were added. You just need to do a bit of extra manual labour. Wink

If you have ffmpeg installed for your device it should be fairly easy but needs a bit of work.

See if you can follow the instructions in 
addons\script.tvguide.fullscreen\resources\playwith\readme.txt

I haven't made it generic yet because there are some major variations on all the devices, operating systems and Kodi versions.

If you have a playercorefactory.xml player that can do recording you can use that instead.

[EDIT] It won't be as good as a dedicated pvr recording backend but it does work for addons which the pvr doesn't.







# Play with your own preferred player and paths
if url:
    name = "%s = %s = %s" % (channel,title,time.strftime('%d%m%Y-%H%M'))
    name = re.sub("\?",'',name)
    name = re.sub(":|<>\/",'',name)
    name = name.encode("cp1252")
    filename = xbmc.translatePath("C:\Users\Kodi\AppData\Roaming\Kodi\Recordings\%s.ts" % name)
    ffmpeg = r"c:\utils\bin\ffmpeg.exe"
    cmd = [ffmpeg, "-y", "-i", url, "-c", "copy", "-t", str(seconds), filename]
    p = Popen(cmd,shell=False)





