mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 01:50:04 -04:00
Update create-database.js
This commit is contained in:
parent
219539b70c
commit
244afb8088
4 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue