GithubHelp home page GithubHelp logo

pvr.hts's Introduction

License: GPL-2.0-or-later Build and run tests Build Status Build Status

Tvheadend PVR addon for Kodi

This is a Kodi PVR addon for connecting to a tvheadend backend.

Build instructions

When building the addon you have to use the correct branch depending on which version of Kodi you're building against. If you want to build the addon to be compatible with the latest kodi master commit, you need to checkout the branch with the current kodi codename. Also make sure you follow this README from the branch in question.

Linux

The following instructions assume you will have built Kodi already in the kodi-build directory suggested by the README.

  1. git clone --branch master https://github.com/xbmc/xbmc.git
  2. git clone https://github.com/kodi-pvr/pvr.hts.git
  3. cd pvr.hts && mkdir build && cd build
  4. cmake -DADDONS_TO_BUILD=pvr.hts -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/kodi-build/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
  5. make

The addon files will be placed in ../../xbmc/kodi-build/addons so if you build Kodi from source and run it directly the addon will be available as a system addon.

Useful links

pvr.hts's People

Contributors

ace20022 avatar adamsutton avatar alanwww1 avatar alwinesch avatar azlm8t avatar bkuhls avatar elupus avatar fernetmenta avatar fetzerch avatar gade01 avatar glenn-1990 avatar hudokkow avatar jahutchi avatar jalle19 avatar janbar avatar john-tornblom avatar ksooo avatar margro avatar martijnkaijser avatar metaron-uk avatar nemphys avatar opdenkamp avatar perexg avatar phunkyfish avatar rechi avatar txtranslation avatar verequies avatar weblate avatar wsnipex avatar xhaggi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pvr.hts's Issues

Sponsoring packages to official Debian repository

Hi,

I'm maintaining the XBMC/Kodi packages in Debian and I am also maintaining xbmc-pvr-addons which is now split to separate upstream repositories here.
I intend keeping Kodi up-to-date in Debian and the PVR packages as well but seeing the most of packaging work done here, too makes me wonder if we could work together on the official Debian packages instead working independently and duplicating part of the effort.
I would happily sponsor the uploads to Debian if you would like to be the maintainer listed or we could co-maintain the packages.

https://packages.qa.debian.org/k/kodi.html
https://packages.qa.debian.org/x/xbmc-pvr-addons.html

Stuttering recordings with epg tag

xbmc/xbmc#7601

As isengard final is already out, we might need to work around this?

Other addons don't suffer from this as they don't set an epg tag to recordings.

Not only active recordings seems affected, but actually all recordings with an epg tag, this is an serious issue on low power devices (rpi, imx6, android,...)

I can confirm that this works: Glenn-1990@b773579

@ksooo @Jalle19

HTTP 401 when using credentials not defined in backend.

+Description+

Catch all account enabled to allow any user/pass access to all features set in Tvheadend.
Dummy user and pass set in pvr.hts kodi addon.

+Issue+

Using the above configuration the imagecache results in a 401 error when pvr.hts requests icons using the dummy account not defined in Tvheadend. If you add the dummy account to Tvheadend and reconnect the icons are served correctly.

See: https://tvheadend.org/issues/3519

Add support for updating autorecs/timerecs (htsp api v25)

Htsp api 25 adds support for updating timerecs and autorecs.

Currently pvr.hts will delete the autorec and recreate a new one on update.
In this way, all fields that are not available through the htsp interface are reset back to it's default, that's not desired ofc. We should support real updating now.

Skipping: prompt at end of file

Now that #92 is resolved, as far as I'm concerned, I've got a feature request.

Case:
I'm watching a recording that has about 5 minutes left to go. I accidentally jump 7 minutes forward, so past the end. In livetv this does not have any consequences, but in a recording it has.
The effect whould be: stop watching the recording.
Or I'm watching a recording and reach the end of it without skipping forward.
I'd very much like to be prompted at this point. Like: end of recording, do you want to stop watching/delete this recording?

And then I'd have the choise of skipping back, just stop or in fact delete the recording.

I'm not sure this request is addressed right, could be a kodi thing, not a pvr addon thing. (or both)

Sddon version 2.2.6

I have upgrade the addon to version 2.2.6 last night , but now i have the following problem , i cannot start a recording from kodi and all previous recordings show a date of 01-01-1970 2:00

In the kodi log I see the following :

