Update scripts

This commit is contained in:
freearhey committed 2023-10-02 06:31:57 +03:00
1 parent b7214db4fb
commit ca254a6df0
37 files changed
+1091 -915

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import { DateTime, Collection } from '@freearhey/core'
import { generateXMLTV } from 'epg-grabber'
type XMLTVProps = {
channels: Collection
programs: Collection
date: DateTime
}
export class XMLTV {
channels: Collection
programs: Collection
date: DateTime
constructor({ channels, programs, date }: XMLTVProps) {
this.channels = channels
this.programs = programs
this.date = date
}
toString() {
return generateXMLTV({
channels: this.channels.all(),
programs: this.programs.all(),
date: this.date.toJSON()
})
}
}