View Single Post
Old 22nd December 2018, 08:24   #13
PeterK.
Quinto Black CT Developer
 
Join Date: Sep 2016
Posts: 589
First of all I managed to get those buttons in the left drawer to work properly - without adding any "file://" to the PATH string.

This is what you should add to progbutton.m script:

PHP Code:
Function string pathToURL(string path); 
PHP Code:
string pathToURL(string path) {
    
int clen strlen(path);
    
string ret ""char;

    
    
c=0;
    while (
len) {
        
char strmid(path,c,1);
        if (
char==chr(92)) {
            
ret ret chr(47);
            
++;
        } else if (
char==":") { //for ":/"
            
ret ret ":";
            
++;
            
            
char strmid(path,c,1);
            if (
char==chr(92)) {
                
ret ret chr(47) + chr(47);
                
++;
            }
        } else {
            
ret ret char;
            
c++;
        }
    }
    
    return 
ret;

(It does not matter where in the script you place those lines from above)

Change the line 237 from
PHP Code:
string currPath getPlayItemMetaDataString("filename"); 
to
PHP Code:
string currPath System.getPlayItemString(); 
Change the line 156 from
PHP Code:
playFile(path); 
to
PHP Code:
playFile(pathToURL(path)); 
You can find those lines in progbutton.m in leechbite's Kameleon skin.

Furthermore: Kameleon seems to have exactly the same problem with AlbumArt not being shown after left clicking on a button which was programmed to play a bookmarked song:



So for now I cannot promise any working solutions.
Attached Thumbnails
Click image for larger version

Name:	no preview.png
Views:	436
Size:	87.5 KB
ID:	54270  
PeterK. is offline   Reply With Quote