13:53:12 T:140700803094592 WARNING: JSONRPC: Could not parse type "PVR.Details.Channel"
13:53:12 T:140700803094592 WARNING: JSONRPC: Could not parse type "PVR.Details.ChannelGroup.Extended"
13:53:12 T:140700803094592 WARNING: JSONRPC: Could not parse type "GUI.Property.Value"
13:53:12 T:140700803094592 WARNING: JSONRPC: Could not parse type "Setting.Details.SettingList"
13:53:12 T:140699227907840 NOTICE: Thread JobWorker start, auto delete: true
13:53:12 T:140699236300544 NOTICE: Thread LanguageInvoker start, auto delete: false
13:53:12 T:140700803094592 NOTICE: ActiveAE DSP - starting
13:53:12 T:140700803094592 NOTICE: initialize done
13:53:12 T:140700803094592 NOTICE: Running the application...
13:53:12 T:140699227907840 NOTICE: PVRManager - starting up
13:53:12 T:140699219515136 NOTICE: Thread PVRManager start, auto delete: false
13:53:12 T:140699211122432 NOTICE: Thread PVRClient start, auto delete: false
13:53:12 T:140699211122432 ERROR: PVR - invalid timer type supplied by add-on 'unknown'. Please contact the developer of this add-on: Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld
13:53:12 T:140699236300544 ERROR: Previous line repeats 4 times.

I'm using HTS Tvheadend 4.1-373~gcb5f6a1 with Kodi 16.0-ALPHA2 Git:38c4b2a

Unable to start addon

I'm running the latest nightlies, my logs look like;

11:43:00 T:140327486932736  NOTICE: Thread JobWorker start, auto delete: true
11:43:10 T:140327226689280  NOTICE: Autoconfigure - auto-configured Tvheadend using host 'IP:9799' and port '9982'
11:43:13 T:140327226689280   ERROR: Unable to load /usr/lib/kodi/addons/pvr.hts/pvr.hts.so, reason: /usr/lib/kodi/addons/pvr.hts/pvr.hts.so: undefined symbol: hts_sha1_size
11:43:13 T:140327226689280 WARNING: UpdateAndInitialiseClients - failed to create add-on Tvheadend HTSP Client, status = 6
11:43:13 T:140327226689280 WARNING: UpdateAndInitialiseClients - failed to load the dll for add-on Tvheadend HTSP Client, disabling it
11:43:13 T:140328626710272  NOTICE: Thread AddonStatus pvr.hts start, auto delete: true
11:43:18 T:140326782072576  NOTICE: Thread JobWorker start, auto delete: true
11:45:09 T:140327486932736  NOTICE: Previous line repeats 1 times.

Feature: Improvements to Display of Rules/Events

Picking this up from my comment in issue #131...

This could be user error. It could be a work in progress. It could just be me. Feel free to close if it's any of those.

I recently tested Kodi master and a particular pvr.hts (add-oneshot-timer-enable-support) branch in ksooo's fork (this is relevant if it's been worked on since).

I noticed that the TV -> Timer view no longer just lists the upcoming events; now, it lists the active recording rules (which you have to drill into to see any upcoming scheduled recordings) plus any one-time (non-rule) events. I can also see that you can deselect "Group timers" and then you'll see the list of timers plus the list of events.

A couple of comments...

  1. If you have a lot of rules that aren't currently active, or aren't currently matching anything, they simply get in the way. There's no apparent way to say "only show me active rules that are actually going to record something" vs "show me every rule I've ever defined and not got round to deleting".
  2. If you're going to display rules that aren't currently matching an event (either inactive or just not matching), it would be helpful if the ones that are matching were flagged in some way. That way, you at least know which ones are worth drilling into to see the underlying events.
  3. Deselecting "Group timers" then gives a mixed list. So, while you do now get a decent list of all upcoming events (like the old view), it's still cluttered by rules that might be active, might be inactive, might be matching something, might not be. I'd have thought that the rules should really be on a different screen as you manage them differently to events; if they're going to be here, then they're just headings, and they either need to be seen as such (so sorted as rule - matching event 1- matching event 2 - rule -(no matching events) - rule - matching event...) or not displayed at this point.

