Hello,
I have attempted to use the "Music Play Dir" action to play music for a while before I go to sleep before I trigger a sleep countdown by turning off my screen.
The actual activity works well but the in-built music action is playing up.
I have used the "Music Play Dir" action with Subdirs, Audio Only, Random and Flash all ticked, and Maximum Tracks set to both zero and 60 with the problem occurring where it will play only one track and then go quiet.
I do not have any "Music Stop" actions anywhere else in my Tasker scripts except for the following the sleep countdown triggering.
Is there a bug in Tasker? Can anyone please help here?
Task: Night Music (36)
A1: Media Volume [ Level:2 Display:Off Sound:Off ]
A2: Variable Set [ Name:%NIGHTPOWER To:0 Do Maths:Off Append:Off ]
A3: Stop [ With Error:Off ] If [ %MODECAR = 1 ]
A4: Flash [ Text:Night Mode already active! Long:On ] If [ %MODENIGHT = 1 ]
A5: Flash [ Text:Night Mode Music Long:On ] If [ %MODENIGHT = 0 ]
A6: Stop [ With Error:Off ] If [ %MODENIGHT = 1 ]
A7: Variable Set [ Name:%MODENIGHTMUSIC To:1 Do Maths:Off Append:Off ]
A8: Display Brightness [ Level:20 Disable Safeguard:Off Ignore Current Level:Off Immediate Effect:On ]
A9: Display Timeout [ Secs:0 Mins:2 Hours:0 ]
A10: Stay On [ Mode:With AC or USB Power ]
A11: Perform Task [ Name:Night Presleep Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A12: Media Control [ Cmd:Pause Simulate Media Button:On ]
A13: Media Volume [ Level:2 Display:On Sound:Off ]
A14: Music Play Dir [ Dir:external_sd/Music/Compilations/SomaFM Subdirs:On Audio Only:On Random:On Flash:On Maximum Tracks:60 Continue Task After Error:On ]
** Sleep countdown is triggered when display is turned off and %MODENIGHTMUSIC=1
Task: Night Music Timer (41)
A1: Variable Set [ Name:%MODENIGHTTIMER To:0 Do Maths:Off Append:Off ]
A2: Notify [ Title:Night Music Countdown Active Text: Icon:<icon> Number:0 Permanent:Off ]
A3: Variable Set [ Name:%MODENIGHTENDTIMER To:300 - %MODENIGHTTIMER Do Maths:On Append:Off ]
A4: Flash [ Text:Night Lullaby ending in ...
%MODENIGHTENDTIMER seconds Long:Off ]
A5: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A6: Variable Add [ Name:%MODENIGHTTIMER Value:5 Wrap Around:0 ]
A7: Flash [ Text:Night Mode Timer Stopped Long:On ] If [ %MODENIGHTMUSIC = 0 ]
A8: Notify Cancel [ Title:Night Music Countdown Active Warn Not Exist:Off ] If [ %MODENIGHTMUSIC = 0 ]
A9: Stop [ With Error:Off ] If [ %MODENIGHTMUSIC = 0 ]
A10: Goto [ Type:Action Number Number:3 Label: ] If [ %MODENIGHTTIMER < 300 ]
A11: Perform Task [ Name:Night Lullaby Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
** At end of sleep countdown, Night Lullaby task is triggered:
Task: Night Lullaby (37)
A1: System Lock
A2: Notify Cancel [ Title:Night Music Countdown Active Warn Not Exist:Off ]
A3: Music Stop [ Clear Dir:On Continue Task After Error:On ]
A4: Variable Set [ Name:%MODENIGHTMUSIC To:0 Do Maths:Off Append:Off ]
A5: Variable Set [ Name:%MODENIGHTTIMER To:0 Do Maths:Off Append:Off ]
A6: Variable Set [ Name:%TIMESLEEPON To:%TIMES Do Maths:Off Append:Off ]
A7: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A8: Media Volume [ Level:4 Display:Off Sound:Off ]
A9: Music Play [ File:Tasker/Lullaby/Lullaby.mp3 Start:0 Loop:Off ]
A10: Wait [ MS:0 Seconds:0 Minutes:2 Hours:0 Days:0 ]
A11: Music Stop [ Clear Dir:Off ]
A12: System Lock
A13: Kill App [ App:UberMusic Use Root:Off ]
A14: Perform Task [ Name:Night Sleep Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]