diff --git a/resources/language/resource.language.fr_fr/strings.po b/resources/language/resource.language.fr_fr/strings.po
index 7a35289..8602739 100644
--- a/resources/language/resource.language.fr_fr/strings.po
+++ b/resources/language/resource.language.fr_fr/strings.po
@@ -122,7 +122,7 @@ msgid "Number of seconds in the video to download before starting playback."
" You should adapt this value depending on the power of your machine and the"
" speed of your internet connection."
msgstr "Nombre de secondes dans la vidéo à télécharger avant de lancer la"
-"lecture. Vous devriez ajuster cette valeur en fonction de la puissance de"
+" lecture. Vous devriez ajuster cette valeur en fonction de la puissance de"
" votre machine et de la vitesse de votre connexion internet."
# -----------------------------------
diff --git a/resources/lib/addon.py b/resources/lib/addon.py
index afb2a03..e013beb 100644
--- a/resources/lib/addon.py
+++ b/resources/lib/addon.py
@@ -361,14 +361,12 @@ class PeerTubeAddon():
# before playing the video. It is based on the number of seconds
# configured by the user and the total duration of the video.
initial_chunk_proportion = (int(kodi.get_setting("initial_wait_time"))
- * 100. / duration)
- # TODO: Remove the dot in 100. in python 3? Or keep it to suport both
- # python2 and python3
+ * 100 / duration)
# Download the file, waiting for "initial_chunk_proportion" % of the
# file to be downloaded (seek() takes only integers so the proportion
# is multiplied to have more granularity.)
- if(torrent.seek(initial_chunk_proportion*100, 0) != -1):
+ if(torrent.seek(int(initial_chunk_proportion*100)) != -1):
# Build the path of the downloaded file
torrent_file = os.path.join(torrent_info["save_path"],
@@ -444,4 +442,4 @@ class PeerTubeAddon():
else:
# Display the addon's main menu when the plugin is called from
# Kodi UI without any parameters
- self._home_page()
\ No newline at end of file
+ self._home_page()
diff --git a/resources/settings.xml b/resources/settings.xml
index 36b4ded..914060d 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -80,11 +80,9 @@
0
10
-
- 0
- 1
- 30
-
+ 0
+ 1
+ 30
false
diff --git a/service.py b/service.py
index a5023c1..05f149a 100644
--- a/service.py
+++ b/service.py
@@ -41,7 +41,7 @@ class PeertubePlayer(xbmc.Player):
# conflict with other add-ons or players.
if self.torrent_url is not None:
self.playback_started = True
- self.debug(message="Playback started for {}".format(self.file_name))
+ self.debug(message="Playback started for {}".format(self.torrent_url))
def onPlayBackStopped(self):
"""Callback called when the playback stops
@@ -88,10 +88,8 @@ class PeertubePlayer(xbmc.Player):
"""Pause download of the torrent self.torrent_url"""
# Get the torrent handle
torrent = xbmcvfs.File(self.torrent_url)
- # Call seek() with -1 to pause the torrent. 0 is used as second argument
- # so that GetLength() is not called.
- # TODO: ommit the second argument on Matrix
- torrent.seek(-1, 0)
+ # Call seek() with -1 to pause the torrent.
+ torrent.seek(-1)
def update_torrent_info(self, data):
"""Save the information about the torrent being played currently
@@ -155,4 +153,4 @@ if __name__ == "__main__":
service = PeertubeService()
# Start the service
- service.run()
\ No newline at end of file
+ service.run()