I'm not sure how clear that is, or even if it's still a current observation - happy to expand if needed (or if I've just missed a config option somewhere...).

Cheers...

pvr.hts.so installed in /usr/lib64/addons/pvr.hts/

After commit xbmc/xbmc@60eb0b2 in main kodi code, the pvr.hts.so (and targets) are installed in /usr/lib64/addons/pvr.hts/ instead of in /usr/lib64/kodi/addons/pvr.hts.
The resources are installed in the right place: /usr/share/kodi/addons/pvr.hts/
I do not know if this should be reported here or in kodi main code but anyway I report it here.

Thanks

Crash during EPG import

Crash log: http://sprunge.us/dKVF
Forum thread: http://forum.kodi.tv/showthread.php?tid=226906

The interesting part:

Thread 1 (LWP 645):
#0  0x7587fff4 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
#1  0x659689d8 in ?? () from /usr/lib/kodi/addons/pvr.hts/pvr.hts.so
#2  0x6596da48 in CTvheadend::GetEpg(ADDON_HANDLE_STRUCT*, PVR_CHANNEL const&, long, long) () from /usr/lib/kodi/addons/pvr.hts/pvr.hts.so
#3  0x659649b0 in GetEPGForChannel () from /usr/lib/kodi/addons/pvr.hts/pvr.hts.so
#4  0x0084ccf0 in PVR::CPVRClient::GetEPGForChannel(std::shared_ptr<PVR::CPVRChannel> const&, EPG::CEpg*, long, long, bool) ()
#5  0x00853d0c in PVR::CPVRClients::GetEPGForChannel(std::shared_ptr<PVR::CPVRChannel> const&, EPG::CEpg*, long, long) ()
#6  0x00508720 in EPG::CEpg::UpdateFromScraper(long, long) ()
#7  0x00509fe8 in EPG::CEpg::LoadFromClients(long, long) ()
#8  0x0050a1d4 in EPG::CEpg::Update(long, long, int, bool) ()
#9  0x0050c5a8 in EPG::CEpgContainer::UpdateEPG(bool) ()
#10 0x0050cf24 in EPG::CEpgContainer::Process() ()
#11 0x0095a674 in CThread::Action() ()
#12 0x0095aee0 in CThread::staticThread(void*) ()
#13 0x76d17d88 in ?? () from /lib/libpthread.so.0

Read only timers

Is it needed to use read only timers?
User example 1) I added a repeating rule for a show running every evening.
I'm able to watch this show today, so I want to cancel the timer for this evening, but... this is not possible, I can only delete the complete schedule?
I have to use the tvh webui to handle this case.

User example 2) I have one tuner and am watching live tv, a repeating timer starts recording and interrupts the live stream, so I want to cancel that active recording to allow me watching live tv, this is not possible... Even more, the stop recording button is listed, but doesn't work.

I think canceling a read only timer is possible for tvh 4.1, but maybe we have to handle tvh 4.0 not as read only?

stop recording listed, but not working
schermafdruk van 2015-12-21 15 14 29

unable to cancel a timer which I'll watch in prime time
schermafdruk van 2015-12-21 15 15 26

I didn't investigate yet where the problem lies (kodi or pvr.hts), but we should fix this for Jarvis is out.
@ksooo @Jalle19

Unable to change Stream Profile

I tried to set "pass" as stream profile in HTSP Client, but I get this error:

DEBUG: CAddonCallbacksAddon - ADDON::CAddonCallbacksAddon::QueueNotification - Tvheadend HTSP Client - Error Message : 'Streaming profile pass is not available'

The same with matroska, and so an.

Specs:
Kodi Jarvis beta 5
TVHeadend HTSP Client 2.2.10
TVHeaend Server 4.1-1350

Branch / Tag information in README.md

It would be nice if the README.md provides some information about the release management.

At least the fact, that branches/Isengard shall be used for Kodi's Isengard release and that there are no dedicated tags.

Settings rework v2

As mentioned before, the advanced tab is getting to big.
So I have some suggestion which I'm happy to implement.

3 settings tabs:
tab 1) connection settings: leave it as it is now
tab 2) streaming settings:
->a] predictive tuning
->b] streaming profile from #119
->c] timeshift config (to be created) with the following options,
---->1) server config (default),
---->2) force off,
---->3) select minutes.
->d] enable subscription conflict managment #79
tab 3) dvr:
->a] autorecording start window behavior
->b] default value for duplicate detection
->c] default value for priority #124
tab 4) advanced settings:
->a] epg async -> maybe it's time to set this on as default?
->b] debug trace

