Skip to content

Commit

Permalink
Show library version
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Dec 23, 2019
1 parent 5b62319 commit 51d53f0
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/inputstreamhelper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def info_dialog(self):
if system_os() == 'Android':
text += ' - ' + localize(30821) + '\n'
elif self._has_vendor_widevine():
text += ' - ' + localize(30822) + '\n'
text += ' - ' + localize(30822, version=self._get_lib_version(self._widevine_path())) + '\n'
else:
from datetime import datetime
wv_updated = datetime.fromtimestamp(float(get_setting('last_update'))).strftime("%Y-%m-%d %H:%M") if get_setting('last_update') else 'Never'
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.de_de/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.el_gr/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.fr_fr/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.hr_hr/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.hu_hu/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.it_it/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.ja_JP/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.ko_KR/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
4 changes: 2 additions & 2 deletions resources/language/resource.language.nl_nl/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr "Widevine versie: [B]Ingebouwd in Android[/B]"

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgstr "Widevine versie: [B]Aangeleverd door vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr "Widevine versie: [B]{version} [COLOR gray](aangeleverd door vendor)[/COLOR][/B]"

msgctxt "#30823"
msgid "Widevine version: [B]{version}[/B] [COLOR gray](last updated on [B]{date}[/B])[/COLOR]"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.ru_ru/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.sv_se/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ msgid "Widevine version: [B]Built into Android[/B]"
msgstr ""

msgctxt "#30822"
msgid "Widevine version: [B]Supplied by vendor[/B]"
msgid "Widevine version: [B]{version} [COLOR gray](supplied by vendor)[/COLOR][/B]"
msgstr ""

msgctxt "#30823"
Expand Down
13 changes: 11 additions & 2 deletions test/test_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import unittest
import platform
import inputstreamhelper
import default

xbmc = __import__('xbmc')
xbmcaddon = __import__('xbmcaddon')
Expand All @@ -19,7 +20,7 @@
class LinuxVendorTests(unittest.TestCase):

def setUp(self):
open('test/cdm/libwidevinecdm_vendor.so', 'w').write('Linux')
open('test/cdm/libwidevinecdm_vendor.so', 'w').write('Linux\n1.2.3.4')

def tearDown(self):
os.unlink('test/cdm/libwidevinecdm_vendor.so')
Expand All @@ -39,11 +40,15 @@ def test_check_inputstream_hls_again(self):
is_installed = is_helper.check_inputstream()
self.assertTrue(is_installed, True)

@staticmethod
def test_about():
default.run(['default.py', 'info'])


class WindowsVendorTests(unittest.TestCase):

def setUp(self):
open('test/cdm/widevinecdm_vendor.dll', 'w').write('Windows')
open('test/cdm/widevinecdm_vendor.dll', 'w').write('Windows\n1.2.3.4')

def tearDown(self):
os.unlink('test/cdm/widevinecdm_vendor.dll')
Expand All @@ -64,6 +69,10 @@ def test_check_inputstream_mpd_again(self):
is_installed = is_helper.check_inputstream()
self.assertTrue(is_installed, True)

@staticmethod
def test_about():
default.run(['default.py', 'info'])


if __name__ == '__main__':
unittest.main()

0 comments on commit 51d53f0

Please sign in to comment.