Sign up here and you can log into the forum!

3/15/2013 Plugin: Random Music Player 1.1

The WDTVExt plugin depot. Plugins/libraries/code only

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Tue Mar 12, 2013 8:26 pm

Image
Image

In the 1st image, have I just got the syntax wrong, or is it not able to execute RandomMusicPlayerLoop?
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Tue Mar 12, 2013 9:17 pm

btw, inside /bin there is the file RandomMusicPlayerLoop. So when I type RandomMusicPlayerLoop from the telnet client, why doesn't it execute? :roll:
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby mad_ady » Tue Mar 12, 2013 10:31 pm

/bin should be in your path - you can check with
Code: Select all
echo $PATH

You can try to run it as:
Code: Select all
/bin/RandomMusicPlayerLoop
/tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop


Also, you should check that the file is executable:
Code: Select all
ls -l /tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop


... or try to run it with a specific shell:
Code: Select all
sh /tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop
User avatar
mad_ady
Developer
 
Posts: 4564
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Tue Mar 12, 2013 10:42 pm

mad_ady wrote:/bin should be in your path


Affirmative.

mad_ady wrote:You can try to run it as:
Code: Select all
/bin/RandomMusicPlayerLoop
/tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop


"RandomMusicPlayerLoop: not found"

mad_ady wrote:Also, you should check that the file is executable


It is (-rwxr-xr-x)


mad_ady wrote:... or try to run it with a specific shell:
Code: Select all
sh /tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop


Ah ha, now that produces a different output:

Code: Select all
/tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop: line 7: syntax error: unexpected "("


Line 7:

Code: Select all
VIDEOS=($(find "$FILELOOP_DIR" -type f -regextype posix-extended -iregex "$FILELOOP_TYPE"))
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby KAD » Tue Mar 12, 2013 10:56 pm

I'm not seeing the debug info I would usually want in wdtvext.log

try doing this
Code: Select all
config_tool -c RANDOM_MUSIC_DEBUG=3
sync && sync
reboot


this will set the maximum debugging level

any line in the .js file that starts with
Code: Select all
this.debug.Log

should now print some text in wdtvext.log

as for running specific shell
that file is done is bash
if you're going to try and specify a shell use bash
not sh
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Tue Mar 12, 2013 11:48 pm

KAD wrote:I'm not seeing the debug info I would usually want in wdtvext.log

try doing this
Code: Select all
config_tool -c RANDOM_MUSIC_DEBUG=3
sync && sync
reboot



Thanks. Here is the output in wdtvext.log:

Code: Select all
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
_trace_send: add message 0xc95d20 (129,  0xbfe980)_trace_send: add message 0xc89740 (115,  0xc77050)_trace_send: add message 0xc01fe0 (119,  0xc02000)_trace_send: add message 0xbef9d0 (127,  0xc02080)_trace_send: add message 0xb31ed0 (119,  0xb621a0)RandomMusicPlayer: [onPageKey] page: basic_browse.xml   key: 27
_trace_send: add message 0xc92668 (122,  0xd195e0)_trace_send: add message 0xbf5048 (122,  0xd19660)_trace_send: add message 0xc207b8 (119,  0xc76e08)_trace_send: add message 0xc87ba8 (127,  0xc76e88)_trace_send: add message 0xbf7f70 (119,  0xc76f10)RandomMusicPlayer: [ onPageKey ] (isMediaListPage) key: 27
Lib: [getConfigSetting]
Lib: [getConfigSetting]
RandomMusicPlayer: [ RandomFolder ]
_trace_send: add message 0xc84580 (125,  0xc8c1d8)_trace_send: add message 0xc88e00 (125,  0xc0eb70)RandomMusicPlayer: [ RandomFolder this.Drives] true
RandomMusicPlayer: [ RandomFolder Path2] /tmp/media/usb/USB1/989F-7BB5/Audio/Disc 1
RandomMusicPlayer: [ RandomFolder MediaPath] /tmp/media/usb/USB1/989F-7BB5/Audio
RandomMusicPlayer: [ RandomFolder ] Starting Music Playback
RandomMusicPlayer: [ RandomFolder ] Executing Cmd RandomMusicPlayerLoop "/tmp/media/usb/USB1/989F-7BB5/Audio" ".*.(mp3|wma|mpa|m4a|mp4a|ogg|wav|aac|flac|aif|aiff|mka)" >> /tmp/RandomMusicPlayerLoop.log 2>&1 &
_trace_send: add message 0xbf91d8 (119,  0xc8d510)_trace_send: add message 0xc0c9a8 (127,  0xb2ff68)_trace_send: add message 0xbffea8 (119,  0xc8cbb8)_trace_send: add message 0xbefdd8 (130,  0xbf19b8)_trace_send: add message 0xb44360 (336,  0xc00f20)_trace_send: add message 0xc8f8a0 (125,  0xc01078)Data in [0xc86bd8..0xc86c98):
 