This should be the final settings refactor :p
So, what do you think?

armhf build ?

Hello.
Sorry to be a nuisance but it is possible to get an armhf build of this?

I try to compile on my ubuntu x86_64. But I am missing things and it says:

id@emachines-e520:~/pvr.hts/build$ cmake ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:7 (find_package):
  By not providing "Findkodi.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "kodi", but
  CMake did not find one.

  Could not find a package configuration file provided by "kodi" with any of
  the following names:

    kodiConfig.cmake
    kodi-config.cmake

  Add the installation prefix of "kodi" to CMAKE_PREFIX_PATH or set
  "kodi_DIR" to a directory containing one of the above files.  If "kodi"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/id/pvr.hts/build/CMakeFiles/CMakeOutput.log".
id@emachines-e520:~/pvr.hts/build$ 

Reconnect after tvh failure/restart

Hi,,

I'm quite sure that pvr.hts has beed quite reliable in re-connection after a tvh failure or restart in the past. Currently (pvr.hts 2.2.9 with tvh 4.1-909~g0a73d7f) this no loinger works.

How to reproduce:

  • play a channel with kodi
  • stop tvh
  • playback stops (paused)
  • start tvh
  • keeps being paused, tvh UI shows the connection, but no subscription)

On the next channel switch all is working fine again. I would expect that playback resumes automatically.

Thanks in advance
Dietmar.

Timeshift

A discussion about broken timeshift implementation in kodi.

If I understand the kodi's player code right, the player has no knowledge about the timeshift behavior. It just does these operations: READ, SEEK(UTC), SPEED(unit 100 - negative backward). Unfortunately, there is no signalization back to the player that the timeshift buffer is empty when user press fast-forward or rewind so the player tries to send more SEEK commands without going to SPEED(100). This causes massive interactions with TVH backend which tries to seek to nowhere and some packets are dropped (TVH sends all errors back through HTSP!). Note that VDR PVR plugin does not support fast-forward/rewind at all.

I believe that the core kodi player must be improved to be notified that fast-forward and rewind is no more possible to go back to SPEED(100). Another option is to support only PAUSE as the VDR PVR plugin does at the moment.

Feature External recording via tvh client

Hello,

Amazing work guys but I have one request which keeps bothering me. Is it possible to implement a record destination within the client add-on ? VDR has this feature and is excellent for people who want to setup recording themselves within Kodi instead of the webserver.

As I'm no use with programming, I would be happy to donate or pay the devs direct if this feature is possible.

Regards,

Aidan

Can't play any recordings (git latest)

This issue exists in both Gentoo and Ubuntu using latest code (git latest) of both pvr.hts and Kodi.
Any recording cannot be played at all. No info or warning issued in the UI.

How to reproduce:
Click on any recording (old or recorded with the current version of Kodi/pvr.hts).
The encoding of the title of the recording is irrelevant (in the posted below log it is utf-8).

What is expected:
The recording to be played. It used to work a couple of months ago...

What happens:
Clicking on any recording does nothing - no UI warning, no start of playing the recording etc.

Here is the log entry in Kodi:

