Skip to content

Chapter skipping #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Chapter skipping #271

wants to merge 4 commits into from

Conversation

gbooker
Copy link
Collaborator

@gbooker gbooker commented Feb 16, 2019

GHI (If applicable): #9

Description:

Up/Down buttons when OSD is not displayed will skip by chapter (if present).

Checklist:

  • I have based this PR against the develop branch

@gbooker gbooker requested a review from ruuk February 16, 2019 21:04
@ruuk ruuk self-assigned this Oct 6, 2019
pannal added a commit to pannal/plex-for-kodi that referenced this pull request Oct 27, 2019
@pannal
Copy link
Contributor

pannal commented Oct 27, 2019

Parameters should not be mutable. Fix:

IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/player.py	(revision 807429622b4bc14a26360882cc8466b336b6c2fd)
+++ lib/player.py	(revision 4816fc5cf568914ee9a4d4da4f334d5fe90eb4c8)
@@ -155,7 +155,7 @@
         self.mode = self.MODE_RELATIVE
         self.ended = False
 
-    def setup(self, duration, offset, bif_url, title='', title2='', seeking=NO_SEEK, chapters=[]):
+    def setup(self, duration, offset, bif_url, title='', title2='', seeking=NO_SEEK, chapters=None):
         self.ended = False
         self.baseOffset = offset / 1000.0
         self.seeking = seeking
@@ -163,7 +163,7 @@
         self.bifURL = bif_url
         self.title = title
         self.title2 = title2
-        self.chapters = chapters
+        self.chapters = chapters or []
         self.getDialog(setup=True)
         self.dialog.setup(self.duration, int(self.baseOffset * 1000), self.bifURL, self.title, self.title2, chapters=self.chapters)
 
Index: lib/windows/seekdialog.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/windows/seekdialog.py	(revision 807429622b4bc14a26360882cc8466b336b6c2fd)
+++ lib/windows/seekdialog.py	(revision 4816fc5cf568914ee9a4d4da4f334d5fe90eb4c8)
@@ -888,7 +888,7 @@
             self.updateProgress(set_to_current=False)
             self.setProperty('button.seek', '1')
 
-    def setup(self, duration, offset=0, bif_url=None, title='', title2='', chapters=[]):
+    def setup(self, duration, offset=0, bif_url=None, title='', title2='', chapters=None):
         self.title = title
         self.title2 = title2
         self.setProperty('video.title', title)
@@ -898,7 +898,7 @@
         self.baseOffset = offset
         self.offset = 0
         self._duration = duration
-        self.chapters = chapters
+        self.chapters = chapters or []
         self.bifURL = bif_url
         self.hasBif = bool(self.bifURL)
         if self.hasBif:

@gbooker gbooker force-pushed the graham/chapterSkipping branch from 40454b0 to 09bce1e Compare January 3, 2020 16:17
@ruuk ruuk removed their request for review January 20, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants