Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2012, 01:07 AM   #151
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
got 15 results loading happily.

will wait on qlob to implement some iteration and other API related searches.

Would like to load a larger results set and just display the first 15 (or possibly implement a scrollbar based solution)

Would like to add some user defaults (results per page etc)

Need to fix the odd escaping behaviour of bash on my quotes.

But yeah. much better.
Attached Thumbnails
Click image for larger version

Name:	TightVNC: kindle:0.0_123.png
Views:	45
Size:	29.6 KB
ID:	98373   Click image for larger version

Name:	TightVNC: kindle:0.0_122.png
Views:	49
Size:	52.9 KB
ID:	98374   Click image for larger version

Name:	TightVNC: kindle:0.0_129.png
Views:	49
Size:	30.2 KB
ID:	98375   Click image for larger version

Name:	TightVNC: kindle:0.0_130.png
Views:	48
Size:	49.6 KB
ID:	98376   Click image for larger version

Name:	TightVNC: kindle:0.0_135.png
Views:	47
Size:	30.2 KB
ID:	98379   Click image for larger version

Name:	TightVNC: kindle:0.0_134.png
Views:	45
Size:	55.4 KB
ID:	98380  

Last edited by twobob; 12-29-2012 at 01:37 AM.
twobob is offline   Reply With Quote
Old 12-29-2012, 10:27 AM   #152
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Todays work so far. Get it to play with useful volumes by default

Quote:
/* Make the sound loud... */
system("alsactl restore -f /mnt/us/soundkloud/alsactl.setup");
Also further tested the 403's... it's odd because today I had access for a few moments to seemingly everything... here there be dragons?

perhaps I will do a viddy later.

Another bug... Python script appears to be ignoring everything after the first space in a search term..

I tried
python ./artist-track.py \'\"`echo "'mr scruff'" | tr -d '"'`\"\'

and all the variations thereof...

Will have to get qlob onto that...

Last edited by twobob; 12-29-2012 at 10:56 AM.
twobob is offline   Reply With Quote
Old 12-29-2012, 02:43 PM   #153
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,187
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by twobob View Post
Okay. We were talking about this just last night.

OTG USB, tiny usb soundcard affixed to casing. tidiest form factor was the consideration.
OK - Finally located the USB (host/client) sound processor (which I had mentioned before, somewhere here):
http://www.microchip.com/stellent/id...cName=en558421

Check bottom of that page for downloads of additional information and source codes.
knc1 is offline   Reply With Quote
Old 12-30-2012, 07:19 PM   #154
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
this is shelved until qlob checks his python over.

my end is working.
twobob is offline   Reply With Quote
Old 01-01-2013, 09:08 AM   #155
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,048
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Those shots look good! I'll get right on fixing stuff!
qlob is offline   Reply With Quote
Old 01-01-2013, 09:13 AM   #156
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by qlob View Post
Those shots look good! I'll get right on fixing stuff!
nice one mate
twobob is offline   Reply With Quote
Old 01-01-2013, 10:07 AM   #157
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
PHP Code:
#!python
# encoding: utf-8
# encoding declaration as specified here http://www.python.org/dev/peps/pep-0263/
import soundcloud
import subprocess 
import sys
import os
from time import sleep
# create client object with app and user credentials
client soundcloud.Client(client_id='8c882aabb8d9314021b236a291cd874c',
                           
client_secret='yada')
try:
    
fullsearch ""
    
for arg in sys.argv
        if 
