Playing order

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Playing order

Post by rkimber » Sat Nov 22, 2014 4:21 pm

I have a WD MyCloud which has Twonky on it. I want to play music via a Pioneer N-50 using the Pioneer Control app on a Nexus 7.

Is there a way of configuring Twonky on the WD so that I can play numbered files in numerical order? E.g. if I have a CD in a folder I want to be able to play the tracks in the same order that they would be played from a CD player. This seems to me to be the most natural way to listen to music, yet I can't see how to do it.

Alternatively, is there a Twonky app that will run on a Nexus 7 that will allow me to do this?

I'm able to do this easily using a dlna server on my PC (both Asset and minidlna will do it), but I'm looking for a solution that doesn't require my PC to be on.

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Mon Nov 24, 2014 6:13 pm

are the tracks set with a track number tag?

if they are, not using the "by folder" section try "by album",
do they play in the order expected?

they used to have an app in the app store, they might not have it anymore
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Mon Nov 24, 2014 11:01 pm

Each track in each folder is a file that has a name of the form 01-xxxy.flac, 02-xxxxyz.flac ... etc.

I've tried 'by folder'. I'll see if 'by album' makes a difference.

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Mon Nov 24, 2014 11:58 pm

I tried 'by album', but that produces an alphabetical list of folders based on tags, and thus many entries are unintelligible e.g. there's one called 'Bitperfect'.

My music is organised by composer, then by opus, then by numbered track. I can't understand why it's so difficult for such a simple structure to be represented by Twonky.

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Tue Nov 25, 2014 1:17 pm

[quote="phibertron"]are the tracks set with a track number tag?
[/quote]

Sorry I missed the significance of this. No there's no track number tag - at least not consistently. The numbering is in the filename. It would not be possible to edit the tags - there's about 16,000 files (1.2 TB)

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Tue Nov 25, 2014 4:50 pm

No there's no track number tag - at least not consistently. The numbering is in the filename
That and how the twonky navtree work is the issue

It is possible to make it stop doing it though without having to tag or retag stuff
you are going to have to SSH into the WD and edit the navtree code
I would recommend using WinSCP over Putty for ease of text editing

In the folder "/usr/local" there will be a folder for twonky, it might be called something like twonkymedia
in there will be a folder called "resources" and in there will be a folder called "views"
For example only:
/usr/local/twonkymedia/resources/views
In the views folder there will be a file called "view-definitions.xml"
that is the file that needs to edited, its jus plain text
I would make copy of it and or its contents before making any changes

In a nutshell, in the main music section
<container name='music' id='music' upnp:originalTrackNumber='1'
you are going to change all references of this
sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber'
to become this,
NOTE: if you were wondering
you do NOT want to use +dc:title in its place as that is NOT its filename, its the title tag
just make it bank like below to force by filename
sortcriteria=''
Once you have made the changes save the changes, and restart the NAS for changes to take effect

[img]
https://hbx8uw-bn1306.files.1drv.com/y2 ... jpg?psid=1
[/img]
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Tue Nov 25, 2014 6:22 pm

Many thanks indeed. :D

I'll check out how to ssh into the WD. I think WD uses some version of linux, which I do mostly; so it shouldn't be too difficult.

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Tue Nov 25, 2014 7:08 pm

your welcome, you can enable ssh with this url

http://{NAS Address}/UI/ssh

username: root
password: welc0me
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Tue Nov 25, 2014 8:58 pm

Actually it was easier than I expected.

Unfortunately, however, it doesn't seem to have made any difference.

Maybe there is some other setting that also needs to be changed?

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Wed Nov 26, 2014 3:53 am

In the twonky web interface
goto settings, then sharing, then look under Media Receivers
what is your Pioneer N-50 being assigned for a Media Receiver Type?
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Wed Nov 26, 2014 1:35 pm

phibertron wrote:In the twonky web interface
goto settings, then sharing, then look under Media Receivers
what is your Pioneer N-50 being assigned for a Media Receiver Type?
Media Receiver Type is set to "Pioneer", though I notice there is another option for "Pioneer DMP", but I assume that's a different product.

Navigation Type was set to "Advanced Media navigation", but I also tried "By Folder"

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Wed Nov 26, 2014 2:00 pm

How about: above the music container there is a line (line 2)

<navtree sortcriteria='+upnp:originalTrackNumber'>

should this also be

<navtree sortcriteria=''>

?

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Wed Nov 26, 2014 4:28 pm

that line is so that one can assign a tracknumber to root containers
so that they could made to appear in a different order
I use it to make the videos folder show first on my dlna clients

when you made the changes to the navtree and saved them
you did restart the nas right?
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Wed Nov 26, 2014 6:06 pm

phibertron wrote: when you made the changes to the navtree and saved them
you did restart the nas right?
Yes. When that didn't seem to have had an effect I then rebuilt the database too.

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Wed Nov 26, 2014 9:10 pm

yeah, I almost forgot, sort order changes do need a DB rebuild
but you did that, so that's not it

maybe check to see if the pioneer has a sort order on the device?

maybe add this line to the client profile, "Pioneer.xml", might help

Code: Select all

<Quirk>IGNORESORT</Quirk>
it is probably located here
/usr/local/twonkymedia/resources/devicedb/Pioneer
So that it loos like this, save it and restart twonky and or nas

Code: Select all

