Posts: 63
Joined: Nov 2005
Reputation:
1
How can I use Python to do this?
I have an Archive File that has a DIVX in it.
If I view the file in Filemanger. I can click on the archive. It will open and show me the video file. Then If I click on the video file it will play.
If I am in the Videos Window, I can browse to the archvie. Press the white button and select play from the menu and it will begin playing.
How can I do this in Pythong. I have tried the just using XBMC.Player().play('Q:\\scripts\\'d.rar')
as well as the Execute built in
xbmc.executebuiltin("XBMC.PlayMedia(Q:/scripts/d.rar)")
How can I get this to work. Thanks
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
rar://<urlencodedpathtothearchive>/<pathinsidearchive>
Posts: 63
Joined: Nov 2005
Reputation:
1
#xbmc.executebuiltin("XBMC.PlayMedia(rar://q:/scripts/d.rar/cd-xvid-dvf.avi)")
I still an unable to get it, can someone give an example?
Also I will not always know the path inside the archive is there a way around that?
Posts: 63
Joined: Nov 2005
Reputation:
1
Ok, I got it.
xbmc.executebuiltin("XBMC.PlayMedia(rar://Q%3a%5cscripts%5cd%2erar/cd-xvid-dvf.avi)")
Didn't exactly know what url encoded meant. Pulled this from the log.
Now, The problem is I don't know the name of the file that is contained in the archive. Is there an easy way to play it just specifying the archive.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
well, ask it to queue the directory that should work in theory
Posts: 63
Joined: Nov 2005
Reputation:
1
Is there anyway to apply a password to the url string?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
no passworded archives are not supported
Posts: 63
Joined: Nov 2005
Reputation:
1
The method i am using, if the file is contained in a sub directory, it will only display the subdirectory name (Using the GetMediaLocation from the httpapi) instead of the actual file name. How can I "go deeper" (penetrate further)... the archive file, or is there another / better way to do this.
Also when you say "queue the directory" do you mean the add to the video/audo playlist the folder that the archive file is in (for the archive file "q:\scripts\d.rar" i should add to the playlist "q:\scripts")?
And what is the most recommended way of queuing an entire directory. I am trying many different approaches. Thanks
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
2008-12-17, 22:04
(This post was last modified: 2008-12-17, 22:07 by spiff.)
no. what i mean is that an archive is a directory.
rar://<urlencodedpathtoarchive>/
that should enqueue any files in that directory assuming you use the same piece of code that would play all files in e.g. q:\videos\
to "dig futher" you'd have to do a getdirectory and add additional (probably recursive) logic. you should consider an archive just like any other directory