Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions: (6 Items)
   
How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions  
Hi,

Just wonder how to  place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod 
track session, which mentioned by the development guide document of Aviage. 

I am currently using Aviage 1.2 formal release version,  and using the explore API functions to browsing iPod categories
,  then create the corresponding file-base track session to play tracks on iPod. Due to the problem of iPods manage 
their own track sessions, consequently, I am facing a problem of repeatedly playing tracks on the iPod as the example 
below:

A, B, C, D, E
B, C, D, E
C, D, E
D, E
E

For solving the problem, the development guide of Aviage suggests that place only on fid in MME track session. It seems 
there is no MME API function to do that directly. To attain this goal, does it mean we need to modify the trksessionview
 table manually? And if yes, just wonder is there any suggested way to modify the table ? Thanks.

Regards,
Chris
Re: How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions  
You can create a file-based track session with only the "A" file in the 
tracksession.  (ie, don't add A through E, just A)  When you play this 
tracksession the MME will tell the iPod to play this file; the iPod will 
oblige, adding the rest of the files in the same "directory" to its 
playback engine automatically.

-- 
Ryan J. Allen
QNX Software Systems


Chris Li wrote:
> Hi,
> 
> Just wonder how to  place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod
 track session, which mentioned by the development guide document of Aviage. 
> 
> I am currently using Aviage 1.2 formal release version,  and using the explore API functions to browsing iPod 
categories,  then create the corresponding file-base track session to play tracks on iPod. Due to the problem of iPods 
manage their own track sessions, consequently, I am facing a problem of repeatedly playing tracks on the iPod as the 
example below:
> 
> A, B, C, D, E
> B, C, D, E
> C, D, E
> D, E
> E
> 
> For solving the problem, the development guide of Aviage suggests that place only on fid in MME track session. It 
seems there is no MME API function to do that directly. To attain this goal, does it mean we need to modify the 
trksessionview table manually? And if yes, just wonder is there any suggested way to modify the table ? Thanks.
> 
> Regards,
> Chris
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post30913
> 
Re: How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions  
> Just wonder how to  place only one fid in MME track session while using iPod 
> to avoid unintentional repetition of iPod track session, which mentioned by 
> the development guide document of Aviage. 
>
> For solving the problem, the development guide of Aviage suggests that place 
> only on fid in MME track session. It seems there is no MME API function to do 
> that directly. To attain this goal, does it mean we need to modify the 
> trksessionview table manually? And if yes, just wonder is there any suggested 
> way to modify the table ? Thanks.

This sounds like you are synchronizing the iPod and using library mode tracksessions. I would recommend that you instead
 user "explorer mode" on the iPod and use file based tracksessions to play it. As well, you should use the "fnames=short
" on the iPod driver command line for optimal performance and only fetch the titles on an as needed process using 
explorer mode.

When you are ready to play you can then use file based tracksessions and only add a single file. As well, you could add 
a folder (i.e. "/Music/Songs") as the file to play and the iPod will play the whole folder. If you play a single file, 
the iPod will start at that file and play the rest of the contents of the folder (more or less, there are some exception
 with random mode, i.e. not all songs in the database view get loaded into the playback engine when random is enabled).

Finally, just to get going with FIDs (i.e. assuming you are synchronizing the iPod, again something I don't really 
recommend) you can create a single FID traskession like this:
mmecli newtrksession l "SELECT 45 AS fid" assuming fid 45 is one of the entries from the iPod.

Regards,
Gilles
Re: How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions  
>> Just wonder how to  place only one fid in MME track session while using iPod
>> to avoid unintentional repetition of iPod track session, which mentioned by
>> the development guide document of Aviage.
>>
>> For solving the problem, the development guide of Aviage suggests that
>> place only on fid in MME track session. It seems there is no MME API
>> function to do that directly. To attain this goal, does it mean we need
>> to modify the trksessionview table manually? And if yes, just wonder is
>> there any suggested way to modify the table ? Thanks.
>
>This sounds like you are synchronizing the iPod and using library mode
>tracksessions. I would recommend that you instead user "explorer mode" on
>the iPod and use file based tracksessions to play it. As well, you should
>use the "fnames=short" on the iPod driver command line for optimal
>performance and only fetch the titles on an as needed process using
>explorer mode.
>
>When you are ready to play you can then use file based tracksessions and
>only add a single file. As well, you could add a folder (i.e.
>"/Music/Songs") as the file to play and the iPod will play the whole
>folder. If you play a single file, the iPod will start at that file and
>play the rest of the contents of the folder (more or less, there are some
>exception with random mode, i.e. not all songs in the database view get
>loaded into the playback engine when random is enabled).
>
>Finally, just to get going with FIDs (i.e. assuming you are synchronizing
>the iPod, again something I don't really recommend) you can create a
>single FID traskession like this: mmecli newtrksession l "SELECT 45 AS
>fid" assuming fid 45 is one of the entries from the iPod.

"select fid from library where fid=## limit 1" is another approach

Peter
Re: How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions  
Hi all,

Much thanks your information and advices.

> This sounds like you are synchronizing the iPod and using library mode 
> tracksessions. I would recommend that you instead user "explorer mode" on the 
> iPod and use file based tracksessions to play it. 

According to the requirement, I need to develop a way for users to browse the folders/tracks/playlists in the connected 
mediastore, so I don't use any kind of synchronization method and instead, just fully rely on explore APIs and build up 
a corresponding file-based track session to play tracks inside which based on the user selection. 


> As well, you should use the 
> "fnames=short" on the iPod driver command line for optimal performance and 
> only fetch the titles on an as needed process using explorer mode.

Yes, good idea. Previously I used "fnames=long" because it can get the track titles straightaway during exploring. 
However, it really takes time to explore the iPod which has lots of tracks in a category (e.g., more than 5000 songs in 
Songs category). The method of fetching the titles on demand is very helpful for this case or even just explore a range 
of items (i.e, the ones need to be displayed on screen) but not all in the browsing category of the iPod.


> When you are ready to play you can then use file based tracksessions and only 
> add a single file. As well, you could add a folder (i.e. "/Music/Songs") as 
> the file to play and the iPod will play the whole folder. If you play a single
>  file, the iPod will start at that file and play the rest of the contents of 
> the folder (more or less, there are some exception with random mode, i.e. not 
> all songs in the database view get loaded into the playback engine when random
>  is enabled).

For the case of playing tracks on iPods from a file-based track, to prevent unintentional repetition problem, create a 
file-based track session with only one file inside will help, just a little bit concern about the random mode and repeat
 mode. Not sure whether the iPod will shuffle or repeat all tracks in the current browsing list if the selected track 
which added in the track session is not the first track in the list (i.e., the iPod only shuffles or repeats the 
selected track and the tracks following that in the iPod playback engine, but not all tracks in the current browsing 
category), thanks.

Regards,
Chris

Re: How to place only one fid in MME track session while using iPod to avoid unintentional repetition of iPod track sessions  
> For the case of playing tracks on iPods from a file-based track, to prevent 
> unintentional repetition problem, create a file-based track session with only 
> one file inside will help, just a little bit concern about the random mode and
>  repeat mode. Not sure whether the iPod will shuffle or repeat all tracks in 
> the current browsing list if the selected track which added in the track 
> session is not the first track in the list (i.e., the iPod only shuffles or 
> repeats the selected track and the tracks following that in the iPod playback 
> engine, but not all tracks in the current browsing category), thanks.

If you have shuffle on and select a track in the database engine for playback, that track is normally put first and the 
remainder of the database selection tracks (those before the one selected for playback as well as after) are all 
shuffled. Basically, the iPod shuffles and repeats all tracks in the browsing category (if I understand your question).

Only one other point, if you are browsing the all songs, have random off and the current browsing (i.e. database) 
selection has 5000 songs and you issue a play at index 2500, the playback engine will have 5000 songs and the one you 
selected will be at index 1. However, if random was one, the playback engine could have less than 5000 songs, as iTunes 
has a per song setting "don't include in shuffle mode" which the user can set. As well, some things like audiobooks or 
podcasts, not sure anymore, are automatically excluded.

Regards,
Gilles