| 1 | cfg={}
|
|---|
| 2 |
|
|---|
| 3 | -- multicast interface for SSDP exchange, 'eth0', 'br0', 'br-lan' for example
|
|---|
| 4 | cfg.ssdp_interface='any'
|
|---|
| 5 |
|
|---|
| 6 | -- 'cfg.ssdp_loop' enables multicast loop (if player and server in one host)
|
|---|
| 7 | cfg.ssdp_loop=0
|
|---|
| 8 |
|
|---|
| 9 | -- SSDP announcement interval
|
|---|
| 10 | cfg.ssdp_notify_interval=15
|
|---|
| 11 |
|
|---|
| 12 | -- SSDP announcement age
|
|---|
| 13 | cfg.ssdp_max_age=1800
|
|---|
| 14 |
|
|---|
| 15 | -- HTTP port for incoming connections
|
|---|
| 16 | cfg.http_port=4044
|
|---|
| 17 |
|
|---|
| 18 | -- syslog facility (syslog,local0-local7)
|
|---|
| 19 | cfg.log_facility='local0'
|
|---|
| 20 |
|
|---|
| 21 | -- 'cfg.daemon' detach server from terminal
|
|---|
| 22 | cfg.daemon=true
|
|---|
| 23 |
|
|---|
| 24 | -- silent mode - no logs, no pid file
|
|---|
| 25 | cfg.embedded=true
|
|---|
| 26 |
|
|---|
| 27 | -- 'cfg.debug' enables SSDP debug output to stdout (if cfg.daemon=false)
|
|---|
| 28 | -- 0-off, 1-basic, 2-messages
|
|---|
| 29 | cfg.debug=0
|
|---|
| 30 |
|
|---|
| 31 | -- external 'udpxy' url for multicast playlists (udp://@...)
|
|---|
| 32 | --cfg.udpxy_url='http://192.168.1.1:4022'
|
|---|
| 33 |
|
|---|
| 34 | -- downstream interface for builtin multicast proxy (comment 'cfg.udpxy_url' for processing 'udp://@...' playlists)
|
|---|
| 35 | cfg.mcast_interface='eth0'
|
|---|
| 36 |
|
|---|
| 37 | -- 'cfg.proxy' enables proxy for injection DLNA headers to stream
|
|---|
| 38 | -- 0-off, 1-radio, 2-radio/TV
|
|---|
| 39 | cfg.proxy=0
|
|---|
| 40 |
|
|---|
| 41 | -- User-Agent for proxy
|
|---|
| 42 | cfg.user_agent='Mozilla/5.0'
|
|---|
| 43 |
|
|---|
| 44 | -- I/O timeout
|
|---|
| 45 | cfg.http_timeout=30
|
|---|
| 46 |
|
|---|
| 47 | -- enables UPnP/DLNA notify when reload playlist
|
|---|
| 48 | cfg.dlna_notify=true
|
|---|
| 49 |
|
|---|
| 50 | -- UPnP/DLNA subscribe ttl
|
|---|
| 51 | cfg.dlna_subscribe_ttl=1800
|
|---|
| 52 |
|
|---|
| 53 | -- group by 'group-title'
|
|---|
| 54 | cfg.group=true
|
|---|
| 55 |
|
|---|
| 56 | -- sort files
|
|---|
| 57 | cfg.sort_files=true
|
|---|
| 58 |
|
|---|
| 59 | -- Device name
|
|---|
| 60 | cfg.name=io.popen("uname -n"):read("*l")..'-xupnpd'
|
|---|
| 61 |
|
|---|
| 62 | -- static device UUID, '60bd2fb3-dabe-cb14-c766-0e319b54c29a' for example or nil
|
|---|
| 63 | cfg.uuid=''
|
|---|
| 64 |
|
|---|
| 65 | -- max url cache size
|
|---|
| 66 | cfg.cache_size=8
|
|---|
| 67 |
|
|---|
| 68 | -- url cache item ttl (sec)
|
|---|
| 69 | cfg.cache_ttl=900
|
|---|
| 70 |
|
|---|
| 71 | -- default mime type (mpeg, mpeg_ts, mpeg1, mpeg2, ts, ...)
|
|---|
| 72 | cfg.default_mime_type='mpeg_ts'
|
|---|
| 73 |
|
|---|
| 74 | -- feeds update interval (seconds, 0 - disabled)
|
|---|
| 75 | cfg.feeds_update_interval=3600
|
|---|
| 76 | cfg.playlists_update_interval=60
|
|---|
| 77 |
|
|---|
| 78 | -- playlist (m3u file path or path with alias
|
|---|
| 79 | playlist=
|
|---|
| 80 | {
|
|---|
| 81 | -- { './playlists/mozhay.m3u', 'Mozhay.tv' },
|
|---|
| 82 | -- { './localmedia', 'Local Media Files' }
|
|---|
| 83 | -- { './private', 'Private Media Files', '127.0.0.1;192.168.1.1' } -- only for 127.0.0.1 and 192.168.1.1
|
|---|
| 84 | -- { '/media/hdd/movie', 'Aufnahmen' }
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | -- feeds list (plugin, feed name, feed type)
|
|---|
| 88 | feeds=
|
|---|
| 89 | {
|
|---|
| 90 | { 'vimeo', 'channel/hd', 'Vimeo HD Channel' },
|
|---|
| 91 | { 'vimeo', 'channel/hdxs', 'Vimeo Xtreme sports' },
|
|---|
| 92 | { 'vimeo', 'channel/mtb', 'Vimeo MTB Channel' },
|
|---|
| 93 | -- { 'youtube', 'channel/top_rated', 'YouTube Top Rated' },
|
|---|
| 94 | -- { 'youtube', 'Drift0r', 'Drift0r' },
|
|---|
| 95 | -- { 'youtube', 'XboxAhoy', 'XboxAhoy' },
|
|---|
| 96 | -- { 'ag', 'videos', 'AG - New' },
|
|---|
| 97 | -- { 'ivi', 'new', 'IVI - New' },
|
|---|
| 98 | -- { 'gametrailers', 'ps3', 'GT - PS3' },
|
|---|
| 99 | -- { 'giantbomb', 'all', 'GiantBomb - All' },
|
|---|
| 100 | -- { 'dreambox', 'http://192.168.0.1:8001/','Dreambox1' },
|
|---|
| 101 | }
|
|---|
| 102 |
|
|---|
| 103 | -- log ident, pid file end www root
|
|---|
| 104 | cfg.version='1.033'
|
|---|
| 105 | cfg.log_ident=arg[1] or 'xupnpd'
|
|---|
| 106 | cfg.pid_file='/var/run/'..cfg.log_ident..'.pid'
|
|---|
| 107 | cfg.www_root='./www/'
|
|---|
| 108 | cfg.tmp_path='/tmp/'
|
|---|
| 109 | cfg.plugin_path='./plugins/'
|
|---|
| 110 | cfg.config_path='./config/'
|
|---|
| 111 | cfg.playlists_path='./playlists/'
|
|---|
| 112 | --cfg.feeds_path='/tmp/xupnpd-feeds/'
|
|---|
| 113 | cfg.ui_path='./ui/'
|
|---|
| 114 | cfg.drive='' -- reload playlists only if drive state=active/idle, example: cfg.drive='/dev/sda'
|
|---|
| 115 | cfg.profiles='./profiles/' -- device profiles feature
|
|---|
| 116 |
|
|---|
| 117 | dofile('xupnpd_main.lua')
|
|---|