Keresés

Hirdetés

Új hozzászólás Aktív témák

  • Celtis

    veterán

    válasz Speederer #649 üzenetére

    Ja bocs, ez volt az egyetlen amit a neten találtam, de ez egy módosított script, ami előhoz egy hibát a tvheadendben. A killer rész törlendő:

    #!/bin/sh
    . /etc/profile
    xmltv_file_location=/storage/.kodi/userdata/addon_data/service.tvheadend42/epggrab/guide.xml
    epg_source=http://epg.gravi.hu/guide.xml.gz #put your personal URL here
    dflag=
    vflag=
    cflag=
    qflag=
    if [ "$#" -lt "1" ] ; then
    # remove existing previously generated guide files
    for file in ${xmltv_file_location} ${xmltv_file_location}.gz
    do
    if [ -f ${file} ];
    then
    rm -f ${file} 2>/dev/null
    fi
    done
    # download latest compressed guide file from server
    wget -qO ${xmltv_file_location}.gz $epg_source

    # uncompress the guide file
    gzip -d ${xmltv_file_location}.gz

    # put the content to the output
    cat $xmltv_file_location

    # alternatively use the following command line:
    # curl -Ls ${epg_source} | gzip -d

    exit 0
    fi
    # special handling if there are several arguments
    for arg
    do
    delim=""
    case "$arg" in
    #translate --gnu-long-options to -g (short options)
    --description) args="${args}-d ";;
    --version) args="${args}-v ";;
    --capabilities) args="${args}-c ";;
    --quiet) args="${args}-q ";;
    #pass through anything else
    *) [[ "${arg:0:1}" == "-" ]] || delim="\""
    args="${args}${delim}${arg}${delim} ";;
    esac
    done
    # reset the positional parameters to the short options
    eval set -- $args
    while getopts "dvcq" option
    do
    case $option in
    d) dflag=1;;
    v) vflag=1;;
    c) cflag=1;;
    q) qflag=1;;
    \?) printf "unknown option: -%s\n" $OPTARG
    printf "Usage: %s: [--description] [--version] [--capabilities] \n" $(basename $0)
    exit 2
    ;;
    esac >&2
    done
    if [ "$dflag" ]
    then
    printf "EPG Grabber for epg.gravi.hu\n"
    fi
    if [ "$vflag" ]
    then
    printf "1.0\n"
    fi
    if [ "$cflag" ]
    then
    printf "baseline\n"
    fi
    if [ "$qflag" ]
    then
    printf ""
    fi
    exit 0

    Tulajdonképpen a második rész a paraméterekkel tök fölösleges.

Új hozzászólás Aktív témák