Subversion Repositories mdb

Rev

Rev 30 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30 Rev 31
Line 723... Line 723...
723
}
723
}
724
 
724
 
725
define_function lineSelect(integer pl)
725
define_function lineSelect(integer pl)
726
{
726
{
727
	nLastPressedLine = pl;
727
	nLastPressedLine = pl;
-
 
728
 
-
 
729
	if (nPage == TOK_PLAYLIST && !nFolder)
-
 
730
		sActPlaylist = stSong[pl].sTitle;
-
 
731
 
728
	askMenuList();
732
	askMenuList();
729
}
733
}
730
 
734
 
731
DEFINE_START
735
DEFINE_START
732
	nStart = 1;
736
	nStart = 1;
Line 1063... Line 1067...
1063
						if (nPlayStatus == PLAYER_PLAY || nPlayStatus == PLAYER_PAUSE)
1067
						if (nPlayStatus == PLAYER_PLAY || nPlayStatus == PLAYER_PAUSE)
1064
							send_command vdvMDB, 'STOP;';
1068
							send_command vdvMDB, 'STOP;';
1065
 
1069
 
1066
						send_command vdvMDB, 'DELETE:QUEUE:-1;';
1070
						send_command vdvMDB, 'DELETE:QUEUE:-1;';
1067
						
1071
						
1068
						if (nPage == TOK_TITLE || nPage == TOK_SEARCH)
1072
						if (nPage == TOK_TITLE || nPage == TOK_SEARCH || nFolder)
1069
							send_command vdvMDB, "'PLAY:ID:',itoa(stSong[nLastPressedLine].nID),';'";
1073
							send_command vdvMDB, "'PLAY:ID:',itoa(stSong[nLastPressedLine].nID),';'";
1070
						else
1074
						else
1071
							send_command vdvMDB, "'PLAY:',requestActualPage(),':',stSong[nLastPressedLine].sTitle,';'";
1075
							send_command vdvMDB, "'PLAY:',requestActualPage(),':',stSong[nLastPressedLine].sTitle,';'";
-
 
1076
 
-
 
1077
						nFolder = 0;
-
 
1078
						nStart = 1;
-
 
1079
						nSearch = 0;
-
 
1080
						nPage = TOK_QUEUE;
-
 
1081
						send_command vdvMDB, "'LIST:QUEUE:',itoa(nStart),':',itoa(MAX_LINES),';'";
1072
					}
1082
					}
1073
					else if (nPage == TOK_PLAYLIST)
1083
					else if (nPage == TOK_PLAYLIST)
1074
					{
1084
					{
1075
						if (length_string(sActUser) && length_string(sActPlaylist))
1085
						if (length_string(sActUser) && length_string(sActPlaylist))
1076
						{
1086
						{
1077
							if (nPlayStatus == PLAYER_PLAY || nPlayStatus == PLAYER_PAUSE)
1087
							if (nPlayStatus == PLAYER_PLAY || nPlayStatus == PLAYER_PAUSE)
1078
								send_command vdvMDB, 'STOP;';
1088
								send_command vdvMDB, 'STOP;';
1079
	
1089
	
1080
							send_command vdvMDB, 'DELETE:QUEUE:-1;';
1090
							send_command vdvMDB, 'DELETE:QUEUE:-1;';
-
 
1091
 
-
 
1092
							if (!nFolder)
1081
							send_command vdvMDB, "'PLAY:PLAYLIST:',EncodeURL(sActPlaylist),';'";
1093
								send_command vdvMDB, "'PLAY:PLAYLIST:',EncodeURL(sActPlaylist),';'";
-
 
1094
							else
-
 
1095
								send_command vdvMDB, "'PLAY:ID:',itoa(stSong[nLastPressedLine].nID),';'";
-
 
1096
 
-
 
1097
							nFolder = 0;
-
 
1098
							nStart = 1;
-
 
1099
							nSearch = 0;
-
 
1100
							nPage = TOK_QUEUE;
-
 
1101
							send_command vdvMDB, "'LIST:QUEUE:',itoa(nStart),':',itoa(MAX_LINES),';'";
1082
						}
1102
						}
1083
					}
1103
					}
1084
					else if (nPage == TOK_QUEUE)
1104
					else if (nPage == TOK_QUEUE)
1085
						send_command vdvMDB, "'PLAY:QUEUE:',itoa(nStart+nLastPressedLine-1),';'";
1105
						send_command vdvMDB, "'PLAY:QUEUE:',itoa(nStart+nLastPressedLine-1),';'";
1086
				break;
1106
				break;
1087
 
1107
 
1088
				case BTN_MENU2:
1108
				case BTN_MENU2:
1089
					if (nPage != TOK_PLAYLIST && nPage != TOK_QUEUE)	// Add to queue
1109
					if (nPage != TOK_PLAYLIST && nPage != TOK_QUEUE)	// Add to queue
1090
					{
1110
					{
1091
						if (nPage == TOK_TITLE || nPage == TOK_SEARCH)
1111
						if (nPage == TOK_TITLE || nPage == TOK_SEARCH || nFolder)
1092
							send_command vdvMDB, "'ADD:ID:',itoa(stSong[nLastPressedLine].nID),';'";
1112
							send_command vdvMDB, "'ADD:ID:',itoa(stSong[nLastPressedLine].nID),';'";
1093
						else
1113
						else
1094
							send_command vdvMDB, "'ADD:',requestActualPage(),':',stSong[nLastPressedLine].sTitle,';'";
1114
							send_command vdvMDB, "'ADD:',requestActualPage(),':',stSong[nLastPressedLine].sTitle,';'";
1095
					}
1115
					}
1096
					else if (nPage == TOK_PLAYLIST)
1116
					else if (nPage == TOK_PLAYLIST)
-
 
1117
					{
-
 
1118
						if (!nFolder)
1097
						send_command vdvMDB, "'ADD:PLAYLIST:',EncodeURL(sActPlaylist),';'";
1119
							send_command vdvMDB, "'ADD:PLAYLIST:',EncodeURL(sActPlaylist),';'";
-
 
1120
						else
-
 
1121
							send_command vdvMDB, "'ADD:ID:',itoa(stSong[nLastPressedLine].nID),';'";
-
 
1122
					}
1098
					else if (nPage == TOK_QUEUE)
1123
					else if (nPage == TOK_QUEUE)
1099
					{
1124
					{
1100
						setPopup(DIR_OPEN, sPopupSelUser);
1125
						setPopup(DIR_OPEN, sPopupSelUser);
1101
						sInputUser = sActUser;
1126
						sInputUser = sActUser;
1102
						sInputPlaylist = '';
1127
						sInputPlaylist = '';