Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F10835860
D13754.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D13754.id.diff
View Options
diff --git a/files/0001-Change-from-pysrt-to-srt.patch b/files/0001-Change-from-pysrt-to-srt.patch
new file mode 100644
--- /dev/null
+++ b/files/0001-Change-from-pysrt-to-srt.patch
@@ -0,0 +1,64 @@
+From 144d519e8570abd3d4289fb9c16e13b29d5a040c Mon Sep 17 00:00:00 2001
+From: Marcus Mellor <infinitymdm@gmail.com>
+Date: Wed, 9 Nov 2022 21:09:25 -0600
+Subject: [PATCH] Change from pysrt to srt
+
+---
+ docs/user/how_it_works.rst | 2 +-
+ setup.py | 2 +-
+ subliminal/subtitle.py | 9 ++++-----
+ 3 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/docs/user/how_it_works.rst b/docs/user/how_it_works.rst
+index fd845cf..e321c48 100644
+--- a/docs/user/how_it_works.rst
++++ b/docs/user/how_it_works.rst
+@@ -48,4 +48,4 @@ Various libraries are used by subliminal and are key to its success:
+ * `dogpile.cache <http://dogpilecache.readthedocs.org>`_ to cache intermediate search results
+ * `stevedore <http://docs.openstack.org/developer/stevedore/>`_ to manage the provider entry point
+ * `chardet <http://chardet.readthedocs.org>`_ to detect subtitles' encoding
+-* `pysrt <https://github.com/byroot/pysrt>`_ to validate downloaded subtitles
++* `srt <https://github.com/cdown/srt>`_ to validate downloaded subtitles
+diff --git a/setup.py b/setup.py
+index ccc1cda..e25bc2b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -29,7 +29,7 @@ setup_requirements = ['pytest-runner'] if {'pytest', 'test', 'ptr'}.intersection
+
+ install_requirements = ['guessit>=3.0.0', 'babelfish>=0.5.2', 'enzyme>=0.4.1', 'beautifulsoup4>=4.4.0',
+ 'requests>=2.0', 'click>=4.0', 'dogpile.cache>=0.6.0', 'stevedore>=1.20.0',
+- 'chardet>=2.3.0', 'pysrt>=1.0.1', 'six>=1.9.0', 'appdirs>=1.3', 'rarfile>=2.7',
++ 'chardet>=2.3.0', 'srt>=3.5.0', 'six>=1.9.0', 'appdirs>=1.3', 'rarfile>=2.7',
+ 'pytz>=2012c']
+ if sys.version_info < (3, 2):
+ install_requirements.append('futures>=3.0')
+diff --git a/subliminal/subtitle.py b/subliminal/subtitle.py
+index 54f76f6..05ef24e 100644
+--- a/subliminal/subtitle.py
++++ b/subliminal/subtitle.py
+@@ -4,7 +4,7 @@ import logging
+ import os
+
+ import chardet
+-import pysrt
++import srt
+
+ from six import text_type
+
+@@ -95,10 +95,9 @@ class Subtitle(object):
+ return False
+
+ try:
+- pysrt.from_string(self.text, error_handling=pysrt.ERROR_RAISE)
+- except pysrt.Error as e:
+- if e.args[0] < 80:
+- return False
++ srt.parse(self.text)
++ except srt.SRTParseError:
++ return False
+
+ return True
+
+--
+2.35.5
+
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -1,6 +1,6 @@
name : subliminal
version : 2.1.0
-release : 6
+release : 7
source :
- https://github.com/Diaoul/subliminal/archive/2.1.0.tar.gz : c7aca034332c254ab0e52b3d67d903a7f97cd614f115803269b7ba2e540f1db9
homepage : https://github.com/Diaoul/subliminal/
@@ -16,12 +16,13 @@
- python-dogpile-cache
- python-enzyme
- python-guessit
- - python-pysrt
- python-pytz
- python-rarfile
- python-requests
+ - python-srt
- python-stevedore
build : |
+ %patch -p1 < $pkgfiles/0001-Change-from-pysrt-to-srt.patch
%python3_setup
install : |
%python3_install
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
--- a/pspec_x86_64.xml
+++ b/pspec_x86_64.xml
@@ -3,8 +3,8 @@
<Name>subliminal</Name>
<Homepage>https://github.com/Diaoul/subliminal/</Homepage>
<Packager>
- <Name>Joey Riches</Name>
- <Email>josephriches@gmail.com</Email>
+ <Name>Marcus Mellor</Name>
+ <Email>infinitymdm@gmail.com</Email>
</Packager>
<License>MIT</License>
<PartOf>programming</PartOf>
@@ -94,12 +94,12 @@
</Files>
</Package>
<History>
- <Update release="6">
- <Date>2022-04-12</Date>
+ <Update release="7">
+ <Date>2022-11-11</Date>
<Version>2.1.0</Version>
<Comment>Packaging update</Comment>
- <Name>Joey Riches</Name>
- <Email>josephriches@gmail.com</Email>
+ <Name>Marcus Mellor</Name>
+ <Email>infinitymdm@gmail.com</Email>
</Update>
</History>
</PISI>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 9 2023, 6:50 AM (8 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5806979
Default Alt Text
D13754.id.diff (4 KB)
Attached To
Mode
D13754: Change library from pysrt to srt
Attached
Detach File
Event Timeline
Log In to Comment