Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-guessit for openSUSE:Factory 
checked in at 2023-02-20 17:46:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-guessit (Old)
 and      /work/SRC/openSUSE:Factory/.python-guessit.new.22824 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-guessit"

Mon Feb 20 17:46:17 2023 rev:22 rq:1066739 version:3.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-guessit/python-guessit.changes    
2023-02-18 17:13:11.391798320 +0100
+++ /work/SRC/openSUSE:Factory/.python-guessit.new.22824/python-guessit.changes 
2023-02-20 17:47:01.863830669 +0100
@@ -1,0 +2,10 @@
+Mon Feb 20 08:45:07 UTC 2023 - Luigi Baldoni <aloi...@gmx.com>
+
+- Update to version 3.7.1
+  Fix:
+  * episode: Ignore absolute_episode guess when SxxExx match is
+    available in filepart
+  + title: Fix title guessing for Show Name/Season XX/episode.mkv
+    directories pattern
+
+-------------------------------------------------------------------

Old:
----
  guessit-3.7.0.tar.gz

New:
----
  guessit-3.7.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-guessit.spec ++++++
--- /var/tmp/diff_new_pack.Fzjgp0/_old  2023-02-20 17:47:03.295838758 +0100
+++ /var/tmp/diff_new_pack.Fzjgp0/_new  2023-02-20 17:47:03.299838781 +0100
@@ -18,7 +18,7 @@
 
 %define skip_python2 1
 Name:           python-guessit
-Version:        3.7.0
+Version:        3.7.1
 Release:        0
 Summary:        A library for guessing information from video files
 License:        LGPL-3.0-only

++++++ guessit-3.7.0.tar.gz -> guessit-3.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/CHANGELOG.md 
new/guessit-3.7.1/CHANGELOG.md
--- old/guessit-3.7.0/CHANGELOG.md      2023-02-18 13:20:37.000000000 +0100
+++ new/guessit-3.7.1/CHANGELOG.md      2023-02-20 09:18:26.000000000 +0100
@@ -3,6 +3,20 @@
 
 <!--next-version-placeholder-->
 
