all repos

rss-tools @ 58cc1bd492af31e6c9acf65e690474c8c1edf164

get rss feed from sources that(i need and) dont provide one
2 files changed, 9 insertions(+), 1 deletions(-)
twitch: add channel link as feed site url
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-06-02 13:52:19 +0300
Authored at: 2026-06-02 13:51:04 +0300
Change ID: xqrsxkupslnktnnklvvkptrxqsxxqylp
Parent: a5ac527
M app/atom/feed.go
···
        34
        34
         	return f

      
        35
        35
         }

      
        36
        36
         

      
        
        37
        +func (f *Feed) WithLink(rel, href string) *Feed {

      
        
        38
        +	if href != "" {

      
        
        39
        +		f.Link = append(f.Link, Link{Rel: rel, Href: href})

      
        
        40
        +	}

      
        
        41
        +	return f

      
        
        42
        +}

      
        
        43
        +

      
        37
        44
         func (f *Feed) Add(entry *Entry) *Feed {

      
        38
        45
         	if entry != nil {

      
        39
        46
         		f.Entry = append(f.Entry, entry)

      
M sources/twitch/twitch.go
···
        92
        92
         		return

      
        93
        93
         	}

      
        94
        94
         

      
        95
        
        -	feed := atom.NewFeed("Twitch: "+name, "twitch:"+name)

      
        
        95
        +	feed := atom.NewFeed("Twitch: "+name, "twitch:"+name).

      
        
        96
        +		WithLink("alternate", "https://twitch.tv/"+name)

      
        96
        97
         	if stream != nil {

      
        97
        98
         		feed.Add(entryFromStream(stream))

      
        98
        99
         	}