mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 18:10:04 -04:00
wip
This commit is contained in:
parent
109deb476d
commit
bad3eddf9d
25 changed files with 453 additions and 447 deletions
|
@ -2,12 +2,6 @@ const api = require('../core/api')
|
|||
const _ = require('lodash')
|
||||
|
||||
module.exports = async function (streams = []) {
|
||||
streams = _.orderBy(
|
||||
streams,
|
||||
['channel.name', 'status.level', 'resolution.height'],
|
||||
['asc', 'asc', 'desc']
|
||||
)
|
||||
streams = _.uniqBy(streams, s => s.channel_id || _.uniqueId())
|
||||
const output = []
|
||||
await api.categories.load()
|
||||
const categories = await api.categories.all()
|
||||
|
@ -17,11 +11,7 @@ module.exports = async function (streams = []) {
|
|||
}
|
||||
|
||||
let items = _.filter(streams, s => !s.categories.length)
|
||||
items = items.map(item => {
|
||||
item.group_title = 'Other'
|
||||
return item
|
||||
})
|
||||
output.push({ id: 'other', items })
|
||||
output.push({ id: 'undefined', items })
|
||||
|
||||
return output
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue