Help get this topic noticed by sharing it on Twitter Twitter, Facebook Facebook, or email.
jkarl

TwonkyServer default sorting behavior

I have just installed TwonkyMedia 6.0.34 into a compatible Nas device based in Linux (a Qnap NAS). In web interface of TwonkyMedia, I see the music tracks under folder 'Directory' appearing in alphabetical order, BUT these tracks are titled beggining with numbers, not by letters!! Result: Twonky disorder my music tracks!!

Curiously, it doesn't occur under folder 'Albums', by exemple. There, the tracks appear ordered considering numbers. If someone have some dubt, i'll add, it is Twonkt that disorder them, not the NAS...

Problem? Yes, because my sistem of numbering and title the hundreds and thousands of tracks makes me prefer to use folder 'Directory' over all the other ones. So, someone could help me, please?

thx
11 people like
this idea
+1
Reply

  • Kiran (Official Rep) January 19, 2012 12:43
    Hi,

    In latest version of TwonkyServer by default the sorting is done on the basis of title of the file. If you wish to modify sorting order then please modify view-definitions.xml file at your own risk. Also, the NAS installation of TwonkyServer is somewhat complicated and is available for advanced users and officially we do not support Installation and configuration of these versions.
    However I can offer some suggestions if you can locate the view-definitions.xml file in your NAS device.

    Thanks,
    Kiran
    • 1/ why twonky people change behaviours from one version to another : it is against the basic rule of upward compatibility ?

      2/ why twonky people do not add an option that let the user to choose between thoses options instead of telling non specialists modifying complex internal parameters files ?

      3/ why twonly people do not lesson clients who have paid ?

      4/ the real problem is when you lesson classical music with several cd's... only way is to name correctly and it is much easier than to retad id3's....

      SO PLEASE TWONKY PEOPLE MAKE THIS EASY OPTION AVAILABLE AGAIN !!!!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • k1200rs
    Hello,

    Difficult to understand why the default sorting is per the file title. I guess (seen this many times requested) we would all prefer the sorting on the basis of the track number (to follow the CD sorting).
    I don't want to mess with the xml definition.

    Regards
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Kiran (Official Rep) January 22, 2012 15:46
    Hello,

    Thanks for your valuable feedback, we will share it with our development team.

    Thanks,
    Kiran
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Wilson Carey (Senior Manager, Operations) January 24, 2012 17:15
    Hello,

    I've changed this topic to an idea for our consideration and for the community to chime in on. Thank you for your feedback.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Josephina More
    For me also: please sort by tracknumber. It's been an issue for many users and often been mentioned in the (old) forum. And, like k1200rs, I don't want to mess with xml-files
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • dwasifar
    3
    Well, I have no fear of editing the xml files, and once I found out from this thread what file I should be looking at, it was easy.

    Open the view-definitions.xml file for editing and look for a line that starts off like this:

    container name='byfolder' id='music/folders'

    You want to edit the FOLLOWING line. Initially it looks like this:

    container buildon='res' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />

    Change it to look like this:

    container buildon='res' sortcriteria='+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />

    (Each of those lines should start with a < but I had to leave them out to get them to display in the forum. Make sure you include it.)

    Restart TwonkyServer and voila, track sorting in folder view.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Kiran (Official Rep) January 31, 2012 10:50
    Hi,

    Very informative post by dwasifar.

    The list of albums by the artist build on:

    so these albums should be sorted by +pv:numberOfThisDisc or ,+upnp:originalTrackNumber if none of these are available, it will be also sorted by +dc:title

    If you want to sort songs by Track number then you need to set
    sortcriteria=+upnp:originalTrackNumber for particular container in view-defination.xml file.

    Then you need to navigate to that container in TS or Web browser of TMS to view the effect of the sorting.
    Now the songs are displayed as per the track number.

    Kiran
    • Hi Kiran,

      your approach only works if your media file has tags on board. If not, #pv:*, #upnp:* and +dc:* do nothing. What's the sort order in that condition? From my observation, it's the creation date (may be others). Great feature. If you rsync or repopulate your media library, you will be faced with lists differently sorted. Great user experience. My familiy likes to seek around to find the right file which just takes longer than to view the file itself. Again, great user experience which we wouldn't have without Twonky :(

      And hey, it's time to document the crap. It would have been nice to see something within the wiki with explanations which container does what, which attribute referrs to what and why it has to or should be placed there. Pictures which shows the results would help to understand. Just pasting a bunch of unformatted XML lines would not help at all. And just to stress that topic, XML can be provided in human readable form. One way might be to place the attributes one per line left justified. Having all attributes of an XML tag in one single line decreases readablility significantly.

      --coreDump
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • nico122
    Hi, apologies for jumping into this conversation, i would like to be able to stream my music randomly from my Qnap Nas to my digital music reciever, is there any way i can set Twonky media server to do this ?

    Again i apologise if i am in the wrong place to ask this....

    Regards

    Newbie
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • nico122
    Hi, apologies for jumping into this conversation, i would like to be able to stream my music randomly from my Qnap Nas to my digital music reciever, is there any way i can set Twonky media server to do this ?

    Again i apologise if i am in the wrong place to ask this....

    Regards

    Newbie
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • k1200rs
    2
    Some years ago, Twonky(vision) was providing basic but very effective advanced configuration menus to select how to sort tracks and configure user menus (as they appear on the media renderer). All that disappeared and we were requested to open the boot and tweak the engine ourselves (manage the XML configuration files). This triggered MANY reactions as this was felt a step backward (in terms of usability). Despite the MANY related remarks and requests in the former Twonky forum, these requests were not listened to.
    If Twonky is a mass product (end user product), you should not request us to put our hands in the engine to adapt the product for very basic, critical and common sense features.
    Yes, we should be able to decide how music tracks should be sorted and what menus we want to have displayed on the media renderer easily and through simple drop down menus (as we used to have) or through other user friendly configuration approach (one can think of graphical approach).
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • nico122
    Well i have a TEAC Mini Hifi system which has a T-H 380DNT Reciver that picks up internet radio and more importantly all the music files on my nas, but it will only allow me to play the music as it is in the folders, as set out on the Twonkymedia server, not in random mode as i would like.

    If it's a case editing the xml files, to get the results i am after, how do i do that ? I have read dwasifar post above and it looks clear as mud to me no disrespect meant to dwasifar (yes i am a real newbie to this kind of thing)

    Quote:{All that disappeared and we were requested to open the boot and tweak the engine ourselves (manage the XML configuration files). } Would you be able to provide me with an idiot proof way of editing the XML files so that i can play my music in Random mode please ?

    Kind Regards
    • view 3 more comments
    • Dear dwasifar!
      Would you help me to locate view-definitions.xml?
      I'm using Nas-version of Twonky 6.0.38 on Qnap TS-212.
      I think, it is Linux solution, but i can't find this file...
    • Thank you, dwasifar!
      Your advice was very usefull.
      view-definitions.xml is found, modified, and everything works.
      If somebody have got that trouble on Qnap TS 212, i can help you to locate this file. I'am using WinSCP free programm to get access into Qnap file structure, founв and modify this file (keeping backup copy, of course!)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • nico122
    Ah see, just as a matter of interest what players do you use that allow random playback ?

    I was thinking of upgrading my hifi to include the Marantz NA7004 Network audio player, but not sure if that has Random playback ability....anyone here have that model ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • MeinradG
    Hello everybody!
    I am also not really afraid of modifying xml-files ... but where can I find a documentation on possible switches?
    Basically what I'd like to do is to change the sorting direction for "videos" in the name='bydate' and the name='byyear' to descending - so that the newest videos are on top; alternatively it would be great to be able to sort by the filename ascending/descending ...

    I understand that I have to modify the sortcriteria, but what are the correct values, and what is the switch for ascending/descending?
    sortcriteria='-pv:addedTime'

    ... running Kirkwood-Build on an D-link DNS-320.
    Thank you for your help!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • edrikk
    sad
    Dated documentation can be found here:
    http://www.twonkyforum.com/viewtopic....

    The XML has changed slightly since Twonky Server v5.1, but at least this give you a sense of what's availab.e

    Packet Video is really out to lunch when it comes to making the Server product:
    1) Usable
    2) Communicating how to use whatever features ARE in the Product.

    And they don't seem to want to improve (over the years that I've been following/using this Product). I'm sad to say that I finally (after over 5 years of TMS) installed another (free) DLNA server on my Windows box, as I'm getting tired of this....
    • Hi edrikk,

      outdated documents are useless. I don't need a documents which may give me a snese of what's available. I need a documents which provides detailed information what is available and how it works. I reviewed the docuement you refer to but, to be honest, I can not work out my demands with that document.

      Which server did you install?

      --coreDump
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • MartinLX
    sad I’m frustrated
    3
    Hi, fully agree with the frustrated comments. Sorry for adding oil on the fire....but we are in 2012 and not it 1856. So please a reality check by Twonky! Sort order is by default alphabetically? Hello? Ever listened to concert CDs, or classical CDs, musical CDs? Do we want to start the musical with the end just because that last song starts with an "A"? This is a complete joke. And sorry Wilson - it sounds the sort order is now an "idea for consideration"? Please, a reality check. This is a commercial product users are paying for. I can understand such an attitude with a free product..... maybe.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • mazurovya
    sad
    Almost have broken my brain trying to override this problem on my Qnap-preinstalled Twonky. See no any reason to make it this way. Please, use track number tag for sorting.This is the only logical way! If this is a problem, you may use complete name of file for sorting - but why using only title??? For now, I just can not beiieve that this is not a silly joke.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Juergen
    Hi there,
    I have added the sortCriteria in view-defination.xml fil and when I use a web browser to navigate through the folders everything is sorted according to track numbers and looks fine.

    But when I use my streaming client to view the folders the sort order is still alphabetically.
    Any ideas?

    Greetings
    Juergen
    • view 1 more comment
    • Hello Wilson,
      thanks for your reply. My streaming client does not offer any sort options. When I use my streaming client with a DLNA server different than Twonky, the sorting is according to track numbers, which is my personal favorite view.
      I am not sure, if the problem is on server or client side. I guess that my streaming client simply shows the view presented by the server.
      Did you ever experience that there is a difference regarding the sorting in browser view compared to a streaming client?

      Greetings
      Juergen
    • Hi there,
      I have added the following line to the clients.db:
      ...
      XM:IGNORESORT
      ...
      This line fixed my personal sorting problem :-).

      By the way, when I opened the Flash view rather than the HTML view of the Twonky media browser, the sorting was the same like on my streaming client. With the line above, the sorting in the Flash view has changed too.

      Maybe this is the worng place to ask:
      I have configured the flac-wac transcoding, which is working fine.
      But at the end of track I do have a delay of 1-2sec, where the next file is encoded.
      Is there any way to configure the TwonkyServer to support gapless playing?

      Best regards
      Juergen
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Wilson Carey (Senior Manager, Operations) February 29, 2012 01:23
    Hi Folks,

    Thank you all for your feedback. I'm going to see what we can do documentation wise to help with these types of

    configuration changes. I also hear you on the usability point and will raise this with product management.

    I do think there is a little confusion here about the product capabilities that I would like to address. The default sorting behavior of the 'album' view is by disc and then track. The 'folder' view in question here is similar to a file system browser and sorts by file name. In this scenario, jkarl's preference is to use the 'folder' view, but with the same sorting criteria as the album view. Currently, this kind of change does require an update to the view definition, which is contained in the XML file mentioned previously in this thread (See the posting from dwasifar regarding how to solve this particular issue).

    The idea for consideration here is more along the lines of how many folks find that they need to make changes to the deafult configuration to achieve the view behavior they want. We do read these posts and take your feedback into consideration. This community is designed to help us do a better job at that. Please keep the feedback coming. Thank you.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Josephina More
    Hello WIlson
    Thanks for your comment. It's nice to hear that at least you take it into consideration. Or do some documentation on the issue.

    Josephina
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • dwasifar
    Hi Wilson,

    I see Mazurovya has already said what I was going to say.

    I want to add that this behavior - folder view sorted by title - kept me from upgrading Twonky for years. I stayed with 4.4.4 for a very long time, because 4.4.4 did sort by filename (which is fine for me, because my filenames begin with the track number).

    I asked support about the sorting problem at least twice over that time and was told essentially that there was no way for the user to change it and no particular plan to fix it. It was only when I discovered this thread by accident that I learned about the xml files, and I still had to figure out how to edit them on my own; if there is documentation, I'm unaware of it.

    I did upgrade once I learned how to fix the xml files, and I'm glad other users have been helped by the solution I posted here. But it is really disappointing that this issue has been in your product for years and you appear unaware of it. I cannot possibly be the only person who noticed and reported it over all that time; I have a hard time imagining a situation in which anyone would want folder view sorted alphabetically by folder name all the way down to the files, but then suddenly want the files themselves sorted alphabetically by title metadata. Who would want that, and for what?

    I'm glad you're finally fixing it, but really this should have been addressed years ago.
    • Wilson Carey (Senior Manager, Operations) March 01, 2012 14:29
      I do apologize that this has been a problem for you for so long. As you can see we are investing in support tools that help us to identify trends and speed better information to you.

      To properly set your expectations, I am looking into why the behavior is as it is. I'm sure there were reasons for doing it this way, so I can make no guarantees at this time regarding changes to the product.

      As mentioned earlier, I will be looking into what we can do documentation-wise while we evaluate this feedback.

      Thank you.
    • Thanks, Wilson. I just re-read what I wrote, and I'm sorry it sounded so peevish. I must have been having a bad day. :)

      For what it's worth, I would think that if you are in folder view, and the folders are being sorted alpha by foldername, then one would expect the files they contain would also be sorted alpha by filename, and not by their metadata at all. This is how 4.4.4 behaved. But sorting by track number gives me the same results, because of my naming standard; and from the discussion here I think most people would be okay with that. It seems like the Artist/Album/Tracks directory structure mostly prevails.

      Maybe a configuration option in the control page would be a good idea.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • mazurovya
    I'm also sorry for negative my emotions. The only reason for them is my dissapointment. Why this great and stable product can not be just perfect?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Rhythm1
    Wilson,

    If adding sort options in the advanced configuration menus is not going to be a timely change, I would suggest that the sortcriteria='+upnp:originalTrackNumber' change be made to the "view-definitions.xml" file for the next software update.

    This would keep your customers from editing mistakes that could cause more problems, and reduce customer complaints on this issue.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • gsopub
    track number is NOT enough.... I mainly lesson to classical music with several discs like an opera and most of the time, track number is related to one disc.. so if you order by track you find several track with the same number in the same opera !
    So 2 solutions :

    1/ let the choice to order by filename (most of the time : disc01-track01-title.. in case of an opera as an exemple

    2/ or more subtile : being able to order by album (album = 1 CD) with album name starting with 01, 02 etc..in case of several CD for an opera and then order by track.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • gsopub
    sad
    By the way version 7 is a castrophe.... developers have forgotten to let user access to filename to be able to order multi CD's track correctly..... please let the user add a filename column for those who take the time to correctly name the files for multi CD

    Version 7 do NOT correctly work for rendering neither (Video & Photos) and Twonly Mobile stil does not work.... Moving to twonky cloud just to be marketed and surveyed by Twonky (making money another way) is EXACTLY what I do NOT want. So forget about Twonky, have good time but fed up of being a "dindon de la farce".....
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • moviegeek
    Hi,

    To sort on disc number, followed by track number, the criteria in the view definitions file must look like this:

    sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber'

    And if I'm not mistaken, the '+' sign means ascending order, and a '-' would be descending order?

    BTW: Remember to make a copy of the file after editing. It will most likely be overwritten next time you install an update.

    Lars
    • Hi moviegeek,

      your approach only works if the media has tags maintained accordingly. The majority of files don't. What if you have media files with absolutely no tags accomplished? While it is very likely you named your media files in a way you have a nice sort oder in your file explorer, which in turn you would like to see on your streaming client as well, you probably do not start the effort to maintain the tags simultaniously. Especially not for your photo library. On my side, I even don't know how to maintain tags for my video files while file names are managed.

      So, '+pv:numberOfThisDisc,+upnp:originalTrackNumber' solves the issue in just one single case, i.e. for tag maintained autio files. But to be honest, the universe has room for some more spot lights.

      --coreDump
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • nico122
    Hi,

    Is it possible to edit a playlist ?

    What i am after doing is.....In the Recently added playlist it only shows the files that were added, all in alphabetical order at the moment.

    What i would like it to show is the album folder (that the new files are in) then the tracks in track order within each folder. Exactly the same as in the ''Artist / Album'' view......but obviously only showing the recently added folders.

    How can i edit the view definitions folder to show this ?

    My twonky server is 6.0.38. all my music is in individual album folders.

    Appreciate any help anyone can give with this.

    Regards

    Nick
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • moviegeek
    I think you can just load the playlist, edit it, and save the new list under the same name.

    As far as I can tell, the "Recently added" playlist is sorted by add time (I have TwonkyServer 7.0.5), with the latest addition first. To change that, you can try and change the sort criteria. Open view-definitions.xml, find the line containing the string "playlistrecentlyaddedaudio" and modify the "sortcriteria" parameter. Look at other criteria in the file for inspiration. I don't think a playlist can contain folders though. Only individual tracks. But maybe you can sort on album name (not sure how), followed by track number.

    Lars
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • nico122
    The Only problem i seem to be having....

    After altering the playlist in the view definitions .xml, basically adding class='object.container.storageFolder' into the sortcriteria. when i edit it and then save it to my NAS ( using Winscp, which seems great for this) I then reboot my NAS ( not sure whether this is needed ? ) nothing seems to alter the way the playlist looks....nothing changes in other words.

    Same when i followed this direction by dwasifar....(directions of which are a few messages above this one)........

    ------------------------------------------------------------------------------------
    container name='byfolder' id='music/folders'

    You want to edit the FOLLOWING line. Initially it looks like this:

    container buildon='res' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />

    Change it to look like this:

    container buildon='res' sortcriteria='+upnp:originalTrackNumber' createClass='object.item.audioItem.musicTrack' class='object.container.storageFolder' />

    --------------------------------------------------------------------------------------

    This also has no effect within the Byfolder view.... ???

    Not sure what i am doing wrong ?

    Nick
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • coreDump
    1
    Hi Twonky,

    can you please clearly state, how the sorting creteria can be set to 'by file name' for the folder views (all types of media). Please describe all containers which are to be effected in which nested level as otherwise it will remain a night mare to find the right one to be maintained. And no, 'dc:title' is not the correct one as that uses the title tag of the media container and not the file name. This has not the intended effect if the media container as absolutely 'NO TAGS' like all my mpeg and jpeg files. And no, I don't want to maintain tags for these files as everything I need is encoded in folder name and file name respectively.

    --coreDump
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • coreDump
    Hi,

    I've searched for database field identifier which may be useful as sortcriteria and I found 'pv:source'. So, for the time being, I have the following snippet in my view-definitions.xml:

    <container name='byfolder'
    id='video/folders'
    class='object.container.storageFolder'
    restricted='0'
    sortcriteria='+pv:source'
    createClass='object.item.videoItem.movie'>
    <container buildon='res'
    sortcriteria='+pv:source'
    createClass='object.item.videoItem.movie'
    class='object.container.storageFolder'/>
    </container>


    This provided a list alphanumerical sorted for the web frontend. Unfortunately, my DLNA client continues to provide old style creation date based and inconvinient sorting. This may imply that the client requests specific sort criteria. Is there anybody out there knowing something more serious?

    My log file shows this entry which I believe is responsible for the query:

    08:45:47:263 [Info] - LOG_HTTP: HTTP_send_receive : received doc =
    <?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
    s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <s:Body>
    <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
    <ObjectID>0</ObjectID>
    <BrowseFlag>BrowseDirectChildren</BrowseFlag>
    <Filter>dc:title,
    av:mediaClass,
    dc:date,
    @childCount,
    res,
    upnp:class,
    res@resolution,
    upnp:album,
    upnp:genre,
    upnp:albumArtURI,
    upnp:albumArtURI@dlna:profileID,
    dc:creator,
    res@size,
    res@duration,
    res@bitrate,
    res@protocolInfo
    </Filter>
    <StartingIndex>0</StartingIndex>
    <RequestedCount>10</RequestedCount>
    <SortCriteria>-dc:date</SortCriteria>
    </u:Browse>
    </s:Body>
    </s:Envelope>

    The 4th last line asks for '-dc:date'. Is there anything I can do on the server side to prevent the client asking for '-dc:date'?
    • It seems that I solved this issue. I added
      
      
      <DeviceQuirks>
      <Quirk>IGNORESORT</Quirk>
      </DeviceQuirks>

      to my client specific device description file (below ~/resorces/devicedb) and voila, my DLNA client shows the folder inventory in alphanumeric order, still having '+pv:source' in place within view-definition.xml.

      I've checked the log file, the client continues to request '-dc:date' but it seems TwonkyServer ignores that request and applies default sorting creteria, which is '+pv:source' in my environment.

      --coreDump
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • phibertron
    One possible thing to look at

    In the clients.db from version 6.x


    // XM IGNORESORT - client gives funny sort orders, ignore these


    This is done differently in version 7.x

    If you look at 00Readme.txt and 00Template.txt in the devicedb folder
    they make note of the changes made to client profiles

    If read them correctly you should be able to use it as a quirk


    <DeviceQuirks>
    <Quirk>IGNORESORT</Quirk>
    </DeviceQuirks>
    • Hi philbertron,

      Yes, that did the trick. I've found it indeed in device definition files of other client brands and I just gave it a try. But still, I need '+pv:source' as sort criteria in view-definitions.xml which is, as far as I can see, a bit undocumented. It would have been nice if Twonky would have been document all possible database keys as well as their meaning. This finding was just by chance, at least from my point of view.

      --coreDump
    • you finding 'pv:source' is indeed a nice little nugget =)
      did you come across any other unknown fields while peeking at the db?
      I agree it would be nice to have some updated technical documentation
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited