Пример #1
0
        private static string BuildDescription(RssEntry episode)
        {
            var item = Resources.ItemTemplate;

            foreach (var processor in Processors)
            {
                item = item.Replace(processor.Key, processor.Value(episode));
            }
            return(item);
        }
Пример #2
0
        private static Guid GetGlobalizedUid(RssEntry entry, string suffix)
        {
            var tmp = BaseGuid.ToByteArray();

            tmp[04] = (byte)((entry.Created & 0xFF000000) >> 24);
            tmp[05] = (byte)((entry.Created & 0x00FF0000) >> 16);
            tmp[06] = (byte)((entry.Created & 0x0000FF00) >> 8);
            tmp[07] = (byte)(entry.Created & 0x000000FF);
            var hash = SimpleStaticStringHashCode(suffix);

            tmp[08] = (byte)((hash & 0xFF000000) >> 24);
            tmp[09] = (byte)((hash & 0x00FF0000) >> 16);
            tmp[10] = (byte)((hash & 0x0000FF00) >> 8);
            tmp[11] = (byte)(hash & 0x000000FF);
            tmp[12] = (byte)((entry.Uid & 0xFF000000) >> 24);
            tmp[13] = (byte)((entry.Uid & 0x00FF0000) >> 16);
            tmp[14] = (byte)((entry.Uid & 0x0000FF00) >> 8);
            tmp[15] = (byte)(entry.Uid & 0x000000FF);
            return(new Guid(tmp));
        }
Пример #3
0
 protected virtual void PostProcess(RssEntry entry)
 {
 }
Пример #4
0
 protected override void PostProcess(RssEntry entry)
 {
     entry.Title = FactoryShared.BuildTorrentTitle(entry.Release.torrents.First(t => t.id == entry.Uid));
 }