mirror of
https://github.com/iptv-org/iptv
synced 2025-12-17 02:47:33 -05:00
Update create-database.js
This commit is contained in:
@@ -42,7 +42,7 @@ parser.parseChannelName = function (string) {
|
||||
parser.parseCountryCode = function (filepath) {
|
||||
if (!filepath) return null
|
||||
const basename = file.basename(filepath)
|
||||
const [code] = basename.split('_') || [null]
|
||||
const [_, code] = basename.match(/^([a-z]{2})(_|\.)/) || [null, null]
|
||||
|
||||
return code
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user