Kodi Community Forum
I cannot open file in FTP server - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: I cannot open file in FTP server (/showthread.php?tid=172320)



I cannot open file in FTP server - directer - 2013-08-29

Anyone can help me, The main idea: I want to play mp4 file in the FTP server, I do not know i use code in the correct way

Code:
files = ftp.cwd('../Project/XBMC/video/Action')
data = []
ftp.dir(data.append)

print "%d data:" % len(data)

for entry in data:
    print entry
    xbmc.Player().playStream(entry)

ftp.quit()

The Result:
Code:
17:06:59 T:6108  NOTICE: -rw-r--r--    1 30       8         9875425 Aug 28 16:52 Iron Man-By-Chatchawan.MP4
17:06:59 T:3852  NOTICE: DVDPlayer: Opening: -rw-r--r--    1 30       8         9875425 Aug 28 16:52 Iron Man-By-Chatchawan.MP4
17:06:59 T:3852 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
17:06:59 T:8044  NOTICE: Thread CDVDPlayer start, auto delete: false
17:06:59 T:8044  NOTICE: Creating InputStream
17:06:59 T:8044   ERROR: CDVDPlayer::OpenInputStream - error opening [-rw-r--r--    1 30       8         9875425 Aug 28 16:52 Iron Man-By-Chatchawan.MP4]
17:06:59 T:8044  NOTICE: CDVDPlayer::OnExit()
17:06:59 T:8044  NOTICE: CDVDPlayer::OnExit() deleting input stream



RE: I cannot open file in FTP server - sphere - 2013-08-29

If you really want to do that:
You need to feed the player with an URL (e.g. "ftp://foo.bar/path/to/file.mp4"). Atm are feeding it with a ftp file list line "-rw-r--r-- 1 30 8 9875425 Aug 28 16:52 Iron Man-By-Chatchawan.MP4"