Beispiel #1
0
//-----------------------------
void	APICALL MyPeercastApp::channelUpdate(ChanInfo *info)
{
	if (lastPlayID.isSet() && info && info->id.isSame(lastPlayID))
	{

		String tmp;
		tmp.append(info->track.artist);
		tmp.append(" ");
		tmp.append(info->track.title);


		if (!tmp.isSame(trackTitle))
		{
			if (ServMgr::NT_TRACKINFO & peercastInst->getNotifyMask())
			{
				trackTitle=tmp;
				clearChannelPopup();
				channelPopup(info->name.cstr(),trackTitle.cstr());
			}
		} else if (!info->comment.isSame(channelComment))
		{
			if (ServMgr::NT_BROADCASTERS & peercastInst->getNotifyMask())
			{
				channelComment = info->comment;
				clearChannelPopup();
				channelPopup(info->name.cstr(),channelComment.cstr());
			}
		}



	}
}
Beispiel #2
0
//-----------------------------
void	APICALL MyPeercastApp::channelUpdate(ChanInfo *info)
{
    if (info)
    {
        PopupEntry *pe = getPopupEntry(info->id);
        if (!pe) return;

        String tmp;
        tmp.append(info->track.artist);
        tmp.append(" ");
        tmp.append(info->track.title);


        if (!tmp.isSame(pe->track))
        {
            pe->name = info->name;
            pe->track = tmp;
            if (ServMgr::NT_TRACKINFO & peercastInst->getNotifyMask())
            {
                //trackTitle=tmp;
                String name,track; //JP-Patch
                name = info->name; //JP-Patch
                track = tmp; //JP-Patch
                name.convertTo(String::T_SJIS); //JP-Patch
                track.convertTo(String::T_SJIS); //JP-Patch
                if(!isIndexTxt(info))	// for PCRaw (popup)
                {
                    clearChannelPopup();
                    //	channelPopup(info->name.cstr(),trackTitle.cstr());
                    channelPopup(name.cstr(),track.cstr()); //JP-Patch
                }
            }
        } else if (!info->comment.isSame(pe->comment))
        {
            pe->name = info->name;
            pe->comment = info->comment;
            if (ServMgr::NT_BROADCASTERS & peercastInst->getNotifyMask())
            {
                //channelComment = info->comment;
                String name,comment; //JP-Patch
                name = info->name; //JP-Patch
                comment = info->comment; //JP-Patch
                name.convertTo(String::T_SJIS); //JP-Patch
                comment.convertTo(String::T_SJIS); //JP-Patch
                if(!isIndexTxt(info))	// for PCRaw (popup)
                {
                    clearChannelPopup();
                    //	channelPopup(info->name.cstr(),channelComment.cstr());
                    channelPopup(name.cstr(),comment.cstr());
                }
            }
        }

        if (!isIndexTxt(info))
            putPopupEntry(pe);
        else
            delete pe;
    }
}
Beispiel #3
0
//-----------------------------
void	APICALL MyPeercastApp::channelStop(ChanInfo *info)
{
//	if (info->id.isSame(lastPlayID))
//	{
//		lastPlayID.clear();
//
//		if(!isIndexTxt(info))	// for PCRaw (popup)
//			clearChannelPopup();
//	}

    PopupEntry *pe = getPopupEntry(info->id);
    if (pe) delete pe;

    pe = getTopPopupEntry();
    if (!pe) {
        clearChannelPopup();
    } else {
        if (ServMgr::NT_TRACKINFO & peercastInst->getNotifyMask())
        {
            String name,track; //JP-Patch
            name = pe->name; //JP-Patch
            track = pe->track; //JP-Patch
            name.convertTo(String::T_SJIS); //JP-Patch
            track.convertTo(String::T_SJIS); //JP-Patch
            clearChannelPopup();
            //	channelPopup(info->name.cstr(),trackTitle.cstr());
            channelPopup(name.cstr(),track.cstr(), false); //JP-Patch
        }
        putPopupEntry(pe);
    }
}