[grilo-plugins/wip/hadess/no-empty-titles: 14/15] video-title-parsing: Don't set empty titles



commit bef62d60fecfc869944afcfcc36b7d87a0fcdb11
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Feb 14 17:52:30 2019 +0100

    video-title-parsing: Don't set empty titles
    
    Try not to set empty titles when the only part of the original title
    that could be parsed is the date.

 src/lua-factory/sources/grl-video-title-parsing.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/lua-factory/sources/grl-video-title-parsing.lua 
b/src/lua-factory/sources/grl-video-title-parsing.lua
index 9c790d4..ba71f8b 100644
--- a/src/lua-factory/sources/grl-video-title-parsing.lua
+++ b/src/lua-factory/sources/grl-video-title-parsing.lua
@@ -105,7 +105,7 @@ function parse_as_movie(media)
   local str = clean_title_from_blacklist (media.title)
   for i, parser in ipairs(parsers.movies) do
     title, date = str:match(parser)
-    if title and date then
+    if title and title ~= '' and date and date ~= '' then
       media.title = clean_title(title)
       media.publication_date = date
       return true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]