httpapi calls OK with error

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
BigBellyBilly Offline
Skilled Python Coder
Posts: 900
Joined: Feb 2005
Reputation: 2
Location: UK
Post: #1
I've started to use more httpai calls inplace of SMB calls (seems more reliable and get around a 32 file list_path that smbLib.py has) but I've noticed that FileCopy() report an error and then response OK

Code:
DEBUG: xbmcHttpShim starts
DEBUG: HttpApi Start command: FileCopy  paras: FileCopy; smb://destpath//myfile.conf;C:\localpath\myfile.conf
ERROR: XFILE::CFile::Delete - Error deleting file C:\localpath\myfile.conf
NOTICE:         httpapi response=<li>OK

(obviously the paths above have been amended for the purpose of showing an example)

It might just be that the FileCopy() is attempting to delete the "copy-to" local file before the copy? unnecessary msg or something else going on ?

Second question:
the GetDirectory() accepts a mask of "*" or eg. ".mp3" but it doesn't seem to work with any other file masks. eg "somename*2090304.dat" Is that not supported (it would be really handy) or a bug ?

cheers
BBB

My Addons (myTV, T3CH Upgrader, DVDProfiler, BBCPodRadio, Comics, Football, GoogleReader, reeplay.it, Metacritic, Phonebin, FileViewer,SVN Repo Installer (contributor)) available at Box.net
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #2
FileCopy() also works for fetching http:// urls directly to smb. but there is no progressbar.

can't explain the error

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
BigBellyBilly Offline
Skilled Python Coder
Posts: 900
Joined: Feb 2005
Reputation: 2
Location: UK
Post: #3
builtin progressbar, nice idea.
I'm using FileCopy to fetch from a smb://path to xbmc and it works fine, but not matter what I tried I couldnt get rid of the ERROR msg.

Do you have any idea about the filemask when using getDirectory() ?
Seems just to work for file exts or * but not a filename with a mask.

ta.

My Addons (myTV, T3CH Upgrader, DVDProfiler, BBCPodRadio, Comics, Football, GoogleReader, reeplay.it, Metacritic, Phonebin, FileViewer,SVN Repo Installer (contributor)) available at Box.net
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #4
no, but i do know they are supported in plugin settings. so maybe trac it.

<setting id="amt_db_path" type="files" source="local" mask="AMT.db" label="30160" default="special://profile/script_data/Apple Movie Trailers/AMT.db" />

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
BigBellyBilly Offline
Skilled Python Coder
Posts: 900
Joined: Feb 2005
Reputation: 2
Location: UK
Post: #5
trac. ok, once i figure that out, not done one before.
(thing is with new stuff , as recently highlighted by your own SVN Repo Installer, that new and/or fix stuff takes its time before it becomes widespread enough in the installed user base. - maybe a standardised method to check for minimum build age is in order - just an idea)

but speaking of settings.... you recently mentioned , if you got time, that you'd look into porting the Plugin settings facility to Scripts - had chance ?

My Addons (myTV, T3CH Upgrader, DVDProfiler, BBCPodRadio, Comics, Football, GoogleReader, reeplay.it, Metacritic, Phonebin, FileViewer,SVN Repo Installer (contributor)) available at Box.net
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #6
not yet, would be nice to have though if any of the team scripters want to look into it. post here so i don't duplicate work if i get a chance to look into it.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote