Shuffled song database

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1454
    EVILRipper
    Participant

    Heya,

    Currently I’m using the newest -stable- version of firefly. (simply by apt-get install mt-daapd on Debian)

    Here’s my problem. Somehow mt-daapd ‘shuffles’ all the songs when he scans them. Well, to be honest, its not completely shuffling. He groups albums, but does shuffle all the songs per album. Also, he shuffles the order of the albums. All albums have their own directory. (Example: the third listed album is The Offspring, and the last is The Offspring too. WHY?!)
    Oh. It isnt really ‘shuffling’. He scans in no random order. Whenever I do a full rescan, it results in the exact same ‘shuffled’ database.

    I did a reinstall on my server about a week ago. Before the reinstall it scanned perfectly. He filled the database exactly in the alphabetical order they are listed on the server.

    I have tried all kinds of settings and do a full rescan. (Yes, by killing mt-daapd, removign DB, restarting mt-daapd) but still cant find the reason why it wont scan in alphabetical order like the directories are.

    Any idea what could have caused this? Maybe I used to run an old version which did it right?

    Thanks in advance!
    ~Rippie

    #11060
    rpedde
    Participant

    @EVILRipper wrote:

    Heya,

    Currently I’m using the newest -stable- version of firefly. (simply by apt-get install mt-daapd on Debian)

    Here’s my problem. Somehow mt-daapd ‘shuffles’ all the songs when he scans them. Well, to be honest, its not completely shuffling. He groups albums, but does shuffle all the songs per album. Also, he shuffles the order of the albums. All albums have their own directory. (Example: the third listed album is The Offspring, and the last is The Offspring too. WHY?!)
    Oh. It isnt really ‘shuffling’. He scans in no random order. Whenever I do a full rescan, it results in the exact same ‘shuffled’ database.

    I did a reinstall on my server about a week ago. Before the reinstall it scanned perfectly. He filled the database exactly in the alphabetical order they are listed on the server.

    I have tried all kinds of settings and do a full rescan. (Yes, by killing mt-daapd, removign DB, restarting mt-daapd) but still cant find the reason why it wont scan in alphabetical order like the directories are.

    Any idea what could have caused this? Maybe I used to run an old version which did it right?

    Thanks in advance!
    ~Rippie

    It returns it in the order it gets it from the database, which is in the order of the files in the directory as it scanned.

    Usually, the client has options for sorting — iTunes, etc. At some point, I’ll add options for controlling sort on the server side, but it will probably be a while.

    — Ron

    #11061
    EVILRipper
    Participant

    Hello,

    I know it shows in the order the database has it.
    But could you explain why this is the order of the first album in the database?

    sqlite> select id, fname, title, artist from songs where id < 17;
    1|11 – Toast and Bananas.mp3|Toast and Bananas|11 – Blink182 – Cheshire Cat
    2|14 – Ben Wah Balls.mp3|Ben Wah Balls|14 – Blink182 – Cheshire Cat
    3|09 – Cacophony.mp3|Cacophony|09 – Blink182 – Cheshire Cat
    4|16 – Depends.mp3|Depends|16 – Blink182 – Cheshire Cat
    5|08 – Does My Breath Smell .mp3|Does My Breath Smell?|08 – Blink182 – Cheshire Cat
    6|01 – Carousel.mp3|Carousel|01 – Blink182 – Cheshire Cat
    7|12 – Wasting Time.mp3|Wasting Time|12 – Blink182 – Cheshire Cat
    8|05 – Strings.mp3|Strings|05 – Blink182 – Cheshire Cat
    9|04 – Touchdown Boy.mp3|Touchdown Boy|04 – Blink182 – Cheshire Cat
    10|07 – Sometimes.mp3|Sometimes|07 – Blink182 – Cheshire Cat
    11|02 – M + M’s.mp3|M+M’s|02 – Blink182 – Cheshire Cat
    12|15 – Just About Done.mp3|Just About Done|15 – Blink182 – Cheshire Cat
    13|10 – TV.mp3|T.V.|10 – Blink182 – Cheshire Cat
    14|03 – Fentoozler.mp3|Fentoozler|03 – Blink182 – Cheshire Cat
    15|06 – Peggy Sue.mp3|Peggy Sue|06 – Blink182 – Cheshire Cat
    16|13 – Romeo and Rebecca.mp3|Romeo and Rebecca|13 – Blink182 – Cheshire Cat

    Look at the order. It starts with 11*.mp3, 14*.mp3, 09*.mp3, etc. Why? How?
    And to make it worse; It isnt even the first album in my scanned music dir:

    01 – Incubus – S.C.I.E.N.C.E
    02 – Incubus – Make Yourself
    03 – Incubus – Morning View
    04 – Incubus – A Crow Left Of The Murder
    BAD RELIGION
    Blink182
    Bowling For Soup
    Bowling For Soup – The Great Burrito Extortion Case (2006)
    De Heidenroosjes – Sinema
    … etc

    See Blink182? It has several albums in that dir:

    erik@Servertje:~/Music/Blink182$ ls
    Buddha
    Cheshire Cat
    Dude Ranch
    Enema of the State
    Retail
    Take Off Your Pants and Jacket

    Could you tell me -why- the first songs start at the album Cheshire Cat?
    Or at least any idea -how- it scans that album first??

    Oh, and you might guess “Maybe he skips all the other albums?”
    Not really:

    sqlite> select id, fname, title, artist from songs where album = ‘Buddha’;
    46|09 – Point of View.mp3|Point of View|09 – Blink182 – Buddha
    47|14 – Don’t.mp3|Don’t|14 – Blink182 – Buddha
    48|06 – Romeo & Rebecca.mp3|Romeo & Rebecca|06 – Blink182 – Buddha
    49|13 – The Girl Next Door.mp3|The Girl Next Door|13 – Blink182 – Buddha
    50|03 – Strings.mp3|Strings|03 – Blink182 – Buddha
    51|01 – Carousel.mp3|Carousel|01 – Blink182 – Buddha
    52|11 – Reebok Commercial.mp3|Reebok Commercial|11 – Blink182 – Buddha
    53|05 – Time.mp3|Time|05 – Blink182 – Buddha
    54|10 – My Pet Sally.mp3|My Pet Sally|10 – Blink182 – Buddha
    55|07 – 21 Days.mp3|21 Days|07 – Blink182 – Buddha
    56|02 – T.V..mp3|T.V.|02 – Blink182 – Buddha
    57|12 – Toast & Bananas.mp3|Toast & Bananas|12 – Blink182 – Buddha
    58|08 – Sometimes.mp3|Sometimes|08 – Blink182 – Buddha
    59|04 – Fentoozler.mp3|Fentoozler|04 – Blink182 – Buddha

    … This is a complete mystery to me.. It used to be all great before I did a reinstall :<

    Thanks in advance,
    ~Rippie[/quote]

    #11062
    rpedde
    Participant

    @EVILRipper wrote:

    Could you tell me -why- the first songs start at the album Cheshire Cat?
    Or at least any idea -how- it scans that album first??

    Maybe it stores indexes in a balanced tree, and the output is the result of a traversal in something other than in order. Not sure. It’s a mystery of sqlite.

    You can try the other sqlite and see if it does any different — like sqlite3 rather than sqlite2, for example. Perhaps it returns results in a different order.

    — Ron

    #11063
    mpoly
    Participant

    My observation is that the ids indicate the sequence of insertion in the database, which should reflect the order that the files were returned by the readdir_r() in scanner.c

    My wild-ass guess is that the readdir and/or the OS is returning the files in a “random” order, perhaps creation date/last update date. What filesystem are you using? When you say “did a reinstall on the server”, do you mean firefly, or “the works” (debian+firefly)? What filesystem are the files on?

    And another question:

    sqlite> select id, fname, title, artist from songs where id < 17;
    1|11 – Toast and Bananas.mp3|Toast and Bananas|11 – Blink182 – Cheshire Cat
    2|14 – Ben Wah Balls.mp3|Ben Wah Balls|14 – Blink182 – Cheshire Cat

    Looking at the select and the values returned, something looks odd – are these really your artist names?

    Can you try

    sqlite> select id, path, album, track from songs where id < 17;

    I’d like to see the values of the track field. Even if FF was returning everything in a wildly random order, the Soundbridge orders songs within an album correctly if you are browsing an album with correct ‘track’ tags.

    Cheers,

    Michael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.