Release MediathekView Addon (German Public Service Video Platforms)
#1
MediathekView Addon for Kodi

Yet another Kodi-Addon for the german public service video platforms... Why?

Because the approach of this addon is different from that of the already available addons: this addon uses the database of the popular project "MediathekView", which is updated hourly and contains more than 200,000 entries from all German public service video platforms. This approach has some significant advantages over the other add-ons that usually scan the ever-changing websites of the German public service video platforms:
 
  • High speed browsing and navigation
  • Independence from all changes to the page layout of the media libraries
  • High reliability

If you have any questions or suggestions about this addon, please feel free to use the official Kodi Addon Forum topic or the German forum topic. Errors and feature requests can also be reported directly as GitHub Issue. The source code is available as well on GitHub.

Highlights
  • Background updating of the database
  • Amazing fast navigation and search
  • Download with subtitles and automatic NFO file generation
  • Internal standalone or shared MySQL database support
  • UI localised to German, English and Italian

Availability and Links
The Addon is available in the official Kodi Addon Repository. If you are interested in testing new features and providing feedback, you can install a dedicated 3rd party repository that will give you access to the beta versions of the addon: The YeaSoft Beta Repository

A german discussion thread about this addon is also available in the official MediathekView Forum. Errors and feature requests can also be reported directly as GitHub Issue. The source code is available as well on GitHub.

How it Works
The addon downloads the database from MediathekView and imports it either into a local SQLite database, or alternatively into a local or remote MySQL database (for use by multiple Kodi clients). During the runtime of Kodi, only the differential update files are downloaded from MediathekView in a configurable interval (default: 2 hours) and integrated into the database. By the next calendar day after the last update at the latest, the update will be carried out again by importing the full MediathekView database.

System Requirements
The system requirements for the addon vary depending on the configuration. After installation, the addon starts in local mode: this means that a local SQLite database is used, which is also updated locally by the Kodi system. This is probably the most common scenario.

Ideally, using the local database requires a file system with a decent performance. A Raspberry with a slow SD card is certainly not the very best choice in this case but still acceptable. The full update will take in this case about 15-20 Minutes but since this happens in the background, you may be able to live with it.

The addon has been tested on different platforms under Linux, MacOS, Windows and LibreELEC/OpenELEC. Various Android systems have also been tested successfully. Due to the variety of platforms, however, it is not possible to make a final compatibility statement.

Alternate Configurations
If the Kodi system is too slow to manage its own database (e.g. Raspberry PI with a very slow SD card) or you want to share the database across multiple Kodi instances, it is also possible to use the addon with an external database (MySQL or MariaDB).

Since many Kodi users have their own NAS system to make their media available to the media center, this is usually also suitable as a MySQL/MariaDB database server since almost all NAS operating systems offer the installation of MySQL.

If the addon is configured to use a MySQL/MariaDB database, the database is created automatically if it does not yet exist on the database server. However, the specified database user must also have sufficient user rights in order to do this.

The connection to the database can be configured in the addon settings in the "Database Settings" section.

If at least one of the connected Kodi systems is able to update the database, the data is available to all Kodi systems. If this is not the case, it is also possible to run the update process on a different system (e.g. the NAS, the database server or another machine).

Standalone Database Update Process
A python2 interpreter as well as the unpacker 'xz' is requirered on the target system in order to execute the commandline update process. Additionally the following python libraries are required:
  • ijson
  • defusedxml
  • mysql-connector
The required libraries can be installed via pip:
Code:
pip install ijson
pip install defusedxml
pip install mysql-connector==2.1.4

The update program is called mvupdate and is located in the root directory of the addon and must be executed from there. The whole addon has to be copied to the target machine. This can be either done by downloading and unpacking the addon archive or by cloning the source repository with git
Code:
git clone https://github.com/mediathekview/plugin.video.mediathekview.git

By specifying the option -h itself or after the requested database type, the application shows specific help instructions:
Code:
leo@bookpoldo ~/plugin.video.mediathekview $ ./mvupdate mysql -h
usage: mvupdate mysql [-h][-H HOST][-P PORT][-u USER][-p PASSWORD][-d DATABASE]

optional arguments:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  hostname or ip address (default: localhost)
  -P PORT, --port PORT  connection port (default: 3306)
  -u USER, --user USER  connection username (default: mediathekview)
  -p PASSWORD, --password PASSWORD
                        connection password (default: None)
  -d DATABASE, --database DATABASE
                        database name (default: mediathekview)


Change Log

