mirror of
https://github.com/iptv-org/iptv
synced 2026-10-22 11:06:31 -04:00
Update create-database.js
This commit is contained in:
1 parent
f59c76f901
commit
df6eaaf19a
4 files changed
+7
-2
No files matched your search
@@ -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