kodi-pvr / pvr.vbox Goto Github PK
View Code? Open in Web Editor NEWKodi VBox TV Gateway PVR addon
License: GNU General Public License v2.0
Kodi VBox TV Gateway PVR addon
License: GNU General Public License v2.0
Apparently the .so should be prefixed by lib
on this platform.
when adding a recording the program status isn't changing in the epg window and the program info window, at least for a running program.
steps to reproduce:
also see screensnap attached
https://i.imgur.com/qaM1BKp.png
The code used at the moment will need some improvements
Basically use ScheduleChannelRecord
instead of ScheduleProgrammeRecord
.
Starting with version 2.48 of the firmware it is possible to send your own programme title and description when scheduling recordings using ScheduleChannelRecord. This way recordings will no longer show up as "unnamed recording" when external XMLTV data is used.
The timeout option is not really necessary and it's not very obvious what it does.
To avoid random issues with timers becoming scheduled when they should actually start recording immediately etc., we need to make sure that:
This is because FilesystemBuffer doesn't call Close() in its destructor
Now that the addon is part of the official addons some steps aren't needed anymore.
At least the part about the timeshift buffer is partly wrong, the implementation has already been moved to its own namespace. Probably some other things need updating as well.
Currently the addon maps external XMLTV entries to VBox channels based on the channel display name. While this should work in the majority of cases, a way to override this mapping has to be implemented at some point.
One way to do this would be that the addon automatically creates a file named xmltvmap.xml
when an external XMLTV file is configured and no such file exists already. The file would be populated with the mappings done automatically. The user can then extend these to fill in the blanks.
Here's a proposal for the file structure. The xmltv-name
attribute is the channel display name as it appears in the external XMLTV file while the content of the mapping
tag is the channel display name used by the VBox.
<?xml version="1.0" encoding="UTF-8"?>
<xmltvmap>
<mapping xmltv-name="Yle TV1">Yle TV1</mapping>
<mapping xmltv-name="Yle TV2">Yle TV2</mapping>
<!-- The user could enter e.g. "MTV3 HD" here -->
<mapping xmltv-name="MTV3"></mapping>
</xmltvmap>
Currently Kodi shows TB when it means GB.
By default the VBox web interface is accessible without any kind of authentication at all. This is quite insecure if the device is meant to be used over the Internet, so authentication should definitely be added.
Seems like tinyxml2 is crashing, I've tried notspiff'2 1.0.12, leethomason's 2.2.0 & 3.0.0.
Not much info in the logs.
Using kodi b9a9083bd9757f375879999ce0638d5f10b871a9
Starting program: /usr/lib/kodi/kodi.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
sh: lsb_release: command not found
[New Thread 0x7fffdf73b700 (LWP 19099)]
[New Thread 0x7fffdff3c700 (LWP 19098)]
[New Thread 0x7fffdbf3b700 (LWP 19097)]
[New Thread 0x7fffc7ffe700 (LWP 19105)]
[New Thread 0x7fff8ffff700 (LWP 19119)]
[New Thread 0x7fffc57f9700 (LWP 19110)]
[New Thread 0x7fffc4ff8700 (LWP 19111)]
[New Thread 0x7fff8cfe9700 (LWP 19124)]
[New Thread 0x7fff9dffb700 (LWP 19116)]
[Thread 0x7fff8cfe9700 (LWP 19124) exited]
[New Thread 0x7fffc6ffc700 (LWP 19107)]
[New Thread 0x7fff9f7fe700 (LWP 19113)]
[Thread 0x7fffc57f9700 (LWP 19110) exited]
[New Thread 0x7fff8956a700 (LWP 19128)]
[New Thread 0x7fff8768e700 (LWP 19127)]
[New Thread 0x7ffff7f2a700 (LWP 19123)]
[New Thread 0x7fff8dbf3700 (LWP 19122)]
[New Thread 0x7fff8e3f4700 (LWP 19121)]
[New Thread 0x7fff8ebf5700 (LWP 19120)]
[New Thread 0x7fff9cff9700 (LWP 19118)]
[New Thread 0x7fff9d7fa700 (LWP 19117)]
[New Thread 0x7fff9e7fc700 (LWP 19115)]
[New Thread 0x7fff9effd700 (LWP 19114)]
[New Thread 0x7fff9ffff700 (LWP 19112)]
[New Thread 0x7fffc5ffa700 (LWP 19109)]
[New Thread 0x7fffc67fb700 (LWP 19108)]
[New Thread 0x7fffc77fd700 (LWP 19106)]
[New Thread 0x7fffdd88d700 (LWP 19102)]
[New Thread 0x7fffde08e700 (LWP 19101)]
[New Thread 0x7fffde88f700 (LWP 19100)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff8956a700 (LWP 19128)]
0x00007fff9c3876b3 in tinyxml2::XMLElement::QueryUnsignedText(unsigned int*) const () from /usr/lib/libtinyxml2.so.1
Not intended obviously.
https://github.com/kodi-pvr/pvr.vbox/blob/master/src/vbox/VBox.h#L30
should read
#include <kodi/libXBMC_addon.h>
This tag:
<desc lang="en">With Catriona Young. Mozart: Overture: Singspiel in three acts: Die Entfuhrung aus dem Serail, K384. Balakirev: Oriental Fantasy orch Lyapunov: Islamey. Holst: Oriental Suite: Beni Mora, Op 29 No 1. Borusan Istanbul Philharmonic Orchestra, conductor Sascha Goetzel. 1.04 Handel: Solomon - oratorio, Act 3; Sinfonia (Arrival of the Queen of Sheba). 1.08 Respighi: Suite: Belkis, regina di Saba (Belkis, Queen of Sheba). 1.33 Erkin: Kocekce. 1.43 Mozart: Quintet for piano, oboe, clarinet, bassoon and horn in E flat, K452. 2.08 Purcell: Timon of Athens, the Man-Hater, Z632. 2.31 Bartok: Violin Concerto No 1 Op Post, Sz36. 2.53 Martinu: Symphony No 1. 3.30 Dvorak: Slavonic Dance No 10 in E minor, Op 72 No 2. 3.36 Mendelssohn: Venetian Boat Song, Op 30 No 6 (Songs Without Words, Book II). 3.40 Vivaldi: Concerto in F for violin, two oboes, two horns, bassoon and cello, Rv569. 3.53 Part: The Woman with the Alabaster box for chorus. 4.00 Faure: Piano Nocturne No 6 in D flat, Op 63. 4.09 Borgs</desc>
is ok and loads without crashing during the initial population of the EPG after booting
This tag:
<desc lang="en">With Catriona Young. Mozart: Overture: Singspiel in three acts: Die Entfuhrung aus dem Serail, K384. Balakirev: Oriental Fantasy orch Lyapunov: Islamey. Holst: Oriental Suite: Beni Mora, Op 29 No 1. Borusan Istanbul Philharmonic Orchestra, conductor Sascha Goetzel. 1.04 Handel: Solomon - oratorio, Act 3; Sinfonia (Arrival of the Queen of Sheba). 1.08 Respighi: Suite: Belkis, regina di Saba (Belkis, Queen of Sheba). 1.33 Erkin: Kocekce. 1.43 Mozart: Quintet for piano, oboe, clarinet, bassoon and horn in E flat, K452. 2.08 Purcell: Timon of Athens, the Man-Hater, Z632. 2.31 Bartok: Violin Concerto No 1 Op Post, Sz36. 2.53 Martinu: Symphony No 1. 3.30 Dvorak: Slavonic Dance No 10 in E minor, Op 72 No 2. 3.36 Mendelssohn: Venetian Boat Song, Op 30 No 6 (Songs Without Words, Book II). 3.40 Vivaldi: Concerto in F for violin, two oboes, two horns, bassoon and cello, Rv569. 3.53 Part: The Woman with the Alabaster box for chorus. 4.00 Faure: Piano Nocturne No 6 in D flat, Op 63. 4.09 Borgst</desc>
reliably crashes every time - with a Kodi reboot loop effectively being created as it can't get past the EPG upload without a crash.
The difference is 996 characters vs. 995 characters. Presumably, there is some memory being allocated somewhere with a fixed size?
This is a problem in the UK where program descriptions can be even longer than this.
For example, the full tag in this particular program is:
<desc lang="en">With Catriona Young. Mozart: Overture: Singspiel in three acts: Die Entfuhrung aus dem Serail, K384. Balakirev: Oriental Fantasy orch Lyapunov: Islamey. Holst: Oriental Suite: Beni Mora, Op 29 No 1. Borusan Istanbul Philharmonic Orchestra, conductor Sascha Goetzel. 1.04 Handel: Solomon - oratorio, Act 3; Sinfonia (Arrival of the Queen of Sheba). 1.08 Respighi: Suite: Belkis, regina di Saba (Belkis, Queen of Sheba). 1.33 Erkin: Kocekce. 1.43 Mozart: Quintet for piano, oboe, clarinet, bassoon and horn in E flat, K452. 2.08 Purcell: Timon of Athens, the Man-Hater, Z632. 2.31 Bartok: Violin Concerto No 1 Op Post, Sz36. 2.53 Martinu: Symphony No 1. 3.30 Dvorak: Slavonic Dance No 10 in E minor, Op 72 No 2. 3.36 Mendelssohn: Venetian Boat Song, Op 30 No 6 (Songs Without Words, Book II). 3.40 Vivaldi: Concerto in F for violin, two oboes, two horns, bassoon and cello, Rv569. 3.53 Part: The Woman with the Alabaster box for chorus. 4.00 Faure: Piano Nocturne No 6 in D flat, Op 63. 4.09 Borgstrom: Music to Johan Gabriel Borkman. 4.21 Haydn: Overture: Sinfonia (L' Isola disabitata). 4.31 Mozart: Overture: Der Schauspieldirektor, K486. 4.35 Schubert: Impromptu No 2 in E flat, D899. 4.41 Delibes: Suite: Sylvia. 4.59 Reutter: Ecce quomodo moritur justus. 5.06 Mendelssohn: String Quartet No 2 in A minor, Op 13. 5.36 Bach: Ricercare a 6 (Musical Offering, BWV1079). 5.45 Kutev: Symphonic Dances. 5.56 Noskowski: The Highlander's Fantasy, Op 17. 6.05 Reinecke: Ballade for flute and orchestra. 6.13 Bach: Quintet No 4 in E flat for flute, oboe, violin, viola and double bass, Op 11.</desc>
This renders the add-on effectively unusable in the UK because without external XMLTV, the EPG is too lousy to use and with external XMLTV, it crashes. It is worth noting that the Simple IPTV PVR plugin parses the same XMLTV file perfectly and also loads the channel icons and the graphics for each program, which vbox.pvr doesn't seem to be able to do.
I hope this is enough detail to track down the problem - please let me know - I tried to find the bug in your source but didn't find it yet, so please let me know where it is when you find it - thanks
Currently if the user is sometimes on his local network and sometimes roaming on the internet (e.g. a laptop), the addon will most likely not work without reconfiguration since there's only one setting for the hostname and ports. What we should do is duplicate all settings so that the user can specify settings for both his internal network and for external access. When the addon starts, it tries the internal hostname first, then the external, and only if neither works will the addon fail to start.
This to avoid consuming all available disk space if a channel is left playing for too long.
AddTimer()
requires an underlying programme when scheduling recordings. This should obviously be changed, but we want to use the guide data for the title and description whenever possible so this needs to be fixed as well.
Linking pvr.vbox.so as shared library against static library liblibxmltv.a fails, see log http://sprunge.us/YhNH
No issue when both static or both shared.
POSITION_INDEPENDENT_CODE is probably needed to be enabled, manually setting this (-DCMAKE_POSITION_INDEPENDENT_CODE=true
) fix the issue.
Due to my little experience with CMake I'm not sending PR but here's the change that works for me
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 915f446..fad44ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
+set(CMAKE_POSITION_INDEPENDENT_CODE True)
+
enable_language(CXX)
find_package(kodi REQUIRED)
They can apparently be deleted by filename
Feature suggestion:
With regards to #35 I would like to suggest that maybe a setting for keeping the buffer in RAM will be added.
ATM we can use tmpfs as the buffer target but it will grow until no space is left which isn't good idea, so support in the addon for keeping in buffer in RAM should actually keep track of the available free space and will make sure at least X MB of space is left free.
For SD video (~1.6Mbps average bitrate), having the buffer in the RAM is working for me quite nicely on devices with 1GB of RAM (Cubox-i2) and it helps avoid constantly writing into flash memory.
For some reason the whole thing crashes hard.
Apparently recordings can have this state, in which case we want to skip them since they don't contain all the necessary elements.
We only want to tell Kodi to update recordings/channels if there are any changes since last time.
Currently it's just c/p from pvr.argustv and obviously doesn't work.
Currently information is only retrieved from the backend once. We need an update loop that runs at a set interval and updates channels, guide, recordings and timers.
This would prevent leaving possibly enormous useless files lying around.
old recordings that made on fw preceding 2.47.x are listed in kodi but cannot be deleted.
It is designed to be generic
Depends on xbmc/xbmc#6914
Failing to build with gcc 4.9.2 as std::put_time which used in https://github.com/Jalle19/pvr.vbox/blob/master/src/vbox/xmltv/Utilities.h#L68 is missing, it was only added in gcc 5.0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54354
If an external XMLTV source is configured, the addon should load it asynchronously. Once it's loaded, the data from it is used should be used if the user has specified that it should override the OTA EPG provided by the VBox.
After adding the update loop, the m_channels
vector gets updated regularly. When watching a channel, m_currentChannel
points to this vector which means that pointer gets invalidated as soon as the update loop has run for a while.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.