15:42:27 T:140337408288896  NOTICE: DVDPlayer: Opening: pvr://recordings/active/ДЕНЯТ, В КОЙТО ЗЕМЯТА СПРЯ, TV (Moviestar), 20150405_164500.pvr
15:42:27 T:140337408288896 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
15:42:27 T:140337408288896   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
15:42:27 T:140337408288896   DEBUG: LinuxRendererGL: Cleaning up GL resources
15:42:28 T:140337408288896   DEBUG: CLinuxRendererGL::PreInit - precision of luminance 16 is 16
15:42:28 T:140333905880832   DEBUG: Thread DVDPlayer start, auto delete: false
15:42:28 T:140333905880832  NOTICE: Creating InputStream
15:42:28 T:140333905880832   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - vfs open file=dvr/791792914
15:42:28 T:140333905880832   ERROR: AddOnLog: Tvheadend HTSP Client: pvr.hts - Command fileOpen failed: DVR entry does not have a file yet
15:42:28 T:140333905880832   ERROR: AddOnLog: Tvheadend HTSP Client: pvr.hts - vfs failed to open file
15:42:28 T:140333905880832   ERROR: CDVDPlayer::OpenInputStream - error opening [pvr://recordings/active/ДЕНЯТ, В КОЙТО ЗЕМЯТА СПРЯ, TV (Moviestar), 20150405_164500.pvr]
15:42:28 T:140333905880832  NOTICE: CDVDPlayer::OnExit()
15:42:28 T:140333905880832   DEBUG: CDVDInputStreamPVRManager::Close - stream closed
15:42:28 T:140333905880832   DEBUG: OnPlayBackStopped: play state was 1, starting 1
15:42:28 T:140333905880832   DEBUG: Thread DVDPlayer 140333905880832 terminating

Here is the recording config entry at HTS server side from ~/.hts/tvheadend/dvr/log/12cd312ffcd041b19b4c3f54ed4ba9cf

{
    "start": 1428252300,
    "start_extra": 0,
    "stop": 1428259500,
    "stop_extra": 0,
    "channel": "2c080c5e70a74d5dfd5cb6f514670088",
    "channelname": "Moviestar",
    "title": {
        "bul": "ДЕНЯТ, В КОЙТО ЗЕМЯТА СПРЯ"
    },
    "subtitle": {
        "bul": "ДЕНЯТ, В КОЙТО ЗЕМЯТА СПРЯ"
    },
    "description": {
        "bul": "-----SNIPPED------"
    },
    "pri": 2,
    "retention": 365,
    "container": -1,
    "config_name": "392f291eba53caaf035b38e150edd455",
    "owner": "-----SNIPPED------",
    "creator": "-----SNIPPED------",
    "errorcode": 0,
    "errors": 0,
    "data_errors": 14,
    "dvb_eid": 10729,
    "noresched": false,
    "autorec": "",
    "timerec": "",
    "content_type": 0,
    "broadcast": 67864544,
    "files": [
        {
            "filename": "/home/hts/Recordings/ДЕНЯТ, В КОЙТО ЗЕМЯТА СПРЯ.mkv"
        }
    ]
}

No messages in the debug log of the HTS server considering any request for the file recording are found...

At the same time other frontends like TVGuide (android) etc work ok with the same recording...

Thanks

Suggestion for manual timers

Currently when a user adds an advanced timer through an epg event (tv guide for example), there are 4 options.

  1. one time
  2. one time (guide-based)
  3. repeating
  4. repeating (guide-based)

Would it make sense to remove option 1) and 3) here as this might confuse the user?
Also (guide-based) could be renamed to (epg-match), what do you guys think? It's just a suggestion ;-)

@Jalle19 @ksooo

Seperate Isengard from master

Time to create a Isengard branch as Isengard is in beta?

In this way, we can make the master branch ready for the upcoming series recording support and maybe add minimal autorec support through menu hooks without interfering with ksooo's work?

Minimal autorec supported is requested here:
http://forum.kodi.tv/showthread.php?tid=227249

I had a tvh addon with autorec support for helix and gotham. Pushed it to Isengard, but now with using menu hooks instead of custom dialogs.
Glenn-1990@c1e728f

@ksooo @Jalle19 Your opinions?

PVR Addon API 4.2.0

Now, that xbmc/xbmc#8896 got merged, we need to implement changes for PVR Addon API 4.2.0. Currently pvr.hts master addon is broken, due to API version mismatch.

@FernetMenta How to implement the new API function for pvr.hts? pvr.hts has its own demuxer as you know... So, is it just return true in all cases, even if there is no "current stream"?

Choppy playback: asked for new data packet, with nothing available

Choppy playback on certain "Stingray Music" channels. Streams are MPEG-2 Video. When starting such a channel playback starts choppy, Kodi shows "Buffering..." After a while playback is fine. No weird messages in TVH. Kodi logs does show "WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available" when the playback is interrupted. Please take a look at the kodi.log pastebin url I added.

Playback of H.264 channels is just fine. TVH shows 0 BER, 0 uncorrectable blocks, 0 transport errors, 0 continuity errors. SNR and signal strength @ 100%

Example: I start a radio station on my Kodi mediacenter in the living room. Playback is ok, no stuttering. I go to the mediacenter upstairs with Kodi and start the same radio channel - to be clear the mediacenter in the living room is still playing said channel - and Kodi upstairs plays with stuttering.

But also if there's only one mediacenter playing the stuttering occurs.

Add-on V 2.1.18
Kodi 15.2-RC3
Mac OS, OSMC, Kodibuntu
http://pastebin.com/eTh2bXr3

