henkelis / sonospy

Sonospy is a UPnP control point and Windows Media proxy for the Sonos multi-room audio system.
GNU General Public License v3.0
113 stars 16 forks source link

Only 100 records show up in controller #80

Open dariobert opened 9 years ago

dariobert commented 9 years ago

Hello, I am quite new to sonospy, but I managed to create my own views, for example Tracks by Artists - no issues on that, I can browse all my 19,000 tracks in the controller. The only view that gives me problems is the simple Tracks (all tracks in sequence) - after the first 100 tracks I see blank rows in the controller, with any sorting I choose. I can scroll down to the end of the list, but almost all the records are blank. I know that the records are in the table, because I edited the database with a tool. Simply, they don't show up their content from the 101st record on. Furthermore, if I try to add any of the first 100 records into the controller queue in order to play them, I get a 1002 error code. I hope you can help me with this. (Sorry for any English language error, I am from Italy).

henkelis commented 9 years ago

Hi,

Given that you get the first 100 records, it appears that subsequent calls to the server are either not being returned, or more likely not being returned quickly enough for the controller. The fact that there are empty rows shows that the controller knows how many to expect, but just isn't getting them. Which controller are you using? Also, did you try with a track title sort order (essentially the default)?

Does the 1002 error give any other textual details?

Mark.

On 28/10/15 11:28, dariobert wrote:

Hello, I am quite new to sonospy, but I managed to create my own views, for example Tracks by Artists - no issues on that, I can browse all my 19,000 tracks in the controller. The only view that gives me problems is the simple Tracks (all tracks in sequence) - after the first 100 tracks I see blank rows in the controller, with any sorting I choose. I can scroll down to the end of the list, but almost all the records are blank. I know that the records are in the table, because I edited the database with a tool. Simply, they don't show up their content from the 101st record on. Furthermore, if I try to add any of the first 100 records into the controller queue in order to play them, I get a 1002 error code. I hope you can help me with this. (Sorry for any English language error, I am from Italy).

— Reply to this email directly or view it on GitHub https://github.com/henkelis/sonospy/issues/80.

dariobert commented 9 years ago

Thank you Mark, I am using both the PC controller 6.0 with Windows 7 64-bit, and the Android controller 6.0 on my mobile. I have to amend what I stated in my previous email - I am indeed able to play any of the first 100 records, the 1002 error is appearing only if I try to add/replace all my tracks to the queue. The message simply says "An error has occurred while adding the tracks to the queue (1002)".

Yes, I have tried different sorts just to ensure that the "guilty" track to cause the issue could be the last one correctly showed (the 100th), and the behavior did not change - so it seems that it isn't a particular track that in some way is corrupting the database. As you say, it could be a problem of quickness, but if so, why is it happening only with this view (All Tracks), while I have no issues with all my other (more structured) views? Another fact that makes me think is: why exactly 100 records - not 99 or 101? Is it just a coincidence, or maybe there is some hidden limitation somewhere?

It would probably help a lot to have some debugging tool - maybe you know any?

Dario

henkelis commented 9 years ago

Is 6.0 the beta software? I haven't tried any of that.

From memory the controllers ask for track lists in chunks of 100, so that they can display quickly and process the rest in the background (hoping to have the next set in before you scroll that far). I asked about the sort order as for alternate sort orders the SQL query will have to sort the result set, and as this is the largest result set it is probably the slowest. It's unlikely to be a particular track in this case.

There are several ways to debug - we can turn on logging in Sonospy, monitor the network traffic from the controllers or run the same calls from the Sonospy controller. In the first instance it's probably easiest if I give you a script to extract your track metadata from the database, then I can reload here and see if I can recreate the issue. What platform are you running Sonospy on?

Mark.

