So I seem to have found a problem where the crunchyroll addon by maruchan works on some systems, but not the atv2. The script downloads, preps and creates a formatted subtitle file that is later used by the video player.
The segment of code that opens the file is:
subfile = open('special://temp/crunchy_'+mediaid+'.ass', 'w')
Followed by some completion lines:
subfile.write(formattedSubs.encode('utf-8'))
subfile.close()
On the ATV2 this process breaks, and no files are written. If I modify the first line to:
subfile = open('/var/mobile/Library/Preferences/XBMC/temp/crunchy_'+mediaid+'.ass', 'w')
It works properly. I verified that the directory listed above is the one the system wants to use by doing a translate of special://temp and printing the result. (thats how I got the directory in the first place) So this isn't a permissions issue. Checked and everything is using user mobile and write is allowed.
Any idea what is going on with opening that file using special://temp?
The interesting thing is that later on it has to open the previously created file to connect the subtitles to the video. Of course it works just fine with the original naming structure, so I am confused.
xbmc.Player().setSubtitles('special://temp/crunchy_'+mediaid+'.ass')
There are no errors listed in xbmc.log (with or without debug logging turned on) so I am not sure what to do.
Any help would be greatly appreciated
[AppleTV2] Cannot open file using open('special://temp')
tarjan
Junior Member Posts: 29 Joined: Jun 2011 Reputation: 0 |
2011-07-20 15:26
Post: #1
|
| find quote |
amet
I wave my private parts at your aunties! Joined: Jul 2009 Reputation: 18 Location: Novi Sad / Dubai |
2011-07-20 15:28
Post: #2
Code: import xbmcAlways read the XBMC_Online_Manual,Frequently_Asked_Questions and search the forum before posting. For troubleshooting and bug reporting use -> Log_file. |
| find quote |
tarjan
Junior Member Posts: 29 Joined: Jun 2011 Reputation: 0 |
2011-07-20 16:20
Post: #3
Works perfectly! I'm guessing this will work on all platforms and will ask to have the addon updated to include this version of the open.
Thanks. |
| find quote |

Search
Help