Exemplo n.º 1
0
        /// <summary>
        /// Load spefic frame information
        /// </summary>
        /// <param name="FrameID">FrameID to load</param>
        /// <param name="FileAddress">FileAddress to read tag from</param>
        private void LoadFrameFromFile(string FrameID, string FileAddress)
        {
            ID3v2 LinkedInfo = new ID3v2(false, TStream.FS);

            LinkedInfo.Filter.Add(FrameID);
            LinkedInfo.FilterType = FilterTypes.LoadFiltersOnly;
            LinkedInfo.Load();

            if (LinkedInfo.HaveError)
            {
                foreach (ID3Exception IE in LinkedInfo.Errors)
                {
                    _Errors.Add(new ID3Exception("In Linked Info(" +
                                                 FileAddress + "): " + IE.Message, IE.FrameID, IE.Level));
                }
            }

            foreach (FrameCollectionBase Coll in LinkedInfo._CollectionFrames)
            {
                if (Coll.Name == CollectionIndex.Link.ToString())
                {
                    continue;
                }

                foreach (Frame Fr in Coll)
                {
                    FrameCollection <Frame> Temp =
                        (FrameCollection <Frame>)_CollectionFrames[
                            Enum.Parse(typeof(CollectionIndex), Coll.Name)];

                    Temp.Add(Fr);
                }
            }

            foreach (Frame In in (Frame[])LinkedInfo._SingleFrames.Values)
            {
                if (_SingleFrames.ContainsKey(In.FrameID))
                {
                    _SingleFrames.Remove(In);
                }

                _SingleFrames.Add(In.FrameID, LinkedInfo._SingleFrames[In]);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create new ID3 Info class
 /// </summary>
 /// <param name="FilePath">Path to read file</param>
 /// <param name="LoadData">Indicate load data in constructor or not</param>
 public ID3Info(bool LoadData, Stream FS)
 {
     _ID3v1 = new ID3v1(LoadData, FS);
     _ID3v2 = new ID3v2(LoadData, FS);
 }