v0.5.0 (2018-08-08):
  • Download option was missing in the context menu of some movies
  • Support for older MySQL and MariaDB Versions
  • Downloaded update files are deleted immediately after import
  • Possibility to play a show with subtitles either with "Play with subtitles" in the context menu or automatically if configured in the plugin settings (if "Autoplay with subtitles" is enabled in the settings, the context menu command is not shown since it makes no sense)
  • Search history
  • Faster directory listing of live streams
  • Possibility to download a show as Movie or as Series Episode. This implies two different configurable download locations, a different file naming scheme and different types of NFO files created
  • Three different NFO file creation modes (None, simple or extended)
  • Automatic detection of season an episode if possible
  • Improved download settings (download locations, filename confirmation)
  • Fixed a bug that prevented the creation of the SQLite database on some systems
  • More efficient database layout
  • The mvupdate script has got some additional options: --force and --interval
  • "Update On Start" initiates the update when the plugin is invoked by the user
  • Display of database type and version in the log file

v0.4.2 (2018-01-20):
  • Display of channel logos in various UI screens
  • Fixed wrong movie listing in "Browse by Show in all Channels"
  • Fixed rare exception during database update
  • Download mirrors are now shuffled

v0.4.1 (2018-01-20):
  • Sorting in lists is now case insensitive
  • Fixed broken download functionality
  • Fixed "Search in Title and Description" when using MySQL database
  • Both search functions now work also with quotes
  • Fixed a rare concurrency problem that caused internal database corruption
  • Fixed mvupdate utility
  • "Browse Shows by Channel" brings you immediately to the movie list after selecting a channel
  • New setting allows to configure the number of days considered as recent for "Recently Added"
  • New setting allows to configure if "Recently Added" is calculated based on the air date or the database added date
  • Fixed the movie count in "Recently Added by Channel"
  • Fixed a few localisation errors

v0.4.0 (2018-01-14):
  • Compatibility with Android and Windows: no external decompressor required
  • The MySQL driver is now able to create automatically the database
  • It is now possible to specify the port in a MySQL connection
  • It is now possible to configure the maximal number of search results

v0.3.4 (2018-01-11):
  • The search functions search now also in the show name
  • New function "Recently Added by Channel"
  • German and Italian UI is now working

v0.3.3 (2018-01-09):
  • Selection of download quality
  • Implemented standalone database update process
  • Fixed error in generation of tvshow.nfo
  • README.md now contains all translated versions

v0.3.2 (2018-01-08):
  • Fixed error when downloading files with umlauts
  • Downloads to VFS locations are now directly written without intermediate storage
  • Improved quality of NFO files

v0.3.1 (2018-01-07):
  • Download is now also compatible with Kodi VFS paths
  • Fixed rare exception that kills database update

v0.3.0 (2018-01-07):
  • Implemented movie downloads with metadata (nfo) and subtitles
  • Fixed missing subtitle field during database update

v0.2.9 (2018-01-05):
  • Longer lock timeout (60 seconds) for very slow systems
  • Lazy commits (one commit each 1000 movie additions)

v0.2.8 (2018-01-05):
  • Last update time not updated when update aborted
  • Dramatic speedup of update with SQLite
  • Handling of database corruption

v0.2.7 (2018-01-05):
  • Fixed Naming Exception during update
  • Updated English README
  • Added German README
  • Added Italian README
  • Added LICENSE (MIT)

v0.2.6 (2018-01-04):
  • Implemented differential update

v0.2.5 (2018-01-03):
  • MySQL Support

v0.2.4 (2017-12-30):
  • UI Improvements

v0.2.3 (2017-12-29):
  • Several Fixes

v0.2.1 (2017-12-29):
  • Implemented database update mechanism

v0.2.0 (2017-12-28):
  • First working version with SQLite

v0.1.0 (2017-12-22):
  • First working version
Reply
#2
Fantastic job, exactly what I have been waiting for. I'm already testing it and will provide feedback and of course improvement suggestions. Excellent job and huge thanks for this plugin!
Update: I already have an improvement suggestion: I usually browse the recently added contents per channel.
This is currently not possible but you only provide a global recently added view.
This would really be cool to have so you can select a channel and get the recently added contents. ;-)
Reply
#3
Thank you! See https://github.com/mediathekview/plugin..../issues/14 - When implemented you can activate this feature in the Addon Settings.
Reply
#4
(2018-01-10, 01:09)tuxpoldo Wrote: Thank you! See https://github.com/mediathekview/plugin..../issues/14 - When implemented you can activate this feature in the Addon Settings.
 Really cool, looking forward to that. Check you inbox, I sent you two bug descriptions and another improvement suggestion. ;-)
