feed-master icon indicating copy to clipboard operation
feed-master copied to clipboard

Add web page endpoints for youtube channels

Open orthur opened this issue 3 years ago • 9 comments

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

localhost_8087_yt_channel_UCTVk323gzizpujtn2T_BL7w (1)

localhost_8087_yt_channels

orthur avatar Oct 23 '22 18:10 orthur

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

umputun avatar Oct 23 '22 18:10 umputun

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

orthur avatar Oct 23 '22 18:10 orthur

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

umputun avatar Oct 23 '22 19:10 umputun

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

orthur avatar Oct 23 '22 19:10 orthur

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.

umputun avatar Oct 23 '22 19:10 umputun

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

orthur avatar Oct 23 '22 19:10 orthur

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

umputun avatar Oct 23 '22 21:10 umputun

what do you mean to "work with sources"?

orthur avatar Oct 24 '22 17:10 orthur

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)

umputun avatar Oct 24 '22 17:10 umputun

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

orthur avatar Oct 25 '22 16:10 orthur

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 avatar Nov 20 '22 18:11 umputun

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

umputun avatar Nov 20 '22 18:11 umputun

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

paskal avatar Nov 20 '22 18:11 paskal

changed endpoint to /feed/name/source/source

orthur avatar Nov 27 '22 12:11 orthur