[RELEASE] Auto resume add-on
#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?
Reply
#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
Reply
#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?
Reply
#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?
Reply
#20
Does this add on still work?
Reply
#21
I suppose this won't work with Krypton. Any replacement? This is the only thing I miss in my car Kodi installation on my android head unit.
Reply
#22
(2017-09-01, 10:08)extremeaudio Wrote: I suppose this won't work with Krypton. Any replacement? This is the only thing I miss in my car Kodi installation on my android head unit.
Not quite the same, but a script to resume the last-played item on startup. I tried it on windows and it worked perfectly.
www.reddit.com/r/kodi/
Reply
#23
I've forked this and made a few minor improvements in: https://github.com/edalquist/service.autoResume

There are other forks with playlist support, I personally don't need that so I haven't added it yet. I have it running on Kodi 18.9 / LibreELEC on a RaspberryPi 4 and it works great as a solution for a car media player that now remembers where it was after a hard-shutdown.
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Auto resume add-on1