2009-03-25, 14:46
Hi,
i wrote a little script to copy DVD content to my server.
My OS is Ubuntu 'hardy'
From Terminal it runs fine. Usying Python 2.5.2
Now i wanted to implent this into xbmc.
So here is the problem:
Poben is not working as expected so the drive doesn't mount.
Also i can't see any DEBUG-Info in XBMC.
It is is something with permissions i think
I want to mount the drive in order to get the DVD-size, so i can
show up a progressbar during copy.
Please help.
i wrote a little script to copy DVD content to my server.
My OS is Ubuntu 'hardy'
From Terminal it runs fine. Usying Python 2.5.2
Now i wanted to implent this into xbmc.
So here is the problem:
Poben is not working as expected so the drive doesn't mount.
Also i can't see any DEBUG-Info in XBMC.
It is is something with permissions i think
I want to mount the drive in order to get the DVD-size, so i can
show up a progressbar during copy.
Please help.
Code:
import os
import sys
import time
import string
import commands
from subprocess import Popen
def iter_files(path):
files = []
for root, dirs, filenames in os.walk(path):
for filename in filenames:
files.append(os.path.join(root, filename))
return files
def get_dir_size(directory):
files = iter_files(directory)
dir_size = 0
for file in files:
dir_size += os.path.getsize(file)
return dir_size
#ismount = commands.getoutput('cat /proc/mounts | grep /cdrom | wc -l')
#if ismount == '0': # not mountet
mdvd = Popen(['mount','/dev/scd0','/cdrom']) #mount dvd <<< MY PROBLEM!!!
retcode = mdvd.wait() #wait for...
print retcode
...