NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 5 6 7 8 9 … 34 Next »
IPTV device - reloading M3U

 
  • 0 Vote(s) - 0 Average
IPTV device - reloading M3U
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,897
Threads: 955
Joined: May 2006
#11
2023-07-26, 02:45 PM
If you use the deb installer dotnet is in /opt/dotnet/dotnet

If the URL's tokens etc are that dynamic perhaps consider writing an extra to get them on demand.

Martin
mrnobody
Offline

Junior Member

България
Posts: 10
Threads: 0
Joined: Jul 2023
#12
2023-07-26, 05:45 PM (This post was last modified: 2023-07-26, 05:56 PM by mrnobody.)
Hi!
Thank you for your reply!
In the /opt/dotnet I have this:

Quote:miroslav@openhab:/opt/dotnet$ ls
dotnet  host  LICENSE.txt  shared  ThirdPartyNotices.txt
miroslav@openhab:/opt/dotnet$ dotnet /opt/nextpvr/system/NScriptHelper.dll -serviceConfusedetting.m3u.update
Command 'dotnet' not found, but can be installed with:
sudo snap install dotnet-sdk      # version 7.0.306, or
sudo apt  install dotnet-host      # version 6.0.120-0ubuntu1~22.04.1
sudo apt  install dotnet-host-7.0  # version 7.0.109-0ubuntu1~22.04.1
See 'snap info dotnet-sdk' for additional versions.
miroslav@openhab:/opt/dotnet$ cd dotnet
-bash: cd: dotnet: Not a directory
Maybe I does something wrong.

I make the m3u file dynamically by Python script. That m3u file has been updated every 30 minutes, and work fine in NextPVR, but when links expire, I have to update m3u file manually by user interface of NextPVR. I'm looking for a way to do this automatically.
Can you advise me how to do it?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,897
Threads: 955
Joined: May 2006
#13
2023-07-26, 05:53 PM
The deb installer which definitely installs it as /opt/dotnet/dotnet as I showed. You need to fully qualify it in your script. In the example you gave you would need to use ./dotnet since the current directory is not part of a Linux path.

The extra I propose could call a python script and as I said it could deliver the URL on demand.

Martin
mrnobody
Offline

Junior Member

България
Posts: 10
Threads: 0
Joined: Jul 2023
#14
2023-07-26, 06:21 PM
Thank you!
And yes, I am an Idiot! ;-)
I got this:
Code:
miroslav@openhab:/opt/dotnet$ ./dotnet /opt/nextpvr/system/NScriptHelper.dll -service:setting.m3u.update
/home/miroslav/.NPVR-data/
/home/miroslav/.NPVR-data/logs
/home/miroslav/.NPVR-data/media
/home/miroslav/.NPVR-data/media/shows
/home/miroslav/.NPVR-data/media/channels
/home/miroslav/.NPVR-data/scripts
/home/miroslav/.NPVR-data/web
/home/miroslav/.NPVR-data/web/temp
Config.xml does not exists. Creating it from master.
Unexpected error checking config.xml: System.IO.DirectoryNotFoundException: Could not find a part of the path '/opt/dotnet/data/Config-master-dont-edit.xml'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName)
   at NUtility.SettingsHelper.CheckConfigExists()
[1] Unexpected error with service: System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at System.Net.WebClient.GetWebResponse(WebRequest request)
   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream)
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadString(Uri address)
   at System.Net.WebClient.DownloadString(String address)
   at NScriptHelper.Program.GetService(String service)
Looks like something went wrong.


Quote:The extra I propose could call a python script and as I said it could deliver the URL on demand.
It will be Ok, but how to do it? My script works fine, but how to call it by NextPVR? Now I run it by Crontab.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,897
Threads: 955
Joined: May 2006
#15
2023-07-26, 06:29 PM (This post was last modified: 2023-07-26, 06:30 PM by mvallevand.)
See https://forums.nextpvr.com/showthread.ph...#pid577661

If you are happy running crontab and that command all is fine. It will be hard on Kodi if you use it with the 100 updates a day.

Martin
mrnobody
Offline

Junior Member