Reply
#5
Okay, found two issues and sent you the logs via PM ;-)
Reply
#6
A new release is available in the beta repository:

v0.4.0 (2018-01-14):
  • Compatibility with Android and Windows: no external decompressor required
  • The MySQL driver is now able to create automatically the database
  • It is now possible to specify the port in a MySQL connection
  • It is now possible to configure the maximal number of search results
Reply
#7
The addon is now avaiable in the official Kodi addon repository.
Reply
#8
great addon, thanks!
Reply
#9
Cool, really promising!
th only problem so far - I cant download any program.
My setups:
- Libreelec 8.22 (AMLogic/Wetek play 2), and Libreelec 8.22 (HTPC/amd64)
- download directories on nfs shares and local disks
I got this from the logfile: https://pastebin.com/J3f4gzer
Any idea?
Reply
#10
Yes. It is a bug (Github Issue #46) and it has already been fixed in the beta version 0.4.2 released today. I'm waiting for a new dependency to be merged into the Kodi script repository and than I can request the update also in the official Kodi repository.

If you would like to test the beta version, feel free to use the YeaSoft Kodi Beta Repository (See original post under "Availability").
Reply
#11
The Pull request for Release 0.4.2 has been created a few minutes ago. As soon as the Kodi-Team merges the PR, the release will be available in the official Kodi repository.

v0.4.2 (2018-01-20):
  • Display of channel logos in various UI screens
  • Fixed wrong movie listing in "Browse by Show in all Channels"
  • Fixed rare exception during database update
  • Download mirrors are now shuffled

v0.4.1 (2018-01-20):
  • Sorting in lists is now case insensitive
  • Fixed broken download functionality
  • Fixed "Search in Title and Description" when using MySQL database
  • Both search functions now work also with quotes
  • Fixed a rare concurrency problem that caused internal database corruption
  • Fixed mvupdate utility
  • "Browse Shows by Channel" brings you immediately to the movie list after selecting a channel
  • New setting allows to configure the number of days considered as recent for "Recently Added"
  • New setting allows to configure if "Recently Added" is calculated based on the air date or the database added date
  • Fixed the movie count in "Recently Added by Channel"
  • Fixed a few localisation errors
Reply
#12
Hi, many thanks for this great addon which is kind of the missing link of all these mediathek addons.
Some points:
- Can we get a configurable delay for the big update (every two days) after start of the RP?
It's sucking quite a lot of resources and should start only when other tasks are finished completely.
- An option to put the database to a different location (USB drive e.g.) instead of the sd card would be nice
- after searching and playing a result video it jumps out of the addon completely instead of back to the search results

Best regards
Manjaro Linux @ minisforum UM690S / KODI 'Nexus'
Reply
#13
Hi C.O.D. !

We are working exactly on this issue. See Github Issue #16 - this is the next milestone in our roadmap.
Reply
#14
Ah ok Blush
Manjaro Linux @ minisforum UM690S / KODI 'Nexus'
Reply
#15
(2018-01-22, 08:24)C.O.D. Wrote: Hi, many thanks for this great addon which is kind of the missing link of all these mediathek addons.
Some points:
- Can we get a configurable delay for the big update (every two days) after start of the RP?
It's sucking quite a lot of resources and should start only when other tasks are finished completely.
- An option to put the database to a different location (USB drive e.g.) instead of the sd card would be nice
- after searching and playing a result video it jumps out of the addon completely instead of back to the search results

Best regards
 Some more clarification:
  1. As described in Issue #16, we will significantly improve the way updates are handled by the system
  2. Currently we have not planned to implement such a feature, since it seems not to bring real advantages. The database itself is quite small (around 225M) and on really slow systems like Raspberries there is also no speed gain in using another location. The implementation of such a feature would be quite complex because you have to handle all the configuration UI, the operations deriving from configuration changes and all the error situations that may derive and only few users are probably interested in such a feature But there is a workaround for the advanced users: use pathsubstitution in advancedsettings.xml - the internal path of the database is special://profile/addon_data/plugin.video.mediathekview/filmliste-v1.db
  3. I know about this problem. Unfortunately this is due to the general architecture of Kodi's plugin system. Currently I have not found any acceptable solution for this.... I'm still trying to find a workaround, but unfortunately it may happen that I will never find a solution... who knows... Yeah! Found a workaround! See Issue #55 - will be fixed with the next release
Reply

Logout Mark Read Team Forum Stats Members Help
MediathekView Addon (German Public Service Video Platforms)1