50 1A BB 00  60 AA BF 00 
00 00 00 00  00 00 00 00 
00 00 00 00  D8 6C C8 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
B0 F5 BF 00  00 00 00 00 
02 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
F8 5D C7 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00
_trace_send: add message 0xb32f40 (130,  0xb32eb8)_trace_send: add message 0xb32fe0 (134,  0xb32f50)_trace_send: add message 0xbf4480 (130,  0xb606d0)_trace_send: add message 0xb66390 (134,  0xb33020)TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect
TRACE: Couldn't connect


RandomMusicPlayerLoop.log:

Code: Select all
sh: RandomMusicPlayerLoop: not found
sh: RandomMusicPlayerLoop: not found


This corresponds to me pressing FFWD twice with a folder selected.

The plugin seems to be working but the command RandomMusicPlayerLoop is not getting called for some reason. Any idea why?
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby mad_ady » Wed Mar 13, 2013 1:37 am

It can't find the executable...

Can you try to run this in a shell?
Code: Select all
bash /tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop "/tmp/media/usb/USB1/989F-7BB5/Audio" ".*.(mp3|wma|mpa|m4a|mp4a|ogg|wav|aac|flac|aif|aiff|mka)"
User avatar
mad_ady
Developer
 
Posts: 4564
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby KAD » Wed Mar 13, 2013 7:06 am

yeah the .js portion seems to be working correctly

I don't know why it's not seeing the executable

if running it from cmd line like mad_ady suggest works

then you could edit the .js script to
lines 134 , 140,151 & 157
Code: Select all
    var Command = (this.rootPath + "bin/RandomMusicPlayerLoop \"" + MediaPath + "\" \"" + Types + "\" >> /tmp/RandomMusicPlayerLoop.log 2>&1 &");
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby recliq » Wed Mar 13, 2013 7:07 am

btw: according to the screenshot posted earlier there is something very wrong with the plugin info...
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Wed Mar 13, 2013 4:57 pm

KAD wrote:if running it from cmd line like mad_ady suggest works


Code: Select all
WDTVLIVE login: root
Password:
      . . .,--. |    .  ,--.--.    ,
      | | ||   ||     ><   |  |    |
      | | ||   ||    |  |  |   \  /
      `-'-'`--' `---''  `  `    `'
   1.05.04_V.WDLXTV_LIVE-0.5.1.5-dev
#
# bash /tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop "/tmp/me
dia/usb/USB1/989F-7BB5/Audio/" ".*.(mp3|wma|mpa|m4a|mp4a|ogg|wav|aac|flac|aif|ai
ff|mka)"
find: `/tmp/media/usb/USB1/989F-7BB5/Audio/\r': No such file or directory
/tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop: line 9: syntax'error near unexpected token `do
'tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop: line 9: `do
#
#
#



Why is there a \r in the path? btw the path is definitely correct and there are .mp3 files inside it.

Also if I run it with sh instead I get this:

Code: Select all
WDTVLIVE login: root
Password:
      _   __ __   __   _  __ _____ _ __
     ///7/ //  \ / /  | |/,'/_  _//// /
    | V V // o |/ /_  /  /   / / | V /
    |_n_,'/__,'/___/,'_n_\  /_/  |_,'
   1.05.04_V.WDLXTV_LIVE-0.5.1.5-dev
#
#
# sh /tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop "/tmp/medi
a/usb/USB1/989F-7BB5/Audio" ".*.(mp3|wma|mpa|m4a|mp4a|ogg|wav|aac|flac|aif|aiff|
mka)"
/tmp/wdtvext-plugins/RandomMusicPlayer/bin/RandomMusicPlayerLoop: line 7: syntax error: unexpected "("
#
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

PreviousNext

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 1 guest