-channel='' video='' action=''
-path_info="$PATH_INFO"
-path_info="${path_info#/channel/}"
-if [ "$(checkid "${path_info%%/*}")" ]; then
- channel="${path_info%%/*}"
- path_info="${path_info#*/}"
-fi
-if [ "$(checkid "${path_info%%/*}")" ]; then
- video="${path_info%%/*}"
- path_info="${path_info#*/}"
-fi
-action="${path_info}"
-unset path_info
-
-# Channel
-# ID NAME DESCRIPTION LOGO THEME AUTHORS DESCR_CACHE FUTUREUSE
-
-if [ "$channel" -a -f "$chan_db" -a -r "$chan_db" ]; then
- read -r CHANNEL_ID CHANNEL_NAME CHANNEL_DESCRIPTION CHANNEL_LOGO \
- CHANNEL_THEME CHANNEL_AUTHORS CHANNEL_DESCR_CACHE \
- CHANNEL_FUTUREUSE <<-EOF
- $(grep "^${channel} " "${chan_db}")
- EOF
- if [ "$CHANNEL_ID" ]; then
- CHANNEL_NAME="$(UNSTRING "${CHANNEL_NAME}")"
- CHANNEL_DESCRIPTION="$(UNSTRING "$CHANNEL_DESCRIPTION")"
- CHANNEL_AUTHORS="$(UNSTRING "$CHANNEL_AUTHORS")"
- CHANNEL_DESCR_CACHE="$(UNSTRING "$CHANNEL_DESCR_CACHE")"
- vid_db="${_DATA}/${CHANNEL_ID}/videos.db"
- else
- channel=''
- fi
-fi