<Client>
	<DeviceId>
		<DisplayName>Pioneer</DisplayName>
		<DeviceDescriptionRecognition BoolOp="OR">
			<DescriptionText>PIONEER CORPORATION</DescriptionText>
			<DescriptionText>Pioneer Corporation</DescriptionText>
		</DeviceDescriptionRecognition>
		<MappingUpdatePolicy>FIX</MappingUpdatePolicy>
	</DeviceId>
	<Adaptations>
		<DLNA>
			<Version>DLNA15</Version>
		</DLNA>
	</Adaptations>
	<DeviceQuirks>
		<Quirk>FORCE_4TH_FIELD</Quirk>
		<Quirk>IGNORESORT</Quirk>
	</DeviceQuirks>	
</Client>
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Thu Nov 27, 2014 2:11 pm

I really appreciate your attempts to help.

Unfortunately editing Pioneer.xml doesn't work either. I rebuilt the database. Though at the first attempt I got "Media Server Database Internal Server Error 400162". I then rebooted the NAS and the rebuild continued and seemed to finish without error.

Neither the N-50 nor the Android control app have any sort controls. The only user info they accept are stuff like IP address and screen brightness.

Since minidlna works fine from my PC, I suppose a last resort might be to install it on the NAS, but I'm not keen. I'd only want to try that when all Twonky avenues have been explored.

I guess, in an ideal world, what's needed -rather than turning off the sortcriteria - is an explicit sort option that enables the user to choose an alhanumeric sort-by-filename. BTW, could it be that Twonky is only using alphabetic [A..z] sorting and is ignoring the numeric chars? Or maybe alphabetic chars have some kind of priority in the searching?

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Fri Nov 28, 2014 5:40 pm

Unfortunately editing Pioneer.xml doesn't work either. I rebuilt the database. Though at the first attempt I got "Media Server Database Internal Server Error 400162". I then rebooted the NAS and the rebuild continued and seemed to finish without error.
Its possible that this could have borked things up
I guess, in an ideal world, what's needed -rather than turning off the sortcriteria - is an explicit sort option that enables the user to choose an alhanumeric sort-by-filename.
Sadly it doesn't exist, myslef and many others begged for it =(
BTW, could it be that Twonky is only using alphabetic [A..z] sorting and is ignoring the numeric chars? Or maybe alphabetic chars have some kind of priority in the searching?
I know that if the sortciteria is taken out of the equation, it uses alpha numeric filename sorting
I know that some clients will do what they want no matter what the serer says
an example would the xbox 360, it alpha numeric sorts by title no matter what, game over
some other clients do this, but the ignoresort quirck allows us to fix that scenario

Just to see something, if you manually play some random music files
then go check the recently played playlist folder
what order do they appear in?
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Mon Dec 01, 2014 5:42 pm

phibertron wrote: Just to see something, if you manually play some random music files
then go check the recently played playlist folder
what order do they appear in?
They appear in sorted order of track title and not in the order they were played.

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Tue Dec 02, 2014 4:49 pm

No that is odd, as it should be using pv:lastPlayedTime as its sort criteria

<container name='playlistlastplayedaudio' filteron='pv:lastPlayedTime' albumart='1' sortcriteria='-pv:lastPlayedTime'

When you edited the view-definitions.xml did you change its sortcriteria in any way?
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Tue Dec 02, 2014 6:33 pm

Ah. Yes I thought it was all part of the music container. You can see what I did here https://www.dropbox.com/s/3z71e2cv1q25w ... s.xml?dl=0

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Tue Dec 02, 2014 6:57 pm

I wonder if when we did change the sort to this sortcriteria=''
that maybe some how twonky might be doing something when it is blank
maybe if we change it to this sortcriteria='+upnp:originalTrackNumber'
save it, restart the server, and then do db rebuild
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Wed Dec 03, 2014 4:50 pm

phibertron wrote:I wonder if when we did change the sort to this sortcriteria=''
that maybe some how twonky might be doing something when it is blank
maybe if we change it to this sortcriteria='+upnp:originalTrackNumber'
save it, restart the server, and then do db rebuild
Thanks. I tried that, but sadly it made no difference. I'm beginning to wonder whether WD have installed a non-standard version of the server. Maybe they have tweaked Twonky, as it were. The WD UI reports the version as "7.2.9_7.5.0-43". The Twonky Status page reports the version as "7.2.9". They certainly have implemented their own interface to the server for admin purposes and one can do things like rebuidling the database without accessing the Twonky server page. I have tried both interfaces.

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Playing order

Post by phibertron » Wed Dec 03, 2014 5:49 pm

bummer
I think that it might be a good idea to see if you can get things working as expected from a trial install of twonky on a pc perhaps?
as doing that would take the probability of the WD 7.2.9 out of the equation

http://www.twonkyforum.com/downloads/7.2.8/
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

rkimber
Posts: 15
Joined: Sat Nov 22, 2014 3:39 pm
AV Hardware: WD MyCloud 4TB
Pioneer N-50

Re: Playing order

Post by rkimber » Thu Dec 04, 2014 2:14 pm

phibertron wrote:bummer
I think that it might be a good idea to see if you can get things working as expected from a trial install of twonky on a pc perhaps?
as doing that would take the probability of the WD 7.2.9 out of the equation

http://www.twonkyforum.com/downloads/7.2.8/
OK. Thanks. That might take a while, as I have some other jobs pending.

Locked