XBMC Community Forum
New MythTV add-on using libcmyth - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: PVR Development (/forumdisplay.php?fid=136)
+--- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



- CrashX - 2012-02-09 04:24

tsp42 Wrote:From the stacktrace it looks like the EPG updater it stuck. Do you see the same spamming of the debug log with:
"MythTV cmyth PVR Client: EVENT ID: CMYTH_EVENT_CLOSE, EVENT databuf:"
when you delete epg7.db?

Nope. Any solutions to this problem in the code ?


- Ersan - 2012-02-11 03:11

Is it possible to compile this for ATV2?


- Powderking - 2012-02-13 18:15

I'm reading this post for quite a while now and using your branch almost since I first read about it.
I like it very much and wanted to say thank you very much!

I'm using mythbackend on a different machine so there are some missing features as you listed in your first post.
There's only one thing that's not listed and I'm missing: The ability to group the recordings as in mythfrontend. But I'm sure it's on your todo list as well because I read something in the deep of this thread.

I have one question about compiling. When there's a new commit and I do a "git pull origin master" do I have to do "./bootstrap && ./configure --enable-vdpau=yes && make && make install" or can I omit something to speed up the make command?


- fiveisalive - 2012-02-13 19:48

Powderking Wrote:I'm reading this post for quite a while now and using your branch almost since I first read about it.
I like it very much and wanted to say thank you very much!

I'm using mythbackend on a different machine so there are some missing features as you listed in your first post.
There's only one thing that's not listed and I'm missing: The ability to group the recordings as in mythfrontend. But I'm sure it's on your todo list as well because I read something in the deep of this thread.

I believe that is on tsp's TODO list.

Quote:I have one question about compiling. When there's a new commit and I do a "git pull origin master" do I have to do "./bootstrap && ./configure --enable-vdpau=yes && make && make install" or can I omit something to speed up the make command?

For new commits normally:

Code:
make
make install

is sufficient. If something is changed in automake, that requires re-running configure, it will normally tell you, in that case re-run the configure step


- Powderking - 2012-02-13 22:00

Thanks alot for your reply!

Is it right that running bootstrap isn't necessary anymore?


- fiveisalive - 2012-02-14 00:49

Powderking Wrote:Thanks alot for your reply!

Is it right that running bootstrap isn't necessary anymore?

AFAIK bootstrap normally needs to be done only once (upon your first checkout from github).


- Powderking - 2012-02-14 15:40

Great!
This will speed up updating Smile

Thanks alot!


Mythtv is now forked as Torc - druhboruch - 2012-02-16 02:21

http://www.phoronix.com/scan.php?page=news_item&px=MTA1Nzg

What does it mean for the future of mythtv and xbmc plugin?


git install script for oneiric - sysadm1n - 2012-02-17 05:56

First of all, THANK YOU to everyone at XBMC for such an incredible project!!! I'm especially glad to see the PVR things come together.

I've put together a little one-off script to install it from git that might make things easier for some. It's been tested in Ubuntu 11.10 and Mint 12.

To use it, open a terminal, paste the xbmc-pvr-install.sh text below into a file, then run it as your normal user. For example:
Code:
nano xbmc-pvr-install.sh
sh xbmc-pvr-install.sh

xbmc-pvr-install.sh
Code:
#!/bin/bash
##
## xbmc-pvr-install.sh
##
## AUTHOR: sysadmin
## VERSION: 0.2
## DATE: 2012-02-16
## LICENSE: GPL
## WARRANTY: None
##
CPUS=$(cat /proc/cpuinfo | grep -m 1 "cpu cores" | tr -d "cpu cores\t: ")
JOBS=$(($CPUS+1))
echo
echo "Backing up your XBMC folder..."
TIMESTAMP=$(date +%d%m%y%H%M)
cp -a ~/.xbmc ~/xbmc-$TIMESTAMP
echo "Your XBMC folder has been backed up to ~/xbmc-"$TIMESTAMP
read -p "Press [ENTER] to continue or <CTRL>-<C> to NOT delete your XBMC folder..." null
rm -rf ~/.xbmc
echo
echo "Updating system and installing dependencies..."
echo
sudo add-apt-repository ppa:team-xbmc/unstable
sudo add-apt-repository ppa:pulse-eight/libcec
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install ccache git
sudo apt-get build-dep xbmc -y
echo
echo "Making ~/src directory and downloading XBMC..."
echo
mkdir ~/src
cd ~/src
git clone https://github.com/tsp/xbmc.git
echo
echo "Building XBMC..."
echo
cd xbmc
./bootstrap
./configure
make --jobs=$JOBS
echo
echo "Installing XBMC..."
echo
sudo make install
sync
echo
echo "Making launch script..."
cd ~
echo "XBMC_HOME=/usr/local/share/xbmc /usr/local/bin/xbmc" > xbmc-pvr
chmod +x xbmc-pvr
echo
echo
echo "Done!"
echo "To run it, type ~/xbmc-pvr"

