Skip to content

Commit

Permalink
changed securesec (the time to have to play in current position in pl…
Browse files Browse the repository at this point in the history
…aylist when we insert track in playlist) from 10 to 20 sec
  • Loading branch information
pat1 committed Sep 27, 2021
1 parent 30015c4 commit 961de6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autoradio/autompris2.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def isplaying(self):



def get_playlist_securepos(self,securesec=10):
def get_playlist_securepos(self,securesec=20):
'''
Try to secure that there are some time (securesec) to complete all operations in time:
if the player change song during operation will be a big problem
Expand Down
4 changes: 2 additions & 2 deletions autoradio/managempris.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ def ManagePlayer (player,session,schedule):
raise PlayerError("Managempris: ERROR in playlist_clear_up")

#print settings.MEDIA_ROOT
pos=aud.get_playlist_posauto(autopath=settings.MEDIA_ROOT,securesec=10)
pos=aud.get_playlist_posauto(autopath=settings.MEDIA_ROOT,securesec=20)
curpos=aud.get_playlist_pos()

# inserisco il file nella playlist
if pos is None:
raise PlayerError("Managempris: ERROR in xmms.control.get_playlist_posauto")

logging.info( "ManageXmms: insert media: %s at position %d",media,pos)
logging.info( "Managempris: insert media: %s at position %d",media,pos)
aud.playlist_add_atpos("file://"+media.decode("utf-8"),pos)

# recheck for consistency
Expand Down

0 comments on commit 961de6b

Please sign in to comment.