mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-31 15:19:42 +02:00
New data model start of PlaybackSessionManager to replace StreamManager, remove podcast & ip npm package
This commit is contained in:
parent
68b13ae45f
commit
0af6ad63c1
11 changed files with 109 additions and 116 deletions
|
@ -1,6 +1,6 @@
|
|||
const Podcast = require('podcast')
|
||||
// const Podcast = require('podcast')
|
||||
const express = require('express')
|
||||
const ip = require('ip')
|
||||
// const ip = require('ip')
|
||||
const Logger = require('./Logger')
|
||||
|
||||
// Not functional at the moment - just an idea
|
||||
|
@ -29,29 +29,31 @@ class RssFeeds {
|
|||
}
|
||||
|
||||
openFeed(audiobook) {
|
||||
var ipAddress = ip.address('public', 'ipv4')
|
||||
var serverAddress = 'http://' + ipAddress + ':' + this.Port
|
||||
Logger.info('Open RSS Feed', 'Server address', serverAddress)
|
||||
// Removed Podcast npm package and ip package
|
||||
return null
|
||||
// var ipAddress = ip.address('public', 'ipv4')
|
||||
// var serverAddress = 'http://' + ipAddress + ':' + this.Port
|
||||
// Logger.info('Open RSS Feed', 'Server address', serverAddress)
|
||||
|
||||
var feedId = (Date.now() + Math.floor(Math.random() * 1000)).toString(36)
|
||||
const feed = new Podcast({
|
||||
title: audiobook.title,
|
||||
description: 'AudioBookshelf RSS Feed',
|
||||
feed_url: `${serverAddress}/feeds/${feedId}`,
|
||||
image_url: `${serverAddress}/Logo.png`,
|
||||
author: 'advplyr',
|
||||
language: 'en'
|
||||
})
|
||||
audiobook.tracks.forEach((track) => {
|
||||
feed.addItem({
|
||||
title: `Track ${track.index}`,
|
||||
description: `AudioBookshelf Audiobook Track #${track.index}`,
|
||||
url: `${serverAddress}/feeds/${feedId}?track=${track.index}`,
|
||||
author: 'advplyr'
|
||||
})
|
||||
})
|
||||
this.feeds[feedId] = feed
|
||||
return feed
|
||||
// var feedId = (Date.now() + Math.floor(Math.random() * 1000)).toString(36)
|
||||
// const feed = new Podcast({
|
||||
// title: audiobook.title,
|
||||
// description: 'AudioBookshelf RSS Feed',
|
||||
// feed_url: `${serverAddress}/feeds/${feedId}`,
|
||||
// image_url: `${serverAddress}/Logo.png`,
|
||||
// author: 'advplyr',
|
||||
// language: 'en'
|
||||
// })
|
||||
// audiobook.tracks.forEach((track) => {
|
||||
// feed.addItem({
|
||||
// title: `Track ${track.index}`,
|
||||
// description: `AudioBookshelf Audiobook Track #${track.index}`,
|
||||
// url: `${serverAddress}/feeds/${feedId}?track=${track.index}`,
|
||||
// author: 'advplyr'
|
||||
// })
|
||||
// })
|
||||
// this.feeds[feedId] = feed
|
||||
// return feed
|
||||
}
|
||||
}
|
||||
module.exports = RssFeeds
|
Loading…
Add table
Add a link
Reference in a new issue