Esempio n. 1
0
 public TrackRequestedArgs(string user, IPAddress host, MusicBeeDatabase db, Track track)
 {
     this.user  = user;
     this.host  = host;
     this.db    = db;
     this.track = track;
 }
Esempio n. 2
0
 public Server(string name, MusicBeeDatabase db, MusicBeeRevisionManager revisionManager)
 {
     ws              = new WebServer(port, OnHandleRequest);
     musicBeeDb      = db;
     revmgr          = revisionManager;
     serverInfo.Name = name;
     ws.Realm        = name;
 }
Esempio n. 3
0
        internal static void FromPlaylistNode(MusicBeeDatabase db, ContentNode node, out Track track, out int containerId)
        {
            track       = null;
            containerId = 0;

            foreach (ContentNode field in (ContentNode[])node.Value)
            {
                switch (field.Name)
                {
                case "dmap.itemid":
                    track = db.LookupTrackById((int)field.Value);
                    break;

                case "dmap.containeritemid":
                    containerId = (int)field.Value;
                    break;

                default:
                    break;
                }
            }
        }