Skip to content

IOError if position file is deleted #1

Description

@chusopr

If a cached playlist exists (/tmp/kodi-lastfm_*.json), it tries to open the position file (/tmp/kodi-lastfm_*.pos) regardless of whether it exists or not, causing an exception and failing to reproduce the playlist:

Error Type: <type 'exceptions.IOError'>
Error Contents: [Errno 2] No such file or directory: '/tmp/kodi-lastfm_dXNlci9jaHVzb3ByL21peA==.pos'
Traceback (most recent call last):
  File "/home/jperez/.kodi/addons/plugin.video.lastfm/addon.py", line 217, in <module>
    track = get_next_track(args["station"][0])
  File "/home/jperez/.kodi/addons/plugin.video.lastfm/addon.py", line 91, in get_next_track
    with open(playlist_position, "r") as f:
IOError: [Errno 2] No such file or directory: '/tmp/kodi-lastfm_dXNlci9jaHVzb3ByL21peA==.pos'

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions