PDA

View Full Version : Plugin Debug - help needed


sansat
2009-09-17, 00:04
I am getting an error while playing mp3 in a plugin I am trying to write:

source of mp3

http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3


This is working from internet and prompts for download, but when I am trying to play it thru xbmc- it gives error

xbmc log


16:46:42 T:2640 M:1425264640 NOTICE: DVDPlayer: Opening: http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3
16:46:42 T:2640 M:1425252352 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
16:46:42 T:1256 M:1425248256 DEBUG: thread start, auto delete: 1
16:46:42 T:2676 M:1425231872 DEBUG: thread start, auto delete: 0
16:46:42 T:2676 M:1425223680 NOTICE: Creating InputStream
16:46:42 T:2080 M:1422241792 DEBUG: Thread 2080 terminating (autodelete)
16:46:42 T:2676 M:1409466368 DEBUG: CFileCache::Open - opening <songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3> using cache
16:46:42 T:2676 M:1409462272 DEBUG: FileCurl::Open(039F6B60) http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3
16:46:42 T:2676 M:1409343488 DEBUG: XFILE::CFileCurl::CReadState::FillBuffer: curl failed with code 22
16:46:42 T:2676 M:1409343488 ERROR: CFileCurl::CReadState::Open, didn't get any data from stream.
16:46:42 T:2676 M:1409343488 DEBUG: FileCurl::Close(039F6B60) http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3
16:46:42 T:2676 M:1409343488 ERROR: XFILE::CFileCache::Open - failed to open source <http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3>
16:46:42 T:2676 M:1425100800 ERROR: CDVDPlayer::OpenInputStream - error opening [http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3]
16:46:42 T:2676 M:1425100800 NOTICE: CDVDPlayer::OnExit()
16:46:42 T:2676 M:1425100800 NOTICE: CDVDPlayer::OnExit() deleting input stream
16:46:42 T:2676 M:1425100800 DEBUG: Thread 2676 terminating
16:46:42 T:2640 M:1425084416 DEBUG: CApplication::OnPlayBackStopped - Playback was stopped
16:46:42 T:1256 M:1425145856 DEBUG: Thread 1256 terminating (autodelete)
16:46:42 T:2640 M:1425149952 NOTICE: CDVDPlayer::CloseFile()
16:46:42 T:2640 M:1425149952 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
16:46:42 T:2640 M:1425149952 NOTICE: DVDPlayer: waiting for threads to exit
16:46:42 T:2640 M:1425145856 NOTICE: DVDPlayer: finished waiting
16:46:46 T:2640 M:1425383424 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmc/system/ImageLib.dll)
16:46:46 T:2640 M:1425383424 DEBUG: Win32DllLoader::Unload ImageLib.dll
16:46:46 T:2640 M:1425383424 DEBUG: FreeLibrary(MSVCR71.dll) -> 01779E38
16:46:46 T:2640 M:1425383424 DEBUG: FreeLibrary(MSVCP71.dll) -> 0177B3B8
16:46:46 T:2640 M:1425383424 DEBUG: Win32DllLoader::Unload MSVCP71.dll
16:46:46 T:2640 M:1425383424 DEBUG: FreeLibrary(MSVCR71.dll) -> 01779E38
16:47:13 T:2640 M:1426272256 INFO: XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://download.gigahost123.com (easy=020F0048, multi=06061948)
16:47:13 T:2640 M:1426305024 DEBUG: SDLKeyboard: scancode: 72, sym: 273, unicode: 0, modifier: 0
16:47:13 T:2640 M:1426305024 DEBUG: CApplication::OnKey: 61478 pressed, action is 3
16:47:17 T:2640 M:1426276352 NOTICE: Storing total System Uptime
16:47:17 T:2640 M:1426276352 NOTICE: Saving settings
16:47:17 T:2640 M:1426198528 NOTICE: stop all


Code used

import urllib2,urllib,re

url='http://www.apunkabollywood.net/browser/download/get/5373/Laadla - 01 - Ladki Hai Kya (ApunKaBollywood.com).html'

req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
fmw11=re.compile('<H1><a href="http://download.apunkabollywood.com/songs/Audio/indian/movies/(.+?)" >Free User Click Here To Download</a></h1>').findall(link)
print fmw11
for url in fmw11:
url = 'http://download.gigahost123.com/songs/Audio/indian/movies/'+url
print url
#addLink('Play '+name,url,'')




Please let me know if anyone can help in finding out the reason for mp3 not playing

thanks

stacked
2009-09-17, 00:50
Replace space with %20.

url.replace(' ','%20')

sansat
2009-09-17, 04:19
thanks for your reply..

I am not having issue in the code, as it gives me the correct result which is
shown below and when I put link in browser it gives me the prompt to download the mp3 so the link is correct right ?


http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3


But its not playing the video when I hit play in xbmc , it gives below error in log


16:46:42 T:2676 M:1409466368 DEBUG: CFileCache::Open - opening <songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3> using cache
16:46:42 T:2676 M:1409462272 DEBUG: FileCurl::Open(039F6B60) http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3
16:46:42 T:2676 M:1409343488 DEBUG: XFILE::CFileCurl::CReadState::FillBuffer: curl failed with code 22
16:46:42 T:2676 M:1409343488 ERROR: CFileCurl::CReadState::Open, didn't get any data from stream.
16:46:42 T:2676 M:1409343488 DEBUG: FileCurl::Close(039F6B60) http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3
16:46:42 T:2676 M:1409343488 ERROR: XFILE::CFileCache::Open - failed to open source <http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3>
16:46:42 T:2676 M:1425100800 ERROR: CDVDPlayer::OpenInputStream - error opening [http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3]
16:46:42 T:2676 M:1425100800 NOTICE: CDVDPlayer::OnExit()
16:46:42 T:2676 M:1425100800 NOTICE: CDVDPlayer::OnExit() deleting input stream
16:46:42 T:2676 M:1425100800 DEBUG: Thread 2676 terminating




Please let me know..

sansat
2009-09-17, 04:26
I think I got what your are saying...

Will try it out and let u know

thanks

sansat
2009-09-17, 04:31
Thanks Stacked, it worked.

rwparris2
2009-09-17, 05:10
It would probably be wise to use urllib.quote here, since it will replace other anomalies in your urls.

>>> import urllib
>>> url = 'http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01 Laadla - 01 - Ladki Hai Kya (Papuyaar.com) .mp3'
>>> url = urllib.quote(url, safe="%/:=&?~#+!$,;'@()*[]")
>>> url
'http://download.gigahost123.com/songs/Audio/indian/movies/Laadla/01%20Laadla%20-%2001%20-%20Ladki%20Hai%20Kya%20(Papuyaar.com)%20.mp3'

sansat
2009-09-17, 17:05
Thanks,

I will make that change..