[RELEASE] Auto resume add-on

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
IckZ Offline
Junior Member
Posts: 2
Joined: Jul 2015
Reputation: 0
Post: #16
Hey there,
this idea of an addon is brilliant Smile I would also like to use it in my campervan but it is not working with osmc rc3 Sad. It says "script failure" if I start the music. SavePath was set to local dir on sd and I tried the addon with a dir on an external storage but the script failure still appears. Any ideas how to solve this?
find quote
karolp1993 Offline
Junior Member
Posts: 2
Joined: Dec 2015
Reputation: 0
Post: #17
Hello. In last days I used this addon, but after unexpected reset of raspberry pi I cant run autoResume. When Kodi are booting, I can see "Cannot execute the script: autoresume", and that's all. Reinstalling doesn't take effect. Any ideas?
Regards
find quote
Kamion Offline
Junior Member
Posts: 16
Joined: Nov 2015
Reputation: 0
Post: #18
(2014-12-16 10:04)martyanov Wrote:  ....
However, if I play audio after the power is turnedplays only one file to the end and silent. How then can I fix this?
(2014-12-16 19:39)Gatorfreak Wrote:  ...
Maybe you're already doing that and when you restart the car then it only plays where it left off and quits? I'm not sure how to fix that.
I think it would require a significant change to this add-on. It's really beyond what this was intended for. I only have kids movies in my car so I wouldn't even have stuff to test it on.

I want the same thing.

Now the addon only saves current playing song an position. And after reboot it will play it and then stop.
But I want it to begin playing the song and then play whole playlist.

So I tried to change the code, but I have a problem.
Code:
#get playlist ID
playList = xbmc.PlayList().getPlayListId()
#get song number in playlist
playList = xbmc.PlayList().getposition()

Can someone tell me why this is not working, should I import something or what?
find quote
Kamion Offline
Junior Member
Posts: 16
Joined: Nov 2015
Reputation: 0
Post: #19
I am trying to read playlist id like this:
Code:
mediaFile = xbmc.Player().getPlayingFile()
position = xbmc.Player().getTime()
playList = xbmc.PlayList().getPlayListId()
# Write info to file
f = open('/home/pi/autoresume.txt', 'w')
f.write(mediaFile)
f.write('\n')
f.write(repr(position))
f.write('\n')
f.write(repr(playList))
f.close()

But python gives me this:
Code:
-->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.TypeError'>
Error Contents: function takes exactly 1 argument (0 given)
Traceback (most recent call last):
File "/home/pi/.kodi/addons/service.autoResume-master/default.py", line 79, in <module>
recordPosition()
File "/home/pi/.kodi/addons/service.autoResume-master/default.py", line 59, in recordPosition
playList = xbmc.PlayList().getPlayListId()
TypeError: function takes exactly 1 argument (0 given)
-->End of Python script error report<--

If I understand this correctly there is missing argument in getPlaylistId(), but this method does not need parameter:
http://mirrors.xbmc.org/docs/python-docs..._getitem__

What am I doing wrong?
find quote
Post Reply