umputun / feed-master

Pulls multiple podcast feeds (RSS) and republishes as a common feed, properly sorted and podcast-client friendly.
https://feed-master.umputun.dev
MIT License
116 stars 26 forks source link

Add web page endpoints for youtube channels #96

Closed orthur closed 1 year ago

orthur commented 1 year ago

Added /yt/channels and /yt/channel/channelID endpoints for web UI

localhost_8087_yt_channel_UCTVk323gzizpujtn2T_BL7w (1)

localhost_8087_yt_channels

umputun commented 1 year ago

confused a little bit. isn't this the same thing as the current /sources, i.e. https://feedmaster.umputun.com/feed/echo-msk/sources

upd: I meant the second picture

orthur commented 1 year ago

confused a little bit. isn't this the same thing as the current /sources, i.e. https://feedmaster.umputun.com/feed/echo-msk/sources

upd: I meant the second picture

/feed/feedName/sources gets sources from feeds: field in fm.yml, but /yt/channels gets channels from youtube field

umputun commented 1 year ago

but why we even care? channels from youtube struct don't represent the actual output, but rathee yt sources used to make feeds defineds in feeds..sources. The part user see is from this feeds section, not from youtube section

orthur commented 1 year ago

I thought youtube section is separate thing for getting youtube audio and feeds section for other RSS podcasts. I use it without feeds section, hence I made web page to see which channels have set in youtube section

umputun commented 1 year ago

well, youtube part is making feeds as well, however this is done just to provide sources for the primary section. The intended use case can be seen in the provided https://github.com/umputun/feed-master/blob/master/yt-test.yml

As you can see feeds.yt-example.sources just using youtube.channels.

orthur commented 1 year ago

Yes I got it. I am fine with closing this PR if changes is not needed

umputun commented 1 year ago

I think the part of UI to show the actual list of items per channel is a useful one. It will be great if it can be adapted to work with sources. We also can replace the link from /sources to this one

orthur commented 1 year ago

what do you mean to "work with sources"?

umputun commented 1 year ago

Instead of youtube-specific /yt/channel/channelID the page should be for any source, i.e. smth like /feed/{name}/source/{src} which show the same page, but instead of making it from yt channel info, render it from the higher level feed info (i.e. s.Conf.Feeds)

orthur commented 1 year ago

what would be {src} value? id: UCWAIvx2yYLK_xTYD4F2mUNw?

umputun commented 1 year ago

what would be {src} value? id: UCWAIvx2yYLK_xTYD4F2mUNw?

the src is feeds.{name}.sources.name value, i.e. for the provided conf, it would be Точка, Живой Гвоздь, and so on

feeds:
  yt-example:
    title: Some cool channels
    description: an example of youtube-based podcast
    link: http://example.com
    language: "ru-ru"
    image: images/yt-example.png
    telegram_channel: udev_test
    sources:
      - name: Точка
        url: http://localhost:8080/yt/rss/PLZVQqcKxEn_6YaOniJmxATjODSVUbbMkd
      - name: Живой Гвоздь
        url: http://localhost:8080/yt/rss/UCWAIvx2yYLK_xTYD4F2mUNw
      - name: Дилетант
        url: http://localhost:8080/yt/rss/UCuIE7-5QzeAR6EdZXwDRwuQ
      - name: Сергей Асланян
        url: http://localhost:8080/yt/rss/UCPemWOA2UiBwhTauetmz95w
umputun commented 1 year ago

note: you last merge/rebase made this PR very confusing. I suggest to replace it on top of the current master or somehow squash. @paskal may know what git magic needed for this

paskal commented 1 year ago

git rebase upstream/master is what you need to do in your branch.

orthur commented 1 year ago

changed endpoint to /feed/name/source/source