Page 1 of 1

bad sorting for my music when browsing "by folder"

Posted: Mon Nov 14, 2011 10:22 pm
by Jabbawocky
Hi!

I installed Twonky Server 6.0.37 on my DNS-323
My favorit browsing method is "by folder"
but then twonky server sorts my music by titel name instead of sorting by track number oder filename.
This is very bad, because most albums were not played in correct order.

How can Twonky Server sort my music correct?

PLEASE HELP!!!

Re: bad sorting for my music when browsing "by folder"

Posted: Tue Nov 15, 2011 1:44 am
by phibertron
To do that your going to have to edit the following file

view-definitions.xml

In there change the following

Code: Select all

<container name='byfolder' id='music/folders' class='object.container.storageFolder' createClass='object.item.audioItem.musicTrack'>
	<container buildon='res' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />
</container>
to this

Code: Select all

<container name='byfolder' id='music/folders' class='object.container.storageFolder' createClass='object.item.audioItem.musicTrack'>
	<container buildon='res' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />
</container>
What we did was add the following sorting criteria

Code: Select all

sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' 
This should take care of that for you

Re: bad sorting for my music when browsing "by folder"

Posted: Mon Nov 28, 2011 12:42 am
by Darr247
I'm using the 5.1.9 Twonky included with a MyBook World NAS box.
My FLAC audio files are stored in
/FLAC/artist/album/## - title.flac
format, and are typically tagged with at least Artist, Album, Track ##, Title, Year and Genre.

No matter which of the 4 presentation options
  • By Folder
    iPod-like
    Advanced default navigation
    Simple default navigation
that I chose, when browsing FLAC files by Folder using my Onkyo AVR or Oppo BD player,
it was displaying them alphabetically by Title tag (even though their filenames start with their
track numbers as shown above). That is, until - as I gleaned from this thread - I added
sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' to the
/twonky/resources/view/view-definitions.xml file... changing the

Code: Select all

			<container name='folder' id='music/folders' class='object.container.storageFolder' createClass='object.item.audioItem.musicTrack'>
				<container buildon='res' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />
			</container>
section to

Code: Select all

			<container name='folder' id='music/folders' class='object.container.storageFolder' createClass='object.item.audioItem.musicTrack'>
				<container buildon='res' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />
			</container>
Now when browsing by "Folder" in the navigation tree, tracks are displayed and
played in Track## tag order instead of alphabetically by Title tag.

So, thanks!
p.s. it would be nice if the tags and all options in that file were documented somewhere besides here in these forums.

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 03, 2011 2:35 am
by Olaf
Hi there,
I have TM Server v 5.1.6 on a QNAP NAS and get exactly the same frustrating issue: I also find it easier to navigate by folder but have all tracks sorted alphabetically instead of playing in the album order.
I am not technical, so if I am going to copy & paste the details below, I could really do with a bit of help!
You say I should edit 'view-definitions.xml'....where do I find it and how do I edit it?
It would be great to get this sorted and avoid early onset of dementia!

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 03, 2011 5:01 am
by phibertron
I dont have exact instructions

But...

If you can telnet to the qnap
it is most likely in /var/twonky if Im not mistaken
not sure what editor it is going to use possibly VI

I know that somewhere in this forum there is a more descriptive set off how to do this

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 03, 2011 5:35 am
by Olaf
Thanks for the quick reply Phibertron but how do I 'telnet to the QNAP'? - sorry, told you I'm not technical :)

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 03, 2011 6:00 am
by Darr247
Hi Olaf,

According to http://www.qnap.com/images/products/com ... n_NAS.html they sell over 2 dozen different models with Twonky installed. So, I'm not sure which model you have, but they might have a newer version of Twonky (6.0.30) available for you, before you go any further with 5.1.6 - see http://forum.qnap.com/viewtopic.php?f=213&t=38026

Anyway, to get to the Twonky configuration files for manual edit, you'll need to access the operating system of your NAS.

I used WinSCP to do that on my WD NAS box, and it appears that will work for you on your QNAP, too.

Here's a quick and dirty tutorial (but with lots of screen grabs) showing how to use WinSCP to access files in the operating system of your NAS - http://forum.qnap.com/viewtopic.php?f=32&t=11200

The manuals QNAP makes available for download don't show any of the menus available to you in the NAS's web GUI, so I have no idea if you need to explicitly enable SSH, and if so where that is at.