not sys.argv[0in arg
            
fullsearch fullsearch " " arg  
    tracks 
client.get('/tracks'fullsearchlimit=15,filter="streamable")
    
1
    temp 
= {} #initalize dictionary
    
for track in tracks:
        
titleage track.title.encode('utf-8')
             
tempy titleage+'\n'
        
temp.update({i:track.id}) #set dictionary key
        
i=1

    
#return full list of links
    
for listing in range(1,i):
        
queryb listing
        trackid 
temp.get(queryb#retrieve key
        
track client.get('/tracks/{0}'.format(trackid))
        
#tempart = "Artist: {0}\nDuration (in secs): {1}".format(track.user.get(u'username'), (track.duration/1000))
        
temptitletrack.title.encode('utf-8')
        
stream_url client.get(track.stream_urlallow_redirects=False)

# ec is giving us 403's atm
        
if "ec-media" in stream_url.location:        
            print 
"{0}¬{1} ".format(temptitle,stream_url.location)
    
# "Track Loading complete"
except:
    print 
"STREAM-DOWN! Unexpected Soundcloud error:"sys.exc_info()[0],"¬./fail.wav" 

an example call

PHP Code:
static void playmplayer(GtkWidget *widgetgpointer data) {
    
char holder[1024] = "killall -9 mplayer & ./mplayer  -softvol -softvol-max 200 -af volume=5 ";
    
char *formatted data;
    
strcat(holderformatted);
    
system(holder);
//    g_print("debug=%s", holder);

(and yes I should check the strlen and free the space, this is an example)

Last edited by twobob; 01-01-2013 at 11:21 PM. Reason: fixed spaces issue
twobob is offline   Reply With Quote
Old 01-01-2013, 11:27 PM   #158
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Okay - result. Total success.

Happy with that.

can now do playback on all results. and search on multiple terms!

SWEEET
twobob is offline   Reply With Quote
Old 01-02-2013, 03:52 AM   #159
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,187
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Great work.
Do you and qlob have plans to release a package of this player?
knc1 is offline   Reply With Quote
Old 01-02-2013, 09:10 AM   #160
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by knc1 View Post
Great work.
Do you and qlob have plans to release a package of this player?
Well. One for the touch could be right around the corner.
There are still a few 403 errors that I would like iron out before the bazzilion reports of it failing from time to time.

That said, the python is a separate text file that can easily be updated post install as new features become available.

The stumbling blocks for the 3 need addressing before that comes to fruition.

so yeah. Touch soon maybe. 3 later
twobob is offline   Reply With Quote
Old 01-03-2013, 02:05 PM   #161
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Todays edits:

Status box with updated stream info every few seconds. (currently just prints the stream url badly )

per-label text-style control
Quote:
gtk_widget_modify_font(label03, pango_font_description_from_string("Tahoma 11.2"));
Local search to play local files for local people.

Wider search box and smaller font to allow for longer search terms.
Search terms now accept spaces.

Other bits and bats. play button now restarts stream, pause works, volume also can be set.
Attached Thumbnails
Click image for larger version

Name:	TightVNC: kindle:0.0_063.png
Views:	46
Size:	31.2 KB
ID:	98688   Click image for larger version

Name:	TightVNC: kindle:0.0_061.png
Views:	46
Size:	23.2 KB
ID:	98689   Click image for larger version

Name:	TightVNC: kindle:0.0_064.png
Views:	44
Size:	30.3 KB
ID:	98690   Click image for larger version

Name:	TightVNC: kindle:0.0_065.png
Views:	45
Size:	19.0 KB
ID:	98691   Click image for larger version

Name:	TightVNC: kindle:0.0_067.png
Views:	45
Size:	35.9 KB
ID:	98692  

Last edited by twobob; 01-03-2013 at 03:44 PM.
twobob is offline   Reply With Quote
Old 01-03-2013, 02:08 PM   #162
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,048
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Looks Nice!
qlob is offline   Reply With Quote
Old 01-03-2013, 03:07 PM   #163
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by qlob View Post
Looks Nice!
http://www.gtk.org/api/2.6/gtk/gtk-G...tkKeySnoopFunc

Key input?
twobob is offline   Reply With Quote
Old 01-04-2013, 01:05 PM   #164
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Todays progress...

Thanks to http://www.mobileread.com/forums/sho...93#post2367393 and a bit of gratuitous grafting we have this all neatly running on the 3.

Wow. that was less hard than I imagined... (next up... install python on the 3) (embedded in the loop for now I think)
Attached Thumbnails
Click image for larger version

Name:	ImageMagick: root.fb.pgm_072.png
Views:	44
Size:	23.5 KB
ID:	98756  

Last edited by twobob; 01-04-2013 at 01:15 PM.
twobob is offline   Reply With Quote
Old 01-05-2013, 11:24 PM   #165
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6015922
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
err at a bit of a loss what to do next

http://developers.soundcloud.com/doc...ference#tracks

Search by artist maybe?

Nah I'll just implement the "local play" more completely I think.
Perhaps just put together an early release

- bugs, features and all and see what explodes.

Input gratefully accepted..

Todays Fixes: Corrected the search term text.
Tested on 3.

Last edited by twobob; 01-06-2013 at 12:02 AM. Reason: Local stuff solid
twobob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 02:11 AM.


MobileRead.com is a privately owned, operated and funded community.