How to handle subscription conflicts?

This is causing me headaches for ages now.

Scenario: I'm watching live tv, but a recording is starting or another client is tuning a channel. Now my livestream get's aborted with the message 'no free adapter' (depending on the number of adapters in machine, number of livestreams and recordings, etc)

Currently there is no way to know which recording you need to abort if you want to keep watching.
If my livestream was aborted by another client's livestream, then there is no way to do something about this within kodi.

First I was thinking of some kind of conflict management within the kodi pvr API calls, but other backends might handle this different than tvheadend. Tvheadend only needs to change the subscription weight to handle this, so it could actually be done with a simple dialog which is already present in the api.

So I played a bit with the code to get something testable:
Glenn-1990@5d78935

screenshots:
schermafdruk van 2015-07-15 23 33 23

schermafdruk van 2015-07-15 23 36 38

I'm now parsing "subscriptionError", in this way we can also translate the error codes (i.e. scramble, no signal, no free tuner, ...)

Recordings with no tuner assigned to are now displayed as conflict instead of active.

Actually I implemented 2 types of dialogs:

dialog #1:
Showed to user if the livestream suddenly gets aborted because of a higher weight subscription.
User is asked to increase the weight to get a tuner back and keep watching.

dialog #2:
Used when a channel could not be started from the beginning because of a higher weight subscription.
This is showed after 15s on that channel, this to prevent for the dialog popping up on every channel switch when zapping.
User is asked to increase the weight to get a tuner back and keep watching.

@ksooo @Jalle19
Does this have any potential or do we need an PVR API function for this, your opinions please?

iptv muxes in last tvheadend (from git)

TVH updated from git.
in the pvr.hts addon in kodi sound disappeared when playing IPTV mux.
in tvh 4.06 everything is worked.
pvr.hts addon and kodi also from the git installed.

Kodi shows disabled recordings as upcoming, when they're never going to happen

As discussed with @Jalle19 on #hts...

Since tvheadend/tvheadend@fa57953, tvh gives the user the ability to disable an unwanted recording event rather than deleting it. This was to prevent the repeated dance of unwanted-delete-EPG match-reschedule-back in the list-unwanted-delete...

However, Kodi still shows the event as upcoming (e.g. "next recording" on the main TV screen) even if it's disabled, as there's no way for the addon to filter out these disabled events.

It appears that @ksooo has already updated the HTSP spec and bumped to v23 to accommodate the enabled flag.

Autorec entries when setting a recording

There was a client modification that added a nice "Record Once / Record Every time / Every Week at this time / etc" option which was really nice. This would be a great enhancement and the work was done and worked. Here's a link to the details:

http://forum.kodi.tv/showthread.php?tid=217127

I hope this isn't a faux pas to ask for enhancements here, but it's a real shame not to be included.

Thanks.

Don't show "no free adapter" when pre-tuning fails

Consider this scenario:

  1. User sets "use pretuners" to 2.
  2. User starts recording something (basically hogging one tuner for some time).
  3. User starts zapping through channels

What happens:

The "no free adapter" message is shown all the time. This shouldn't happen.

No user feedback when trying to use invalid credentials

Just noticed this now, it seems the code that triggers the GUI notifications on access error were (accidentally?) commented out way back when this code lived in the pvr.tvh fork. I think it definitely should be resurrected, but I don't like the current approach where CHTSPConnection is capable of triggering GUI notifications. In pvr.vbox I used an approach where client.cpp attaches event handlers as lambda functions and the notifications (and other stuff) is triggered there. This way CHTSPConnection would only have to call e.g. OnAccessDenied().

PVR manager not starting

I'm not able to start kodi with the tvh client since some weeks, I already deleted the database, guisettings, etc..

17:04:25 T:139706989782784 DEBUG: CPVRRecordings - Update - updating recordings
17:04:25 T:139705857324800 NOTICE: Thread PVRGUIInfo start, auto delete: false
17:04:25 T:139706989782784 DEBUG: PVRManager - Process - entering main loop
17:04:25 T:139707535042304 INFO: PVRChannelGroupsContainer - SearchMissingChannelIcons - starting channel icon search
17:04:25 T:139705840539392 NOTICE: Thread EPGUpdater start, auto delete: false
17:04:25 T:139705874110208 NOTICE: Start - EPG thread started

This is the last PVR related log line, so it seems to hang somewhere, anyone with the same problem?