Cheers! Smile


- Powderking - 2012-02-18 18:44

That's great! Thanks alot.

I have merged your script with my attempt to update xbmc.

I wasn't sure how to test if git has updated something. So probably when running not longer than one minute after the last execution it compile's again because it tests if there's a change in the code dir.

Set the working dir to the directory where the source is. Now it should match with sysadm1n's script.

vdpau is the default. For those who don't want it uncomment the line #optConfigParams="". Or run it with -c "" option. The "" are needed because an argument is needed with the -c option.

Set usrName to the user name you run XBMC as. I run it as user xbmc. It's used to backup the user folder.

I prefer a little different place and timestamp. Just change it to your needs.



Code:
#!/bin/bash
##
## update-xbmc
##
## AUTHOR: Powderking
## VERSION: 0.1
## DATE: 2012-02-18
## LICENSE: GPL
## WARRANTY: None
##
set -ue

# Set working directory
WorkDir=~/src/xbmc

# Set default configuration parameter
optConfigParams="--enable-vdpau=yes"
#optConfigParams=""

# XBMC user name
usrName=xbmc

# XBMC users backup destination
bakFolder=~/xbmc-usrdata-backup


############################
# Option argument handling #
############################
     usageHelp="Usage: ${0##*/} [OPTIONS]"
      helpHelp="-h                   Show help"
      initHelp="-d                   Install dependencies"
bootstrapHelp="-b                   Bootstrap"
configureHelp="-c CONFIG_PARAM      Configure with optional configuration parameter, standard: $optConfigParams)"
   installHelp="-i                   Install (using sudo)"
badOptionHelp="Option not recognised"

printHelpAndExit(){
  echo "$usageHelp"
  echo "Update XBMC PVR libcmyth branch"
  echo
  echo "Options:"
#  echo "  $initHelp"
  echo "  $bootstrapHelp"
  echo "  $configureHelp"
  echo "  $installHelp"
  echo "  $helpHelp"
  exit $1
}
printErrorHelpAndExit(){
  echo
  echo "$@"
  echo
  echo
  printHelpAndExit 1
}
optInit=false
optBootstrap=false
optConfig=false
optInstall=false

while getopts "hbc:i" optionName; do            #TODO: Installing dependencies...
#while getopts "hdbc:i" optionName; do            #TODO: Installing dependencies...
  case "$optionName" in
    h)    printHelpAndExit 0;;
    d)    optInit=true;;
    b)    optBootstrap=true;;
    c)    optConfig=true; optConfigParams="$OPTARG";;
    i)    optInstall=true;;
    [?])  printErrorHelpAndExit "$badOptionHelp";;
  esac
done
shift $(($OPTIND - 1))  # get rid of the options
if [ $# -ne 0 ]; then
  printErrorHelpAndExit "$badOptionHelp"
fi


########
# Main #
########
CPUS=$(cat /proc/cpuinfo | grep -m 1 "cpu cores" | tr -d "cpu cores\t: ")
JOBS=$(($CPUS * 2))
TIMESTAMP=$(date +%Y%m%d_%H%M)

[ ! -d "$bakFolder" ] && mkdir "$bakFolder"
[ ! -d "$WorkDir" ] && mkdir -p "$WorkDir"; cd $WorkDir

if [ $optInit == true ]; then
    optBootstrap=true
    echo
    echo "Installing dependencies..."
    echo TODO
fi

echo
echo "Pulling new commits from git..."
git pull origin master

if [[ $(find . -mmin -1 | grep -v ".git" | wc -l) -gt 0 ]]; then
    if [ $optBootstrap == true ]; then
        optConfig=true
        echo
        echo "Bootstraping..."
        ./bootstrap
    fi

    if [ $optConfig == true ]; then
        echo
        echo "Configuring... (Using '$optConfigParams')"
        ./configure "$optConfigParams"
    fi

    echo
    echo "Compiling... (Using '--jobs=$JOBS')"
    make --jobs=$JOBS
    
    if [ $optInstall == true ]; then
            echo
            echo "Backing up XBMC users folder... (/home/"$usrName"/.xbmc => "$bakFolder"/"$usrName"-$TIMESTAMP)"
            cp -a /home/"$usrName"/.xbmc "$bakFolder"/"$usrName"-$TIMESTAMP
        echo
        echo "Installing..."
        sudo make install
    else
        echo
        echo "Comilation ok, use '${0##*/} -i' to install."
    fi
fi

exit 0