kurioes / pmix

Automatically exported from code.google.com/p/pmix
0 stars 0 forks source link

Accessing Files/Artists/Albums #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Try to access Files, Artists or Albums

What is the expected output? What do you see instead?
I expect to see the available files, artists or albums but the application
force closes.

What version of the product are you using? On what operating system?
The lastest MPD (0.14) on Ubuntu Jaunty and the latest PMix available from
the Android Market. Also tested using the latest available download from
this website.

Please provide any additional information below.
Thanks for the great application. A few issues don't stop me from showing
it off. :)

Original issue reported on code.google.com by teapot.p...@googlemail.com on 10 May 2009 at 8:58

GoogleCodeExporter commented 9 years ago
I also reproduce this bug, only for Artists/Albums.  Files works fine.  Using
archlinux with MPD 0.14 and using PMix from the market.

Attached are the logcat files and each stack trace.

Original comment by cscor...@gmail.com on 14 May 2009 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
I'd like to increase priority on this one - it's an defect which actually makes 
the
software unusable, and I'd really like to use it, MUCH ;) 

Original comment by alexande...@googlemail.com on 15 Jun 2009 at 12:49

GoogleCodeExporter commented 9 years ago
i have the same problem. it may be of consequence that my collection is, in 
fact,
rather huge.

Original comment by paixetpr...@gmail.com on 22 Jun 2009 at 9:24

GoogleCodeExporter commented 9 years ago
I had same problem, but fixed it. I have changed two files a little
In Pmix:
FSActivity.java
In the MPD library(wich seems to not have the best code)
MPD.java

Original comment by morten.b...@gmail.com on 9 Jul 2009 at 4:59

Attachments:

GoogleCodeExporter commented 9 years ago
I also changed the file 
Music.java in the library to make file browsing work

Original comment by morten.b...@gmail.com on 9 Jul 2009 at 5:16

Attachments:

GoogleCodeExporter commented 9 years ago
These changes I have done are of course only hacks to make it work. They may 
create
other bugs, perhaps some files wont be displayed correctly.

Original comment by morten.b...@gmail.com on 9 Jul 2009 at 5:18

GoogleCodeExporter commented 9 years ago
Hi,

The inital bug seems to lead from ID3 Tags which defines Composer/Disc 
Number....
I've fixed this two cases...

@Morten: Its a bit confusing for me now. I can diff FSActivity, but the others 
doesnt
work to diff, i cant see what exectly is changed. What did you want to fix? On 
which
version of Music.java did you do your work? Can you use the version from trunk 
and
create patch files?

Thanks
Bye
Stefan

Original comment by stefan.a...@gmail.com on 9 Jul 2009 at 7:55

GoogleCodeExporter commented 9 years ago
in Music.java this code gave a NullPointerException because fullpath was null:
    public String getFilename() {
        int pos = fullpath.lastIndexOf("/");
        if (pos == -1) {
            return fullpath;
        } else {
            return fullpath.substring(pos + 1);
        }
    }
i changed it to:
    public String getFilename() {
        if (fullpath != null) {
            int pos = fullpath.lastIndexOf("/");
            if (pos == -1) {
                return fullpath;
            } else {
                return fullpath.substring(pos + 1);
            }
        }else {
            // perhaps do something clever
            return "filename not found";
        }
    }

Original comment by morten.b...@gmail.com on 9 Jul 2009 at 10:44

GoogleCodeExporter commented 9 years ago
In the MPD.java file I changed this:
    public Collection listArtists() throws MPDServerException {
        String[] args = new String[1];
        args[0] = MPD_TAG_ARTIST;
        Iterator it = mpdConnection.sendCommand(MPD_CMD_LIST_TAG, args)
                .iterator();
        Collection result = new LinkedList();
        while (it.hasNext()) {
            String s = (String) it.next();
            String[] ss = s.split(": ");
            if (ss.length > 1) {
                result.add(ss[1]);
            }
        }
        return result;
    }

The split didn't always give an array with more than one element, so it gave an
ArrayindexOutOfBoundsEcxeption

The same thing happened in listAlbums(String)
Also in getDir(String) i think, but you seem to have fixed that in another 
manner

Original comment by morten.b...@gmail.com on 9 Jul 2009 at 10:57

GoogleCodeExporter commented 9 years ago
Hi, thanks for these fixes....

@getFilename fix: This should return a list with filenames from the current
directory, how can the path be "null"? Could be a problem of mpd. Do you have 
an idea
how I can reproduce that? i fixed it in FSActivity, now you cant click on a 
folder
without any "fullpath". The bug which philosopher opened is when you have 
special
tags like composer... Therefor open a new bug if it still happens, I close that 
one...

@listArtist fix: i added that one, thanks

bye
Stefan

Original comment by stefan.a...@gmail.com on 10 Jul 2009 at 8:01