Skip to content
/ XMLTV Public
forked from Rubenfer/XMLTV

Use EPG (XMLTV) files in your project

License

Notifications You must be signed in to change notification settings

alexqzd/XMLTV

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMLTV

XMLTV is a Swift package which allows you to parse XML files using the EPG XMLTV structure.

Usage

Add XMLTV to your project using Swift Package Manager.

XMLTV provides two structs representing channels and programs.

public struct TVChannel {
    public let id: String
    public let name: String?
    public let url: String?
    public let icon: String?
}

public struct TVProgram {
    public let start: Date?
    public let stop: Date?
    public let channel: TVChannel
    public let title: String?
    public let description: String?
    public let credits: [String:String]
    public let date: String?
    public let categories: [String]
    public let country: String?
    public let episode: String?
    public let icon: String?
    public let rating: String?
}

To parse files, you need to create an XMLTV object using the file data. Then you can use getChannels() -> [TVChannel] and getPrograms(channel:) -> [TVProgram] to get the information.

About

Use EPG (XMLTV) files in your project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%