Forward/backward skips often go to random places or start of recording

It appears that in Kodi 15.1, if you try to use the right or left arrow keys on an MCE compatible remote to skip forwards or backwards, it works as you'd expect sometimes but other times takes you to a random place in the program, often in the opposite direction of where you wanted to go. For example you try to skip backward, and instead it skips forward several minutes. Sometimes it will take you to the very beginning or very end of the recording. Sometimes it goes in the direction you want but much further than you wanted. There is no discernable pattern, it seems totally random. This only happens in the PVR add-on. If I copy the recording from the TVHeadEnd server and place it in my Videos directory on the Kodi machine and play it as a Video, then skips work as they are supposed to. There are no issues with skipping when playing any other type of video. This is on a Linux-based system running Kodi 15.1 although the problem was also observed in 15.0, but seems even worse since 15.1 came out.

CPVRChannelGroup - Persist: SQL constraint violation

Loading the hts plugin will frequently on reboot and the screen gets stuck in 'Starting PVR manager'.
I'm using TVHeadend with two satellite networks (Astra + Hotbird) so there are plenty of services and channels mapped. It seems the issue occurs when a video PID is missing and a channel that was classified 'tv' is changed to 'radio' or vice versa. This happens every few hours so I have to clear the TV DB on every reboot.

In this such a case the logs would give me an error like this:

22:13:46 T:139793007634176   ERROR: SQL: Abort due to constraint violation
        Query: INSERT INTO channels (iUniqueId, bIsRadio, bIsHidden, bIsUserSetIcon,
        bIsUserSetName, bIsLocked, sIconPath, sChannelName, bIsVirtual, bEPGEnabled, 
        sEPGScraper, iLastWatched, iClientId, idEpg) VALUES (1800902271, 1, 0, 0, 0, 0,
        'http://192.168.10.2:9981/imagecache/1577', 'Bahai Radio', 0, 1, 'client', 0, 1600, -1)
22:13:46 T:139793007634176   ERROR: CommitInsertQueries - failed to execute queries

At the same time TV29.db already contains the following entry in table channels:

sqlite> select * from channels where iUniqueId=1800902271;
1711|1800902271|0|0|0|0|0|http://192.168.10.2:9981/imagecache/1577|Bahai Radio|0|1|client|0|1600|1711

The records only differ in bIsRadio (insert statement wants to set it 1, exists as 0) and idEpg (insert: -1, exists: 1711). The error gets thrown because the records would share the same values for iUniqueId and iClientId (unique index).

Environment:
ArchLinux 4.3.3-2 x86_64
Kodi 15.2
kodi-addon-pvr-hts 2.1.18-1 (built from Isengard branch)

Note: I'm not sure if it's a bug in the addon or rather in the Kodi PVR manager but I understand that existing channels should have the m_iChannelId field populated in order to have the PVR manager call 'REPLACE INTO' rather than 'INSERT INTO'.

Refactoring roadmap

I'm opening this here instead of creating a PR so we can come to an agreement on what should be done and what not. There are a couple of issues I'd like to address:

  • separate all classes into separate headers. Currently we have a bunch of .cpp files that all share the common (massive) Tvheadend.h header.
  • add some getters to CTvheadend to retrieve e.g. the global CHTSPConnection object, this way we wouldn't need all the "passthrough" methods in CTvheadend (see the demuxer related methods for instance). => ksooo: not sure about this one. I think pushing stuff (context) down is to prefer over sharing a global tvh object from which everything can be pulled.
  • move all classes under a tvheadend namespace as a separate subdirectory, and unify the naming scheme by dropping the C and CHTSP prefixes from our classes. => ksooo: only class CTvheadend left in global namespace after #334
  • Use classes instead of structs for our internal objects (timers, channels, events) and add proper comparison operators to them in order to get rid of the UPDATE macro.
  • attempt to separate the Kodi API as clearly as possible from the tvheadend namespace, this means that e.g. PVR_CHANNEL structs are not passed down from client.cpp. Instead, the corresponding channel is looked up and CTvheadend operates on SChannel (or a class Channel, see earlier point) instead.
  • Replace CStdString
  • replace C style casts with C++ style casts.

@ksooo do you agree with these points? If we decide to do this we should probably do it incrementally, starting from the top (separating classes into separate files) to keep the changes managable and reviewable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.