TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;)
(2018-01-17, 18:38)doktourtv Wrote: Would someone kindly look at my playwith.py and tell me where I made my mistake or what I missed.

Attached is my playwith.py, (the autoplaywith.py has exactly the same 2 changes.)

Thank you

playwith.py
  
python:
# Play with your own preferred player and paths
if url:
import re
name = "%s = %s = %s" % (start,channel,re.sub('[^A-Za-z0-9-]','',title))
name = name.encode("cp1252")
#filename = xbmc.translatePath("special://temp/%s.ts" % name)

filename = r"g:\dvr\%s.ts" % name # << THIS IS MY DOWNLOAD DIRECTORY

ffmpeg = r"c:\ffmpeg\bin\ffmpeg.exe" # << THIS IS LOCATION OF MY FFMPEG.EXE

cmd = [ffmpeg, "-y", "-i", url, "-c", "copy", "-t", str(seconds), filename]

#p = Popen(cmd,shell=True)
p = Popen(cmd,shell=False)

You had a tab instead of 4 spaces before filename.

The filename needs to use the raw string format r""

It is safest to remove non ascii characters from the filename. See the re.sub command. That could be done much better for unicode titles.

If you want the ffmpeg process to work in the background  swap the commented Popen command around. ie shell=True
Reply


Messages In This Thread
moved by bry - by bry - 2017-01-23, 23:08
Alternate Skins? - by Kanipek - 2017-03-21, 18:06
Recording - by Kanipek - 2017-03-22, 18:20
RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - by primaeval - 2018-01-18, 15:01
SetUp - by francismm - 2019-05-22, 15:32
RE: SetUp - by Cangeoboy - 2019-05-23, 20:36
RE: SetUp - by M89SE - 2019-08-09, 08:09
RE: SetUp - by JQZ* - 2019-05-24, 02:47
Logout Mark Read Team Forum Stats Members Help
TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;)8