+## v3.7.0 (2023-02-18)
+### Feature
+* **week:** Add week property 
([`8309bf1`](https://github.com/guessit-io/guessit/commit/8309bf14e34e17a871e0f496c27cf431aaba18e1))
+
+### Fix
+* **episode:** Fix invalid episode range when a weak episode is present before 
the match 
([`ff0a327`](https://github.com/guessit-io/guessit/commit/ff0a3271af736f67e7a6a5fd12b92152035ea57b))
+* **expected:** Build output from input string for 
expected_title/expected_group 
([`90cc215`](https://github.com/guessit-io/guessit/commit/90cc2156aafee39ef20c3cb3aaf0e26ddcb83933))
+* **release_group:** Properly extract group name from format "Title (MediaInfo 
Individual) [Group]" 
([`25bd367`](https://github.com/guessit-io/guessit/commit/25bd367032262dc2a0ee06852c21846202413823))
+* **edition:** Improve remastered/restored detection 
([`c3611b9`](https://github.com/guessit-io/guessit/commit/c3611b9b26e7f6c1b6bb2d0e9a708843f3242084))
+* **container:** Add m2ts to container extensions 
([`05cca80`](https://github.com/guessit-io/guessit/commit/05cca806530302733377a278c4bb8c200b6a502c))
+
+### Documentation
+* **contributing:** Update branch name 
([`4af631d`](https://github.com/guessit-io/guessit/commit/4af631df7a7945a7d229919d56c7f4d874750a4a))
+
 ## v3.6.0 (2023-02-18)
 ### Feature
 * **audio_codec:** Detect "DTS:X" (closes #728) 
([`2bdd8f5`](https://github.com/guessit-io/guessit/commit/2bdd8f568a0fa6c5eb97e1f29d5e4d488d86a2aa))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/PKG-INFO new/guessit-3.7.1/PKG-INFO
--- old/guessit-3.7.0/PKG-INFO  2023-02-18 13:20:53.439736000 +0100
+++ new/guessit-3.7.1/PKG-INFO  2023-02-20 09:18:51.579682000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: guessit
-Version: 3.7.0
+Version: 3.7.1
 Summary: GuessIt - a library for guessing information from video filenames.
 Home-page: https://guessit-io.github.io/guessit
 Author: Rémi Alvergnat
 Author-email: toilal....@gmail.com
 License: LGPLv3
-Download-URL: 
https://pypi.python.org/packages/source/g/guessit/guessit-3.7.0.tar.gz
+Download-URL: 
https://pypi.python.org/packages/source/g/guessit/guessit-3.7.1.tar.gz
 Keywords: python library release parser name filename movies series episodes 
animes
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
@@ -79,6 +79,20 @@
 
 <!--next-version-placeholder-->
 
+## v3.7.0 (2023-02-18)
+### Feature
+* **week:** Add week property 
([`8309bf1`](https://github.com/guessit-io/guessit/commit/8309bf14e34e17a871e0f496c27cf431aaba18e1))
+
+### Fix
+* **episode:** Fix invalid episode range when a weak episode is present before 
the match 
([`ff0a327`](https://github.com/guessit-io/guessit/commit/ff0a3271af736f67e7a6a5fd12b92152035ea57b))
+* **expected:** Build output from input string for 
expected_title/expected_group 
([`90cc215`](https://github.com/guessit-io/guessit/commit/90cc2156aafee39ef20c3cb3aaf0e26ddcb83933))
+* **release_group:** Properly extract group name from format "Title (MediaInfo 
Individual) [Group]" 
([`25bd367`](https://github.com/guessit-io/guessit/commit/25bd367032262dc2a0ee06852c21846202413823))
+* **edition:** Improve remastered/restored detection 
([`c3611b9`](https://github.com/guessit-io/guessit/commit/c3611b9b26e7f6c1b6bb2d0e9a708843f3242084))
+* **container:** Add m2ts to container extensions 
([`05cca80`](https://github.com/guessit-io/guessit/commit/05cca806530302733377a278c4bb8c200b6a502c))
+
+### Documentation
+* **contributing:** Update branch name 
([`4af631d`](https://github.com/guessit-io/guessit/commit/4af631df7a7945a7d229919d56c7f4d874750a4a))
+
 ## v3.6.0 (2023-02-18)
 ### Feature
 * **audio_codec:** Detect "DTS:X" (closes #728) 
([`2bdd8f5`](https://github.com/guessit-io/guessit/commit/2bdd8f568a0fa6c5eb97e1f29d5e4d488d86a2aa))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/guessit/__version__.py 
new/guessit-3.7.1/guessit/__version__.py
--- old/guessit-3.7.0/guessit/__version__.py    2023-02-18 13:20:53.000000000 
+0100
+++ new/guessit-3.7.1/guessit/__version__.py    2023-02-20 09:18:51.000000000 
+0100
@@ -4,4 +4,4 @@
 Version module
 """
 # pragma: no cover
-__version__ = '3.7.0'
+__version__ = '3.7.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/guessit/rules/properties/episodes.py 
new/guessit-3.7.1/guessit/rules/properties/episodes.py
--- old/guessit-3.7.0/guessit/rules/properties/episodes.py      2023-02-18 
13:20:37.000000000 +0100
+++ new/guessit-3.7.1/guessit/rules/properties/episodes.py      2023-02-20 
09:18:26.000000000 +0100
@@ -582,17 +582,25 @@
     The matches in the group with higher episode values are renamed to 
absolute_episode.
     """
 
-    consequence = RenameMatch('absolute_episode')
+    consequence = [RenameMatch('absolute_episode'), RemoveMatch]
 
     def when(self, matches, context):  # 
pylint:disable=inconsistent-return-statements
         initiators = {match.initiator for match in matches.named('episode')
                       if len(match.initiator.children.named('episode')) > 1}
         if len(initiators) != 2:
-            ret = []
+            ret = ([], [])
             for filepart in matches.markers.named('path'):
+                sxxexx_episode_matches = matches.range(filepart.start + 1, 
filepart.end,
+                                                       predicate=lambda m: 
m.name == 'episode' and
+                                                                           
'SxxExx' in m.tags)
                 if matches.range(filepart.start + 1, filepart.end, 
predicate=lambda m: m.name == 'episode'):
-                    ret.extend(
-                        matches.starting(filepart.start, predicate=lambda m: 
m.initiator.name == 'weak_episode'))
+                    absolute_episode_candidate = 
matches.starting(filepart.start,
+                                                                  
predicate=lambda
+                                                                      m: 
m.initiator.name == 'weak_episode')
+                    if sxxexx_episode_matches:
+                        ret[1].extend(absolute_episode_candidate)
+                    else:
+                        ret[0].extend(absolute_episode_candidate)
             return ret
 
         initiators = sorted(initiators, key=lambda item: item.end)
@@ -601,9 +609,9 @@
             second_range = matches.named('episode', predicate=lambda m: 
m.initiator == initiators[1])
             if len(first_range) == len(second_range):
                 if second_range[0].value > first_range[0].value:
-                    return second_range
+                    return second_range, []
                 if first_range[0].value > second_range[0].value:
-                    return first_range
+                    return first_range, []
 
 
 class EpisodeNumberSeparatorRange(AbstractSeparatorRange):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/guessit/rules/properties/title.py 
new/guessit-3.7.1/guessit/rules/properties/title.py
--- old/guessit-3.7.0/guessit/rules/properties/title.py 2023-02-18 
13:20:37.000000000 +0100
+++ new/guessit-3.7.1/guessit/rules/properties/title.py 2023-02-20 
09:18:26.000000000 +0100
@@ -142,8 +142,8 @@
             for outside in outside_matches:
                 other_languages.extend(matches.range(outside.start, 
outside.end,
                                                      lambda c_match: 
c_match.name == match.name and
-                                                     c_match not in to_keep and
-                                                     c_match.value not in 
NON_SPECIFIC_LANGUAGES))
+                                                                     c_match 
not in to_keep and
+                                                                     
c_match.value not in NON_SPECIFIC_LANGUAGES))
 
             if not other_languages and (not starting or len(match.raw) <= 3):
                 return True
@@ -163,7 +163,8 @@
             return match.start >= hole.start and match.end <= hole.end
         return True
 
-    def check_titles_in_filepart(self, filepart, matches, context):  # 
pylint:disable=inconsistent-return-statements
+    def check_titles_in_filepart(self, filepart, matches, context,  # 
pylint:disable=inconsistent-return-statements
+                                 additional_ignored=None):
         """
         Find title in filepart (ignoring language)
         """
@@ -171,7 +172,8 @@
         start, end = filepart.span
 
         holes = matches.holes(start, end + 1, formatter=formatters(cleanup, 
reorder_title),
-                              ignore=self.is_ignored,
+                              ignore=self.is_ignored if additional_ignored is 
None else lambda m: self.is_ignored(
+                                  m) or additional_ignored(m),
                               predicate=lambda m: m.value)
 
         holes = self.holes_process(holes, matches)
@@ -247,8 +249,46 @@
                     titles = [hole]
                 return titles, to_remove
 
+    def _serie_name_filepart(self, matches, fileparts):
+        # Try to get show title from subdirectory of a season only directory 
(Show Name/Season 1/episode_title.avi)
+        for index in range(len(fileparts) - 1):
+            if index == 0:
+                continue
+            filepart = fileparts[index]
+            filepart_matches = [m for m in matches.range(filepart.start, 
filepart.end) if not m.private]
+            if len(filepart_matches) == 1 and filepart_matches[0].name == 
'season' and \
+                    (filepart_matches[0].span == filepart.span or
+                     filepart_matches[0].parent and 
filepart_matches[0].parent.span == filepart.span):
+                # Filepath match season match exactly
+                return fileparts[index + 1]
+        return None
+
+    def _serie_name_filepart_match(self, matches, context, 
serie_name_filepart, to_append, to_remove):
+        def serie_name_filepart_ignored(match):
+            for tag in match.tags:
+                if tag == 'weak' or tag.startswith('weak-'):
+                    return True
+            return False
+
+        titles = self.check_titles_in_filepart(serie_name_filepart, matches, 
context, serie_name_filepart_ignored)
+        if titles:
+            titles, to_remove_c = titles
+            if len(titles) == 1:
+                to_append.extend(titles)
+                to_remove.extend(to_remove_c)
+                return titles[0]
+        return None
+
+    def _year_fileparts(self, matches, fileparts):
+        year_fileparts = []
+        for filepart in fileparts:
+            year_match = matches.range(filepart.start, filepart.end, lambda 
match: match.name == 'year', 0)
+            if year_match:
+                year_fileparts.append(filepart)
+        return year_fileparts
+
     def when(self, matches, context):
-        ret = []
+        to_append = []
         to_remove = []
 
         if matches.named(self.match_name, lambda match: 'expected' in 
match.tags):
@@ -257,36 +297,43 @@
         fileparts = [filepart for filepart in 
list(marker_sorted(matches.markers.named('path'), matches))
                      if not self.filepart_filter or 
self.filepart_filter(filepart, matches)]
 
-        # Priorize fileparts containing the year
-        years_fileparts = []
-        for filepart in fileparts:
-            year_match = matches.range(filepart.start, filepart.end, lambda 
match: match.name == 'year', 0)
-            if year_match:
-                years_fileparts.append(filepart)
+        serie_name_filepart = self._serie_name_filepart(matches, fileparts)
+
+        serie_name_filepath_match = None
+        if serie_name_filepart:
+            serie_name_filepath_match = 
self._serie_name_filepart_match(matches, context, serie_name_filepart,
+                                                                        
to_append, to_remove)
+
+        # Force inclusion of fileparts containing the year
+        year_fileparts = self._year_fileparts(matches, fileparts)
 
         for filepart in fileparts:
             try:
-                years_fileparts.remove(filepart)
+                year_fileparts.remove(filepart)
             except ValueError:
                 pass
             titles = self.check_titles_in_filepart(filepart, matches, context)
             if titles:
                 titles, to_remove_c = titles
-                ret.extend(titles)
+                if serie_name_filepath_match:
+                    for title_match in titles:
+                        if title_match.value != 
serie_name_filepath_match.value:
+                            title_match.name = 'episode_title'
+                to_append.extend(titles)
                 to_remove.extend(to_remove_c)
                 break
 
         # Add title match in all fileparts containing the year.
-        for filepart in years_fileparts:
+        for filepart in year_fileparts:
             titles = self.check_titles_in_filepart(filepart, matches, context)
             if titles:
                 # pylint:disable=unbalanced-tuple-unpacking
                 titles, to_remove_c = titles
-                ret.extend(titles)
+                to_append.extend(titles)
                 to_remove.extend(to_remove_c)
 
-        if ret or to_remove:
-            return ret, to_remove
+        if to_append or to_remove:
+            return to_append, to_remove
         return False
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/guessit/test/episodes.yml 
new/guessit-3.7.1/guessit/test/episodes.yml
--- old/guessit-3.7.0/guessit/test/episodes.yml 2023-02-18 13:20:37.000000000 
+0100
+++ new/guessit-3.7.1/guessit/test/episodes.yml 2023-02-20 09:18:26.000000000 
+0100
@@ -4062,8 +4062,7 @@
   type: episode
 
 ? 165.Show Name.s08e014
-: absolute_episode: 165
-  title: Show Name
+: title: 165 Show Name
   season: 8
   episode: 14
   type: episode
@@ -4752,3 +4751,22 @@
   video_codec: H.264
   release_group: NOGRP
   type: episode
+
+? /mydatapool/mydata/Videos/Shows/C/Caprica (2008)/Season 
1/Apotheosis_1920x1080.mp4
+: title: Caprica
+  year: 2008
+  season: 1
+  episode_title: Apotheosis
+  screen_size: 1080p
+  container: mp4
+  type: episode
+
+? 4400.S01E01.1080p.WEB.H264-NOGRP
+: title: '4400'
+  season: 1
+  episode: 1
+  screen_size: 1080p
+  source: Web
+  video_codec: H.264
+  release_group: NOGRP
+  type: episode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/guessit/test/rules/title.yml 
new/guessit-3.7.1/guessit/test/rules/title.yml
--- old/guessit-3.7.0/guessit/test/rules/title.yml      2023-02-18 
13:20:37.000000000 +0100
+++ new/guessit-3.7.1/guessit/test/rules/title.yml      2023-02-20 
09:18:26.000000000 +0100
@@ -41,3 +41,8 @@
   episode_title: This E.P.T.I.T.L.E has dots
   type: episode
 
+? /mydatapool/mydata/Videos/Shows/C/Caprica/Season 1/Apotheosis_1920x1080.mp4
+: title: Caprica
+  episode_title: Apotheosis
+  season: 1
+  type: episode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guessit-3.7.0/guessit.egg-info/PKG-INFO 
new/guessit-3.7.1/guessit.egg-info/PKG-INFO
--- old/guessit-3.7.0/guessit.egg-info/PKG-INFO 2023-02-18 13:20:53.000000000 
+0100
+++ new/guessit-3.7.1/guessit.egg-info/PKG-INFO 2023-02-20 09:18:51.000000000 
+0100
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: guessit
-Version: 3.7.0
+Version: 3.7.1
 Summary: GuessIt - a library for guessing information from video filenames.
 Home-page: https://guessit-io.github.io/guessit
 Author: Rémi Alvergnat
 Author-email: toilal....@gmail.com
 License: LGPLv3
-Download-URL: 
https://pypi.python.org/packages/source/g/guessit/guessit-3.7.0.tar.gz
+Download-URL: 
https://pypi.python.org/packages/source/g/guessit/guessit-3.7.1.tar.gz
 Keywords: python library release parser name filename movies series episodes 
animes
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
@@ -79,6 +79,20 @@
 
 <!--next-version-placeholder-->
 
+## v3.7.0 (2023-02-18)
+### Feature
+* **week:** Add week property 
([`8309bf1`](https://github.com/guessit-io/guessit/commit/8309bf14e34e17a871e0f496c27cf431aaba18e1))
+
+### Fix
+* **episode:** Fix invalid episode range when a weak episode is present before 
the match 
([`ff0a327`](https://github.com/guessit-io/guessit/commit/ff0a3271af736f67e7a6a5fd12b92152035ea57b))
+* **expected:** Build output from input string for 
expected_title/expected_group 
([`90cc215`](https://github.com/guessit-io/guessit/commit/90cc2156aafee39ef20c3cb3aaf0e26ddcb83933))
+* **release_group:** Properly extract group name from format "Title (MediaInfo 
Individual) [Group]" 
([`25bd367`](https://github.com/guessit-io/guessit/commit/25bd367032262dc2a0ee06852c21846202413823))
+* **edition:** Improve remastered/restored detection 
([`c3611b9`](https://github.com/guessit-io/guessit/commit/c3611b9b26e7f6c1b6bb2d0e9a708843f3242084))
+* **container:** Add m2ts to container extensions 
([`05cca80`](https://github.com/guessit-io/guessit/commit/05cca806530302733377a278c4bb8c200b6a502c))
+
+### Documentation
+* **contributing:** Update branch name 
([`4af631d`](https://github.com/guessit-io/guessit/commit/4af631df7a7945a7d229919d56c7f4d874750a4a))
+
 ## v3.6.0 (2023-02-18)
 ### Feature
 * **audio_codec:** Detect "DTS:X" (closes #728) 
([`2bdd8f5`](https://github.com/guessit-io/guessit/commit/2bdd8f568a0fa6c5eb97e1f29d5e4d488d86a2aa))

Reply via email to