----- Original Message ----- From: "dariobert" notifications@github.com To: "henkelis/sonospy" sonospy@noreply.github.com Cc: "Mark Henkelis" mark.henkelis@tesco.net Sent: Friday, 30 October, 2015 9:54:45 AM Subject: Re: [sonospy] Only 100 records show up in controller (#80)

Thank you Mark, I am using both the PC controller 6.0 with Windows 7 64-bit, and the Android controller 6.0 on my mobile. I have to amend what I stated in my previous email - I am indeed able to play any of the first 100 records, the 1002 error is appearing only if I try to add/replace all my tracks to the queue. The message simply says "An error has occurred while adding the tracks to the queue (1002)".

Yes, I have tried different sorts just to ensure that the "guilty" track to cause the issue could be the last one correctly showed (the 100th), and the behavior did not change - so it seems that it isn't a particular track that in some way is corrupting the database. As you say, it could be a problem of quickness, but if so, why is it happening only with this view (All Tracks), while I have no issues with all my other (more structured) views? Another fact that makes me think is: why exactly 100 records - not 99 or 101? Is it just a coincidence, or maybe there is some hidden limitation somewhere?

It would probably help a lot to have some debugging tool - maybe you know any?

Dario

— Reply to this email directly or view it on GitHub .

dariobert commented 9 years ago

Yes, 6.0 is the beta software. I am running Sonospy on my Windows 7 64-bit PC, if I am understanding correctly what you need to know.

henkelis commented 9 years ago

Ok, so as you're running on Windows, I've pushed a database extract script (dumpdb.py) into the databaseupdates folder in the msrefactor5 branch.

Run the dumpdb.py script against your database. It will produce a dump.txt.gz file in the folder you run the script from, which you can email to me:

 python dumpdb.py <path_to_your_database>

On 30/10/15 10:58, dariobert wrote:

Yes, 6.0 is the beta software. I am running Sonospy on my Windows 7 64-bit PC, if I am understanding correctly what you need to know.

— Reply to this email directly or view it on GitHub https://github.com/henkelis/sonospy/issues/80#issuecomment-152495729.

dariobert commented 9 years ago

Mark, here is the output from your script. At first look, it contains all the records from my Music folder.Thanks a lot for your help, again! Dario

----Messaggio originale----

Da: notifications@github.com

Data: 31-ott-2015 2.12

A: "henkelis/sonospy"sonospy@noreply.github.com

Cc: "dariobert"dariobert@alice.it

Ogg: Re: [sonospy] Only 100 records show up in controller (#80)

Ok, so as you're running on Windows, I've pushed a database extract

script (dumpdb.py) into the databaseupdates folder in the msrefactor5

branch.

Run the dumpdb.py script against your database. It will produce a

dump.txt.gz file in the folder you run the script from, which you can

email to me:

 python dumpdb.py <path_to_your_database>

On 30/10/15 10:58, dariobert wrote:

Yes, 6.0 is the beta software. I am running Sonospy on my Windows 7

64-bit PC, if I am understanding correctly what you need to know.

Reply to this email directly or view it on GitHub

https://github.com/henkelis/sonospy/issues/80#issuecomment-152495729.

— Reply to this email directly or view it on GitHub.

henkelis commented 9 years ago

Hi, I'm not getting an attachment, do you want to email it direct. Mark.

On 31/10/15 07:06, dariobert wrote:

Ok, I have emailed you the file

Dario

— Reply to this email directly or view it on GitHub https://github.com/henkelis/sonospy/issues/80#issuecomment-152706683.

dariobert commented 9 years ago

Hum... I attached the file while replying from my private email, anyway the recipient was reply+00ea600519d19b248f705af015bbdeee4230d39f9799219792cf00000001124bd76c92a169ce06c86b5f@reply.github.com

If you want, you could send me your direct email to dariobert@alice.it, so I can try again

Dario

dariobert commented 9 years ago

Hi Mark, did you receive the file?

henkelis commented 9 years ago

Hi, sorry yes, just been a bit tied up lately.

----- Original Message ----- From: "dariobert" notifications@github.com To: "henkelis/sonospy" sonospy@noreply.github.com Cc: "Mark Henkelis" mark.henkelis@tesco.net Sent: Wednesday, 4 November, 2015 10:26:26 AM Subject: Re: [sonospy] Only 100 records show up in controller (#80)

Hi Mark, did you receive the file?

— Reply to this email directly or view it on GitHub .

henkelis commented 9 years ago

Hi, sorry for the delay. At some point I'd incorrectly updated the code that works out how many records to return for the track index, so the Sonos controller gets confused. I've fixed that in msrefactor5, and it works for me now with your database.

dariobert commented 9 years ago

Mark, no problem at all for your delay. Thanks to your update, I am now able to see all the tracks in my controller. Unfortunately, the list of tracks in the controller is populating very slowly - it roughly takes 30 minutes to be able to see the last tracks in alphabetical order. Most important, when I try to add all the tracks into the playing queue, I am getting the old 1002 error. As before, the Tracks view is the only one I have problems with. Even the Tracks by Artist view (same records, different sort) is working fine.

henkelis commented 9 years ago

That's interesting - when I paged through your track index the pages were being populated in near real time (there was a short lag, but entries were filled in sub-second).

Can you send me the ini file you're using for indexing please.

The 1002 error could just be the size of the list - are you trying to add all 19k tracks to the queue?

----- Original Message ----- From: "dariobert" notifications@github.com To: "henkelis/sonospy" sonospy@noreply.github.com Cc: "Mark Henkelis" mark.henkelis@tesco.net Sent: Monday, 9 November, 2015 2:38:21 PM Subject: Re: [sonospy] Only 100 records show up in controller (#80)

Mark, no problem at all for your delay. Thanks to your update, I am now able to see all the tracks in my controller. Unfortunately, the list of tracks in the controller is populating very slowly - it roughly takes 30 minutes to be able to see the last tracks in alphabetical order. Most important, when I try to add all the tracks into the playing queue, I am getting the old 1002 error. As before, the Tracks view is the only one I have problems with. Even the Tracks by Artist view (same records, different sort) is working fine.

— Reply to this email directly or view it on GitHub .