Skip to content

Commit

Permalink
频道映射忽略大小写
Browse files Browse the repository at this point in the history
  • Loading branch information
taksssss committed Aug 30, 2024
1 parent 88b48b1 commit e84abca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions epg/public.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ function cleanChannelName($channel, $t2s = false) {
return preg_replace($pattern, $replace, $channel);
}
} else {
// 检查是否为一对一映射或多对一映射,忽略所有空格
// 检查是否为一对一映射或多对一映射,忽略所有空格和大小写
$search = str_replace(' ', '', $search);
$channelNoSpaces = str_replace(' ', '', $channel);
$channels = strpos($search, ',') !== false ? explode(',', trim($search, '[]')) : [$search];
foreach ($channels as $singleChannel) {
if ($channelNoSpaces === str_replace(' ', '', trim($singleChannel))) {
if (strcasecmp($channelNoSpaces, str_replace(' ', '', trim($singleChannel))) === 0) {
return $replace;
}}}}
// 默认不进行繁简转换
Expand Down

0 comments on commit e84abca

Please sign in to comment.