Page MenuHomeSolus

D13754.id33577.diff
No OneTemporary

D13754.id33577.diff

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
@@ -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
@@ -95,11 +95,124 @@
</Package>
<History>
<Update release="6">
- <Date>2022-04-12</Date>
+ <Date>2022-04-30</Date>
<Version>2.1.0</Version>
- <Comment>Packaging update</Comment>
+ <Comment>Rebuild against python 3.10</Comment>
<Name>Joey Riches</Name>
<Email>josephriches@gmail.com</Email>
</Update>
+ <Update release="5">
+ <Date>2021-08-08</Date>
+ <Version>2.1.0</Version>
+ <Comment>Rebuild against python 3.9</Comment>
+ <Name>Joey Riches</Name>
+ <Email>josephriches@gmail.com</Email>
+ </Update>
+ <Update release="4">
+ <Date>2020-09-17</Date>
+ <Version>2.1.0</Version>
+ <Comment>Update subliminal to 2.1.0
+
+Summary:
+**Summarized changelog:**
+
+- Improve legendastv provider matches
+- Fix video extensions (.mk3d .ogm .ogv)
+- Use new url to search for titles in legendastv provider
+- Fix stevedore incompatibility
+- Add support to webm video extension
+- Make providers easier to be extended and customized
+- Update podnapisi URL
+- Add support to VIP/Donor accounts in legendastv provider
+- Proper handling titles with year / country in legendastv provider
+- Several minor enhancements in legendastv provider
+- Add support for python 3.7 and 3.8
+- Do not discard providers bad zip/rar is downloaded
+- SubsCenter provider removal
+- Fix lxml parsing for Addic7ed provider
+- Support titles with asterics in Addic7ed provider
+- Add support to multi-episode search in Opensubtitles provider
+- Fix multi-episode search in TVSubtitles provider
+- Update to guessit 3
+- Improve archive scanning
+- Add Opensubtitles VIP provider
+- Add country to Movie and Episode
+- Add streaming_service to Video
+- Add info property to Subtitle
+- Do not search for subtitles if all required languages is already present
+- Improve TVDB refiner to support series with comma
+- Add alternative_titles to Video and enhance OMDB refiner to use alternative_titles
+- Only compute video hashes when required
+- Add apikey to OMDB refiner
+- Fix Subtitle validation when unable to guess encoding
+- Add support to rar in Dockerfile
+
+Depends on D9636 D9637 D9638
+
+Signed-off-by: Algent Albrahimi &lt;algent@protonmail.com&gt;
+
+Test Plan:
+- Download a subtitle using CLI:
+```
+$ subliminal download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
+```
+- Donwload a subtitle using my addic7ed account:
+```
+$ subliminal --addic7ed USERNAME PASSWORD download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
+```
+
+Reviewers: #triage_team, JoshStrobl
+
+Reviewed By: #triage_team, JoshStrobl
+
+Subscribers: JoshStrobl
+
+Differential Revision: https://dev.getsol.us/D9639</Comment>
+ <Name>Algent Albrahimi</Name>
+ <Email>algent@protonmail.com</Email>
+ </Update>
+ <Update release="3">
+ <Date>2020-02-04</Date>
+ <Version>2.0.5</Version>
+ <Comment>Rebuild against python 3.7
+
+Signed-off-by: Joey Riches &lt;josephriches@gmail.com&gt;</Comment>
+ <Name>Joey Riches</Name>
+ <Email>josephriches@gmail.com</Email>
+ </Update>
+ <Update release="2">
+ <Date>2018-11-10</Date>
+ <Version>2.0.5</Version>
+ <Comment>Update subliminal to 2.0.5 &amp; switch to python3
+
+Summary:
+- Fix addic7ed provider for some series name
+- Fix existing subtitles detection
+- Improve scoring
+- Add Docker container
+- Add .ogv video extension
+- Fix subscenter
+
+Depends on D4295, D4312, D4313, D4314, D4315, D4316, D4317 and D4318
+
+Signed-off-by: Pierre-Yves &lt;pyu@riseup.net&gt;
+
+Test Plan: Made a test with addic7ed
+
+Reviewers: #triage_team, JoshStrobl
+
+Reviewed By: #triage_team, JoshStrobl
+
+Differential Revision: https://dev.getsol.us/D4319</Comment>
+ <Name>Pierre-Yves</Name>
+ <Email>pyu@riseup.net</Email>
+ </Update>
+ <Update release="1">
+ <Date>2016-10-22</Date>
+ <Version>2.0.3</Version>
+ <Comment>Initial working subliminal</Comment>
+ <Name>Bryan T. Meyers</Name>
+ <Email>bmeyers@datadrake.com</Email>
+ </Update>
</History>
</PISI>
\ No newline at end of file

File Metadata

Mime Type
text/plain
Expires
May 30 2023, 11:14 AM (10 w, 11 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5816113
Default Alt Text
D13754.id33577.diff (7 KB)

Event Timeline