България
Posts: 10
Threads: 0
Joined: Jul 2023
#16
2023-07-27, 04:20 AM (This post was last modified: 2023-07-27, 04:36 AM by mrnobody.)
I'm completely do not understand conception, so I didn't find any useful in:
Quote:Thread Review (Newest FirstSee https://forums.nextpvr.com/showthread.ph...#pid577661

I do not insist to use crontab, just I do not know ather alternatives. I'll be happy if you show me better way.

I fixed few errors, but now I got:
Code:
miroslav@openhab:~$ sudo /opt/dotnet/dotnet /opt/nextpvr/system/NScriptHelper.dll -service:setting.m3u.update
[1] Unexpected error with service: System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at System.Net.WebClient.GetWebResponse(WebRequest request)
   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream)
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadString(Uri address)
   at System.Net.WebClient.DownloadString(String address)
   at NScriptHelper.Program.GetService(String service)

Can you check it? I didn't found description of -service option, so may be I do something wrong and m3u do not updating.

The NScriptHelper.dll looks working because I got this:
Code:
miroslav@openhab:~$ sudo /opt/dotnet/dotnet /opt/nextpvr/system/NScriptHelper.dll -pin:0000 -server:192.168.100.5:8866 -status
[1] <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<Status>
  <Device oid="21" identifier="IPTV (http://192.168.100.5:8080/...)">
  </Device>
  <Device oid="22" identifier="IPTV (http://192.168.100.5:8080/...)">
  </Device>
</Status>
</rsp>

I saw in wiki that NextPVR has config.xml. I checked all file structure /opt/nextpvr/system and I didn't find it. This may be a problem also. 
From where I can download it and where I should put it? Maybe in  /opt/nextpvr/system/data ? 
I'm very sorry if you find my questions are stupid.
Thanks!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#17
2023-07-27, 04:30 AM
I think in this specific case, it might be:

/opt/dotnet/dotnet /opt/nextpvr/system/NScriptHelper.dll -service:method=setting.m3u.update
mrnobody
Offline

Junior Member

България
Posts: 10
Threads: 0
Joined: Jul 2023
#18
2023-07-27, 04:46 AM
Quote:I think in this specific case, it might be:

/opt/dotnet/dotnet /opt/nextpvr/system/NScriptHelper.dll -service:method=setting.m3u.update

On first run I got:
Code:
Config.xml does not exists. Creating it from master.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="fail">
  <err code="13" msg="Not Allowed" />
</rsp>
On second run I got:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="fail">
  <err code="13" msg="Not Allowed" />
</rsp>

It looks as error. I'm not sure that works.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#19
2023-07-27, 04:53 AM
You may need to be in the NextPVR directory when you run it.
mrnobody
Offline

Junior Member

България
Posts: 10
Threads: 0
Joined: Jul 2023
#20
2023-07-27, 05:08 AM
Quote:You may need to be in the NextPVR directory when you run it.
I think I do it.

Code:
miroslav@openhab:/opt/nextpvr/system$ /opt/dotnet/dotnet ./NScriptHelper.dll  -service:method=setting.m3u.update
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="fail">
  <err code="13" msg="Not Allowed" />
</rsp>
Am I right?
I also tried with -pin option and it is the same.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  IPTV stops often SysAdminZ 17 748 2025-04-08, 01:04 AM
Last Post: mvallevand
  [Failed: No errors, but no data delivered. This is usually because the device failed Bobthegoldfish 3 309 2024-11-29, 12:49 AM
Last Post: mvallevand
  No device listed -- error saving capture source: SQLite Error 1: 'no such column: −1' skrottapple 46 4,127 2024-04-13, 10:27 PM
Last Post: skrottapple
  Adaptec avc-3610 device not listed, but detected by OS tryingtomakeitwork 1 489 2024-04-10, 12:29 PM
Last Post: mvallevand
  Australian IPTV Channel 10 refusing "VLC/2.2.6 LibVLC/2.2.6" header Leigh 1 756 2023-10-23, 11:46 AM
Last Post: mvallevand
  usb device doesn't appear in GUI j_yves 4 862 2023-05-29, 02:56 PM
Last Post: j_yves
  IPTV channels not working after network changes spagio 11 2,404 2022-10-19, 05:41 PM
Last Post: sub
  IPTV Stream 404 from NextPVR unless user-agent is changed bphillips09 4 1,534 2022-10-12, 05:19 AM
Last Post: bphillips09
  Device Scan isn't finding HDHR3-US Smithers 11 2,156 2022-09-27, 09:36 PM
Last Post: sub
  Several IPTV Channels Fail To Play yuljk 13 2,892 2022-07-02, 08:29 PM
Last Post: yuljk

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

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

Linear Mode
Threaded Mode