m3uprovider

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright © 2024 Alexandre Pires

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load added in v0.0.11

func Load(config PlaylistConfig) (*m3uparser.M3UPlaylist, error)

func LoadFromFile added in v0.0.11

func LoadFromFile(path string) (*m3uparser.M3UPlaylist, error)

func NewProvider

func NewProvider(config ProviderConfig) types.M3UProvider

Types

type OverrideEntry added in v0.0.11

type OverrideEntry struct {
	ChannelName      string            `json:"name,omitempty"`
	URL              string            `json:"url,omitempty"`
	Headers          map[string]string `json:"headers,omitempty"`
	Disabled         bool              `json:"disabled,omitempty"`
	HttpProxy        string            `json:"http_proxy,omitempty"`
	ForceKodiHeaders bool              `json:"kodi,omitempty"`
}

type PlaylistConfig added in v0.0.11

type PlaylistConfig struct {
	Providers         map[string]ProviderConfig `json:"providers"`
	ProvidersPriority []string                  `json:"providers_priority,omitempty"`
	ChannelOrder      []string                  `json:"channel_order,omitempty"`
	Overrides         map[string]OverrideEntry  `json:"overrides,omitempty"`
}

type ProviderConfig added in v0.0.11

type ProviderConfig struct {
	Provider string          `json:"provider"`
	Config   json.RawMessage `json:"config"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL