Skip to content

Commit c237299

Browse files
author
Hjalti Jakobsson
committed
Fixing small bug when searching for shows starting with "The"
1 parent 129878b commit c237299

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/plex/plex_library.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ def show_episodes(show)
8080
end
8181
end
8282

83-
def find_show(title)
84-
splitted = title.split(" ").join("|")
83+
def find_show(title)
84+
title.gsub!(/^The\s+/, "")
85+
splitted = title.split(" ").join("|")
8586
shows = all_shows
8687
shows.detect {|s| s.title.match(/#{splitted}/i)}
8788
end

0 commit comments

Comments
 (0)