As I noted, the path to the view-definitions.xml file from the root directory (not the /root subdirectory) of the NAS box's operating system should be:

/twonky/resources/view/view-definitions.xml
(x:\twonky\resources\view\view-definitions.xml would be 'microsoft style').

for version 5.x.x Twonky.

Hope that helps.

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 03, 2011 6:35 am
by Olaf
Darr247 - thanks heaps - I'd better pour myself a double before starting :). a project for tonite!

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 03, 2011 2:58 pm
by Darr247
I agree with phibertron that the /var subdirectory is where the config files for Twonky should be stored (e.g. /var/lib/twonky), but it's up to the hardware manufacturer how they install it, really.

If the XML config file isn't in /twonky/resources/view, you can search for it in WinSCP using Alt+F7 (or the search icon on its toolbar is a folder with binoculars).

It appears that if you copy the XML file from the NAS box to a windows machine, WinSCP actually converts line feeds to CR+LF pairs (i.e. expect to see it grow by 177 bytes or so when copied to the windows machine for backup), and when copied from windows back to the linux system it strips off the carriage returns again. (I never noticed that before.)

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 10, 2011 2:06 pm
by oluv
i always was annoyed by the same sorting-problem, but i have finally found this thread and was really glad to be able to fix it, unfortunately i seem to have another user-access problem on my NAS.

i have an Iomega Storcenter ix2-200 cloud edition. i am able to access it through ssh and found the mentioned view-definitions.xml in /mnt/apps/usr/local/twonky/resources/views folder. unfortunately i can neither rename any file here, nor i can delete or copy any new files to this folder.
i am sure this is due to user-restrictions although i am logged in as root and i am always getting the following error-code from winscp:
---------------------------
Error
---------------------------
Error deleting file 'view-definitions.xml'.
---------------------------
General failure (server should provide error description).
Error code: 4
Error message from server: Failure
Request code: 13
---------------------------

any idea how to fix this? now that i finally found a solution for the sorting-problem i am still not able to fix it!
:evil:

thanks a lot for any help!

o.

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 10, 2011 10:21 pm
by Darr247
oluv wrote: any idea how to fix this? now that i finally found a solution for the sorting-problem i am still not able to fix it!
:evil:
o.
The default SSH user/pw for WD MyBook World drives is root/welc0me (with a zero instead of an oh), which can then be changed once you're 'in' and can edit the file where it's stored.
Possibly without the proper password you're allowed just read-only access.

I was thinking your best hope might lie with getting a reply to your post at
http://www.iomegasupportforums.com/phpb ... hp?t=47420

But with a little more digging I found
http://vuksan.com/blog/2010/04/28/custo ... with-ipkg/

So, try that process with your ix2-200.
i.e. not the whole ipkg repo install; just the enable-SSH and login with user/pw = root/soho[+youradminpassword] part, to get in with full access permissions.

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 10, 2011 11:07 pm
by oluv
the funny thing is that i have ssh access with root-user. but it seems i am still not allowed or not given full access to change particular directories.

i doubt anyone from support-team at iomega will provide any solution as they already warned me the first time that enabling ssh access is voiding warranty! haha idiots!

if not ssh-access i would have lost all my data as the NAS got unstable and didn't find my shares anymore. but i could save everything thanks to ssh!

what a pity, i was really looking forward to finally fix this sorting problem.

Re: bad sorting for my music when browsing "by folder"

Posted: Sat Dec 10, 2011 11:16 pm
by Darr247
After perusing a few different threads on the iomega support board, it looks like some versions of their firmware require using 'diagnostics.html' instead of 'support.html' to enable SSH.

Re: bad sorting for my music when browsing "by folder"

Posted: Sun Dec 18, 2011 5:17 pm
by oluv
unfortunately i haven't managed. the app-folder is mounted as read only. i tried remounting it on another folder but i was only able to mount read-only again.
from iomega no help either, therefore i am going to look for another NAS with better twonky-integration.

Re: bad sorting for my music when browsing "by folder"

Posted: Sun Dec 18, 2011 9:14 pm
by Darr247
You should be able to remove the hard drive[s] from the enclosure and mount it [them] r/w in a computer running linux (even if just booting from a Live CD).

Isn't that what you had to do to enable SSH?
e.g. http://www.krausam.de/?p=33