NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Extras v
« Previous 1 2 3 4 Next »
extra command not firing

 
  • 0 Vote(s) - 0 Average
extra command not firing
buntay20
Offline

Member

usa
Posts: 94
Threads: 16
Joined: Dec 2021
#1
2021-12-25, 06:18 AM
Code:
<extras>
<channel name="Some Channel" number="128"> output="m3u8">
<command>C:\Users\Public\name.py</command>
<command>C:\Users\Public\name.bat</command>
<args> print </args>
  

</channel>

</extras>

I have successfully loaded the extra into devices, and successfully added the channel but when I go to guide and try to watch channel I can see that neither of these commands are firing and stream fails.

"name.py" creates a .bat file that contains      @echo and then a string     then the .bat file is run to print the string to stout

anyway thats what supposed to happen. I have verified that both files are doing what they are supposed to do.
I am not running the .py script headless so when it runs the terminal does show up to tell me it ran.
I do not see the terminal pop up when I click on "watch" when I try to watch the channel.
yes I have the npvr window shrunk down so I can see if the commands run.

why is this not working?????
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2021-12-25, 06:53 AM
You're trying to make it more complicated than it needs to be.

It's only expecting a single <command> and single <args>. If you want to run multiple things, just wrap those multiple things inside a .bat file.

ie, you'd have something like

Code:
<extras>
  <channel name="Some Channel" number="128" output="m3u8">
    <command>C:\Users\Public\something.bat</command>
    <args>{channel}<args>
  </channel>
</extras>
When the user tries to watch that channel, it'll run your test.bat (passing in the channel number as an argument), and expect it to output a m3u8 url to stdout.

The bat file might be something like:
Code:
@echo off
C:\Users\Public\something.py
where something.py finds the stream, and outputs it to stdout.

Alternatively, if you really wanted it to be multiple steps, you might have your something.py writing the stream to a text file, and add some other command to the patch file to print the contents of the text file.
Code:
@echo off
C:\Users\Public\something.py
type c:\temp\somefile.txt
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,771
Threads: 954
Joined: May 2006
#3
2021-12-25, 03:35 PM
This still makes no sense to me "name.py" creates a .bat file that contains @echo and then a string Why not replace that with

print (string)

Martin
buntay20
Offline

Member

usa
Posts: 94
Threads: 16
Joined: Dec 2021
#4
2021-12-26, 04:15 AM
Thank you Sub,  finally got everything working Watch for a PM in a day or two. I will notify you when I make the donation Smile

Martin,
python is very new to me, I have never played with it before so its a learning process as I go.
I did find a piece of code that extracted the urls I needed and tweaked it to do what I wanted.
I am learning a lot, I have literally been eating and breathing python the past week or so but I will admit I am nowhere at the level you are.
Now that I have working code I am planning on playing with it to make things more efficient and see what else I can do.

I am actually doing what you described but my un-necessary step would actually be  the "extra" file calling a batch file to run the py application and echoing the answer instead of just calling the py application itself... figured that out a couple hrs ago.
Like I said I do not only look for an answer but an explanation why the answer works then I like to try and pick apart and play with the answer to learn. That how I learned what I know about VB6.
Thank you for all your help also, both of you helped a lot and hope I can lean on you again in the future. I hope I can contribute to the NextPVR world but I have a lot to learn first Smile
I am excited to see what I can do with python, it seems like it can open a whole new world of possibilities

Francis
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  TabloTV Extra mvallevand 17 4,738 2025-03-13, 10:55 PM
Last Post: mvallevand
  Reminder Pluto TV Extra removed mvallevand 0 342 2025-01-04, 06:32 PM
Last Post: mvallevand
  help requested with sending IR Blast command with extra _Dam0_ 3 449 2024-10-11, 12:53 PM
Last Post: mvallevand
  Getting Pluto extra to work ballfam 163 14,289 2024-08-08, 07:23 PM
Last Post: mvallevand
  Is 'TabloTv Extra' Compatible with Gen 4 Devices? POWerSUrgeSW3 4 1,025 2024-06-23, 01:23 PM
Last Post: mvallevand
  windows media player extra buntay20 4 910 2023-12-17, 06:48 PM
Last Post: Jaggy
  PlutoTV Extra Commerical Exit freezing bisonfan 13 2,274 2023-12-16, 07:42 PM
Last Post: mvallevand
  Extra donation access -plutotv bisonfan 3 937 2023-09-04, 07:26 PM
Last Post: mvallevand
  PlutoTV Extra Problem Metroid 3 957 2023-07-23, 06:41 PM
Last Post: mvallevand
  Trouble installing TabloTV Extra kevin-pvr 60 7,690 2023-04-07, 09:26 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode