Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #139

Open
wants to merge 868 commits into
base: Adult
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
868 commits
Select commit Hold shift + click to select a range
7872410
Merge remote-tracking branch 'MediaBrowser/master'
tolotos-rgu Sep 10, 2015
822cd4b
TunerHost interface implemented in LiveTvService class
tolotos-rgu Sep 10, 2015
6317468
Deliver tuner info as tvheadend sends
tolotos-rgu Sep 10, 2015
f8678d0
ios media sync
LukePulverenti Sep 11, 2015
bc5fb27
update components
LukePulverenti Sep 20, 2015
ef002cc
Duplicate license file removed
tolotos-rgu Sep 29, 2015
925f58d
update components
LukePulverenti Sep 29, 2015
b24a740
Fix for Import from Trakt task
angelblue05 Oct 4, 2015
f84c9ad
Merge pull request #86 from angelblue05/master
LukePulverenti Oct 4, 2015
4594c70
update components
LukePulverenti Oct 4, 2015
f22ef6b
Redesign for ITunerHost interfce
tolotos-rgu Oct 9, 2015
b4b62fa
Name of the LivTvService changed
tolotos-rgu Oct 9, 2015
8c13fbf
New hts connection handler added
tolotos-rgu Oct 11, 2015
017ea8b
fix repeated folder syncing
LukePulverenti Oct 16, 2015
3d90782
Fix Series Recording + Add Argus to Solution
SvenVandenbrande Oct 25, 2015
61da36a
update xml saver
LukePulverenti Oct 31, 2015
b1a9aa4
Event handling changed
tolotos-rgu Oct 31, 2015
15a70cc
use json.net to serialize since bad mono serialization issues.
lalmanzar Oct 31, 2015
7e3d291
Merge pull request #87 from lalmanzar/master
LukePulverenti Nov 1, 2015
652afe7
Logging to channed events queries added
tolotos-rgu Nov 1, 2015
01bb469
Revert use of json.net
lalmanzar Nov 1, 2015
419a333
Merge pull request #88 from lalmanzar/master
LukePulverenti Nov 1, 2015
1e0bea7
add using statements to trakt + retry
LukePulverenti Nov 6, 2015
16d8ef6
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
SvenVandenbrande Nov 12, 2015
80ca2f6
Support Subchannels + Update Tuner status information
SvenVandenbrande Nov 12, 2015
f82421b
Merge pull request #90 from SvenVandenbrande/master
LukePulverenti Nov 12, 2015
0b605de
update logging
LukePulverenti Nov 23, 2015
505f1f3
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti Nov 23, 2015
b5ea0ab
update promises
LukePulverenti Nov 28, 2015
4cd0280
Update promises
LukePulverenti Nov 28, 2015
3bedd2c
update project files
LukePulverenti Nov 28, 2015
fa07819
Fix some SeriesRecording stuff
SvenVandenbrande Dec 6, 2015
5151ee9
Merge pull request #92 from SvenVandenbrande/master
LukePulverenti Dec 6, 2015
ffb5c72
Merge pull request #93 from tolotos-rgu/master
LukePulverenti Dec 14, 2015
1d02376
update promises
LukePulverenti Dec 14, 2015
da5ee68
update promises
tolotos-rgu Dec 14, 2015
6b2ea2c
Logging for channel handling added
tolotos-rgu Dec 14, 2015
f12b5fd
Merge pull request #94 from tolotos-rgu/master
LukePulverenti Dec 14, 2015
b617917
Merge pull request #1 from MediaBrowser/master
tolotos-rgu Dec 14, 2015
f589c84
Connect to TVH server only if a query from emby is received.
tolotos-rgu Jan 10, 2016
d0ad0ec
Merge pull request #96 from tolotos-rgu/master
LukePulverenti Jan 10, 2016
cba6a13
not all emby calls opened the connection to tvh - fixed now
tolotos-rgu Jan 10, 2016
a7261a5
Merge pull request #97 from tolotos-rgu/master
LukePulverenti Jan 10, 2016
259d55d
Donation removed
tolotos-rgu Jan 23, 2016
5fef614
Merge pull request #98 from tolotos-rgu/master
LukePulverenti Jan 23, 2016
cf63292
Cometic changes to plugin description and protocol display
Jan 25, 2016
1711b8a
Add support for DVB subtitles and multiple audio tracks detection
Jan 25, 2016
7144590
Added configuration option to enable or disable support for DVB subti…
Jan 26, 2016
ab1364e
Merge pull request #2 from casasfernando/master
tolotos-rgu Jan 26, 2016
fe4cd57
Merge pull request #99 from tolotos-rgu/master
LukePulverenti Jan 26, 2016
2afb810
Changed IsInterlaced parameter
SvenVandenbrande Jan 30, 2016
a7cc3c6
Merge pull request #100 from SvenVandenbrande/master
LukePulverenti Jan 30, 2016
8ef32fc
update google drive instructions
LukePulverenti Feb 7, 2016
8680599
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti Feb 7, 2016
d008649
update config pages
LukePulverenti Feb 8, 2016
f5bde55
update config page
LukePulverenti Feb 8, 2016
615833b
added lastfm scrobbler
LukePulverenti Feb 18, 2016
80c39e2
Log errors in CHannelDataHelper
tolotos-rgu Feb 20, 2016
792ff56
Log probe results
tolotos-rgu Feb 20, 2016
be36caf
Merge pull request #101 from tolotos-rgu/master
LukePulverenti Feb 20, 2016
57038f8
picon support for png images added
tolotos-rgu Feb 24, 2016
896f524
Merge pull request #102 from tolotos-rgu/master
LukePulverenti Feb 24, 2016
6619e4c
Check image type
tolotos-rgu Feb 25, 2016
3258878
Send only png to emby - convert images
tolotos-rgu Feb 29, 2016
b3d81d7
Support for minor channel number added
tolotos-rgu Feb 29, 2016
b9837b5
Channel and event logging added again due to questions in the forum.
tolotos-rgu Mar 1, 2016
f714eae
LiveTvTunerInfo - CanReset added
tolotos-rgu Mar 7, 2016
71fa398
Merge pull request #3 from MediaBrowser/master
tolotos-rgu Mar 7, 2016
40ebb41
Merge pull request #103 from tolotos-rgu/master
LukePulverenti Mar 7, 2016
a1c69a3
Merge remote-tracking branch 'refs/remotes/MediaBrowser/master'
tolotos-rgu Mar 7, 2016
049488d
fixes #104
LukePulverenti Mar 12, 2016
e87b983
Prepare for BasicAuth in HTTP headers.
tolotos-rgu Mar 18, 2016
d269e70
update config pages
LukePulverenti Mar 26, 2016
edff0a0
fix roku plugin
LukePulverenti Apr 9, 2016
37fd6f8
Add Commodore 64 support for .t64 files
Pengwyns May 4, 2016
1124331
Add media stub for Xbox
Pengwyns May 4, 2016
04b7352
Add media stubs for new consoles
Pengwyns May 4, 2016
b1ffbc5
Add TgdId for new consoles
Pengwyns May 4, 2016
8e8fc01
Add new consoles to configuration page
Pengwyns May 4, 2016
bafea2b
Add tgdbPlatformStrings for new consoles
Pengwyns May 4, 2016
59f946b
Add GetGameSystemFromPlatform for new consoles
Pengwyns May 4, 2016
a527395
Add GetDisplayMediaTypeFromPlatform for new consoles
Pengwyns May 4, 2016
01dc3a0
Fix NesGame for Wii
Pengwyns May 4, 2016
5113786
Revert "Fix NesGame for Wii"
Pengwyns May 4, 2016
4127394
Merge pull request #107 from Pengwyns/master
LukePulverenti May 8, 2016
c620513
Merge remote-tracking branch 'refs/remotes/MediaBrowser/master'
Pengwyns May 11, 2016
d05047b
update components
LukePulverenti May 11, 2016
7bac232
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti May 11, 2016
6ae0ca2
Remove dependency on Mediabrowser.Model.Games
Pengwyns May 11, 2016
35f375c
Merge pull request #109 from Pengwyns/master
LukePulverenti May 11, 2016
c81325b
Added configuration option to enable or disable forced video deinterl…
May 12, 2016
eaf56d2
Merge pull request #4 from casasfernando/master
tolotos-rgu May 12, 2016
b7a1a93
More logging for probe
tolotos-rgu May 13, 2016
c9f6dd9
Merge branch 'master' of https://github.com/tolotos-rgu/MediaBrowser.…
tolotos-rgu May 13, 2016
fb5fb84
update providers
LukePulverenti May 14, 2016
5cc0d43
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti May 14, 2016
9c644a9
Reactivated and updated ADE provider
softworkz May 20, 2016
d396e96
Update to MediaBrowser.Server.Core version 3.0.648
tolotos-rgu May 24, 2016
2a99048
Merge remote-tracking branch 'refs/remotes/MediaBrowser/master'
tolotos-rgu May 24, 2016
2b3c840
Merge remote-tracking branch 'refs/remotes/MediaBrowser/master'
tolotos-rgu May 24, 2016
07a4226
Revert "Update to MediaBrowser.Server.Core version 3.0.648"
tolotos-rgu May 24, 2016
04a8ef6
Merge remote-tracking branch 'refs/remotes/origin/master' into MediaB…
tolotos-rgu May 24, 2016
38b6abf
running version
tolotos-rgu May 24, 2016
c507016
nuget update again
tolotos-rgu May 24, 2016
9289508
Merge pull request #111 from tolotos-rgu/master
LukePulverenti May 25, 2016
4777210
update components
LukePulverenti May 25, 2016
ee5ec21
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti May 25, 2016
3a84999
Merge pull request #110 from softworkz/AdeProvider
LukePulverenti May 26, 2016
e420e78
update nuget
LukePulverenti May 31, 2016
81f693a
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti May 31, 2016
62559c3
fix xml plugin
LukePulverenti Jun 14, 2016
18107e4
update components
LukePulverenti Jun 25, 2016
966606f
update trakt played date
LukePulverenti Jun 26, 2016
6b60c51
fix gamebrowser compilation
LukePulverenti Jun 27, 2016
04905ad
Remove direct-stream only requirement
speechles Jul 6, 2016
d946787
Merge pull request #114 from speechles/patch-1
LukePulverenti Jul 6, 2016
a40e245
Add .wud to Nintendo Wii U
speechles Jul 15, 2016
cbb5063
Merge pull request #115 from speechles/patch-1
LukePulverenti Jul 15, 2016
07fbd20
New MovieOrganizer PlugIn
softworkz May 26, 2016
8a0ccc6
Fix removal of paper-tabs reference in core server
softworkz Jul 8, 2016
0ae34c9
Moved away from paper-tabs
softworkz Jul 22, 2016
a1d370c
Added MetadataViewer PlugIn
softworkz Mar 13, 2016
b58cc82
Added MetadataViewer PlugIn
softworkz Mar 13, 2016
9c14b18
Improve portability, serve files files from memory
softworkz Mar 28, 2016
2442dbe
Fix path separator for unix file systems
softworkz Apr 8, 2016
1eacd3a
Adapt to dialogHelper change
softworkz May 12, 2016
f886387
Adjusted to server changes, Added people data to view
softworkz May 13, 2016
e7514f2
MetadataViewer: Minor enhancements
softworkz May 22, 2016
2d806c5
MeadataViewer: Adjust to change in dev branch
softworkz May 28, 2016
f1c2db7
Fixed external links
softworkz May 28, 2016
55d41cb
MetadataViewer: Adjust to change in dev branch
softworkz Jul 1, 2016
cafa2f0
Fix context menu
softworkz Jul 22, 2016
51e6c13
Fix context menu - again
softworkz Jul 24, 2016
1ce6765
Merge pull request #112 from softworkz/MovieOrganizer
LukePulverenti Jul 26, 2016
84c6d3c
Merge pull request #105 from softworkz/MetadataViewer
LukePulverenti Jul 26, 2016
0eb8fd7
update components
LukePulverenti Jul 27, 2016
cbba3d7
Don't throw exception to Emby on error; Log Event sending
tolotos-rgu Aug 4, 2016
13fe69b
Don't send the DataSourceChanged event on error.
tolotos-rgu Aug 4, 2016
3988e12
Merge pull request #5 from tolotos-rgu/master
tolotos-rgu Aug 4, 2016
edb6001
Merge pull request #117 from tolotos-rgu/master
LukePulverenti Aug 5, 2016
2340bcc
Beta 4
softworkz Aug 7, 2016
8a5b956
Merge pull request #118 from softworkz/MovieOrganizer
LukePulverenti Aug 7, 2016
3cf9363
Add files via upload
crazybbs Aug 9, 2016
447bdc4
Merge pull request #119 from crazybbs/master
LukePulverenti Aug 16, 2016
6d6d2b4
Update MetadataViewer
softworkz Aug 23, 2016
8a91ec2
Merge pull request #120 from softworkz/MetadataViewer
LukePulverenti Aug 23, 2016
e4cd919
update components
LukePulverenti Aug 23, 2016
a379dea
update roku refresh
LukePulverenti Aug 23, 2016
8125148
TV Maze Provider - Initial check in
softworkz Aug 25, 2016
5802204
MetadataViewer: Fix menu visibility (was no longer displayed for seas…
softworkz Aug 25, 2016
67fcc52
Merge pull request #122 from softworkz/MetadataViewer
LukePulverenti Aug 25, 2016
52818d1
Merge pull request #121 from softworkz/TvMaze
LukePulverenti Aug 25, 2016
1ad27ce
MovieOrganizer: migrated to emby controls
softworkz Aug 27, 2016
df3bba3
Merge pull request #123 from softworkz/MovieOrganizer
LukePulverenti Aug 28, 2016
20763c4
fixes #124 - Pushover plugin doesn't show up under installed notifica…
LukePulverenti Aug 28, 2016
c31ef4e
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti Aug 28, 2016
e635d2b
TVMaze: Update packages
softworkz Aug 30, 2016
e97026e
Merge pull request #126 from softworkz/TvMaze
LukePulverenti Sep 4, 2016
6d761e9
Channel icon handling changed
tolotos-rgu Sep 10, 2016
47ea6a5
Merge pull request #6 from tolotos-rgu/MediaBrowser/master
tolotos-rgu Sep 10, 2016
3761285
Merge pull request #7 from tolotos-rgu/master
tolotos-rgu Sep 10, 2016
70eb52b
Merge pull request #8 from tolotos-rgu/MediaBrowser/master
tolotos-rgu Sep 10, 2016
e93fc18
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins…
tolotos-rgu Sep 10, 2016
1f93e50
Merge branch 'MediaBrowser-master'
tolotos-rgu Sep 10, 2016
8af76c1
csproj corrected after merge
tolotos-rgu Sep 10, 2016
70c1ac3
Merge pull request #128 from tolotos-rgu/master
LukePulverenti Sep 11, 2016
5e2449f
removed dead code
LukePulverenti Sep 12, 2016
e444a97
Ignore .vs folder
j2ghz Sep 10, 2016
ac99dbe
Add switch for history changes
j2ghz Sep 10, 2016
bb39f0b
Instead of just disabling history changes, overwrite emby data with t…
j2ghz Sep 10, 2016
f49042d
update roku config page
LukePulverenti Sep 12, 2016
611a8dc
update nextpvr config page. start updating studio cleaner config page.
LukePulverenti Sep 14, 2016
b3e0ba1
update email config
LukePulverenti Sep 16, 2016
0b3e347
update email config
LukePulverenti Sep 16, 2016
e700da3
update email config
LukePulverenti Sep 16, 2016
ba0c6df
Merge pull request #127 from j2ghz/master
LukePulverenti Sep 19, 2016
ddc2b41
update pushover config
LukePulverenti Sep 22, 2016
a5b756e
update config screens
LukePulverenti Sep 23, 2016
8f7f773
update gamebrowser config screen
LukePulverenti Sep 23, 2016
1ece8bb
Matadataviewer: Fix dialog button and scrolling
softworkz Sep 23, 2016
0a4b37a
Merge pull request #130 from softworkz/MetadataViewer
LukePulverenti Sep 24, 2016
b43f745
update folder sync config
LukePulverenti Sep 24, 2016
b7d0bc3
Set SeriesId added
tolotos-rgu Oct 3, 2016
fef6000
Merge pull request #11 from MediaBrowser/master
tolotos-rgu Oct 3, 2016
27127a3
move roku to separate repo
LukePulverenti Oct 3, 2016
ca8aaf6
Merge pull request #132 from tolotos-rgu/master
LukePulverenti Oct 4, 2016
f91eefc
web-root added to configuration
tolotos-rgu Oct 4, 2016
fd24b20
RecordingStatus Scheduled changed to New
tolotos-rgu Oct 4, 2016
b52a909
Merge pull request #133 from tolotos-rgu/master
LukePulverenti Oct 5, 2016
eaae86d
Use expression body
j2ghz Sep 12, 2016
66dce97
Clean up and split library syncing task
j2ghz Sep 12, 2016
30a595b
Cleanup and split SyncShows
j2ghz Oct 2, 2016
e23ddbb
move GameBrowser to it's own repo.
LukePulverenti Oct 7, 2016
581fff0
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti Oct 7, 2016
e75e87f
update components
LukePulverenti Oct 7, 2016
0238d39
update components
LukePulverenti Oct 8, 2016
3d59555
move studio cleaner to it's own repo
LukePulverenti Oct 9, 2016
a479e78
update components
LukePulverenti Oct 10, 2016
932c030
Merge pull request #129 from j2ghz/feature/cleanup
LukePulverenti Oct 10, 2016
4b355bc
move trakt to it's own repo
LukePulverenti Oct 10, 2016
1cda0a9
update google drive config
LukePulverenti Oct 11, 2016
e1a5759
remove trailing '/' in webroot
tolotos-rgu Oct 11, 2016
7b918c0
Merge pull request #12 from MediaBrowser/master
tolotos-rgu Oct 11, 2016
5edbb51
Merge pull request #134 from tolotos-rgu/master
LukePulverenti Oct 11, 2016
e83d01c
update components
LukePulverenti Oct 16, 2016
199c6bc
removed dead code
LukePulverenti Oct 16, 2016
297505a
update components
LukePulverenti Oct 17, 2016
1dc504f
LibraryManager added
tolotos-rgu Oct 18, 2016
a089de1
update components
LukePulverenti Oct 20, 2016
aa304ea
LibraryManager removed
tolotos-rgu Oct 23, 2016
c693cc1
GDI support removed
tolotos-rgu Oct 23, 2016
82c0a3d
Merge pull request #135 from tolotos-rgu/master
LukePulverenti Oct 23, 2016
338cadf
update packages
LukePulverenti Oct 26, 2016
e4fd7d7
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti Oct 26, 2016
b6a6d0f
update tvheadend
LukePulverenti Oct 26, 2016
b7d4189
update plugins
LukePulverenti Oct 26, 2016
7745339
update sync plugins
LukePulverenti Oct 26, 2016
a82e52b
fix bookshelf
LukePulverenti Oct 26, 2016
0f61223
update TVHeadEnd/Properties/AssemblyInfo.cs
LukePulverenti Oct 28, 2016
835595b
remove TVHeadEnd
LukePulverenti Oct 31, 2016
2d3c385
update components
LukePulverenti Nov 1, 2016
de4e668
fix google drive plugin
LukePulverenti Nov 5, 2016
8978d94
update dropbox
LukePulverenti Nov 5, 2016
3cc41de
update email notifications
LukePulverenti Dec 1, 2016
c1ff978
remove email plugin
LukePulverenti Dec 1, 2016
310ce4f
move tv maze to it's own repository
LukePulverenti Mar 12, 2017
5f04533
update xml plugin
LukePulverenti Jun 4, 2017
2e28fab
Merge remote-tracking branch 'MediaBrowser/master'
SvenVandenbrande Jun 12, 2017
ee11ca0
Fix issue when NextPVR is not on the local network
SvenVandenbrande Jun 18, 2017
5f85491
Merge pull request #140 from SvenVandenbrande/master
LukePulverenti Jun 18, 2017
119d6ed
update pushover message title
LukePulverenti Jul 6, 2017
805ff6c
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Plugins
LukePulverenti Jul 6, 2017
88fb879
update components
LukePulverenti Jul 15, 2017
2bb57da
update components
LukePulverenti Aug 9, 2017
1bfb139
Update components
LukePulverenti Aug 11, 2017
a197fb5
compatibility update
LukePulverenti Aug 13, 2017
ce99ad0
compatibility update
LukePulverenti Aug 20, 2017
e3b98b7
update components
LukePulverenti Aug 27, 2017
d43ac7b
move folder sync to it's own repo
LukePulverenti Aug 30, 2017
9ab11e9
move xmlmetadata to it's own repo
LukePulverenti Aug 31, 2017
d50eb85
move pushover to it's own repo
LukePulverenti Aug 31, 2017
e786ab1
move pushbullet to it's own repo
LukePulverenti Sep 1, 2017
a83bf09
move prowl to it's own repo
LukePulverenti Sep 2, 2017
032628e
move pushalot to it's own repo
LukePulverenti Sep 2, 2017
132ba15
move nextpvr to it's own repo
LukePulverenti Sep 2, 2017
7919a7f
move notifymyandroid to it's own repo
LukePulverenti Sep 2, 2017
7104d02
move dropbox to it's own repo
LukePulverenti Sep 11, 2017
af899a4
move google drive to it's own repo
LukePulverenti Oct 28, 2017
6f59532
move lastfm to it's own repo
LukePulverenti Jun 20, 2018
e092471
remove projects
LukePulverenti Jun 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ProgramData-UI*/
## Visual Studio
#################

.vs

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

Expand Down
Binary file modified .nuget/NuGet.exe
Binary file not shown.
9 changes: 9 additions & 0 deletions Bookshelf/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using MediaBrowser.Model.Plugins;

namespace MBBookshelf.Configuration
{
public class PluginConfiguration : BasePluginConfiguration
{

}
}
31 changes: 31 additions & 0 deletions Bookshelf/Configuration/configPage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>

<html>
<head>
<title>Emby Bookshelf</title>
</head>
<body>

<div id="mbBookshelfConfigurationPage" data-role="page" class="page type-interior pluginConfigurationPage">
<div data-role="content">
<div class="content-primary">

<h1>Emby Bookshelf</h1>
<p>To setup Emby Bookshelf, just add a media library in Emby library setup and set the content type to Books.</p>

<h1>Supported E-Book Formats</h1>
<ul>
<li>mobi</li>
<li>epub</li>
<li>pdf</li>
<li>cbr</li>
<li>cbz</li>
</ul>

</div>
</div>

</div>

</body>
</html>
238 changes: 238 additions & 0 deletions Bookshelf/Extensions/XmlExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
using System;
using System.Globalization;
using System.Xml;

namespace MBBookshelf.Extensions
{
/// <summary>
/// Class XmlExtensions
/// </summary>
public static class XmlExtensions
{

/// <summary>
/// Safes the get int32.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <returns>System.Int32.</returns>
public static int SafeGetInt32(this XmlDocument doc, string path)
{
return SafeGetInt32(doc, path, 0);
}

/// <summary>
/// Safes the get int32.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <param name="defaultInt">The default int.</param>
/// <returns>System.Int32.</returns>
public static int SafeGetInt32(this XmlDocument doc, string path, int defaultInt)
{
XmlNode rvalNode = doc.SelectSingleNode(path);
if (rvalNode != null && rvalNode.InnerText.Length > 0)
{
int rval;
if (Int32.TryParse(rvalNode.InnerText, out rval))
{
return rval;
}

}
return defaultInt;
}

/// <summary>
/// The _us culture
/// </summary>
private static readonly CultureInfo UsCulture = new CultureInfo("en-US");

/// <summary>
/// Safes the get single.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <param name="minValue">The min value.</param>
/// <param name="maxValue">The max value.</param>
/// <returns>System.Single.</returns>
public static float SafeGetSingle(this XmlDocument doc, string path, float minValue, float maxValue)
{
XmlNode rvalNode = doc.SelectSingleNode(path);
if (rvalNode != null && rvalNode.InnerText.Length > 0)
{
float rval;
// float.TryParse is local aware, so it can be probamatic, force us culture
if (float.TryParse(rvalNode.InnerText, NumberStyles.AllowDecimalPoint, UsCulture, out rval))
{
if (rval >= minValue && rval <= maxValue)
{
return rval;
}
}

}
return minValue;
}


/// <summary>
/// Safes the get string.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
public static string SafeGetString(this XmlDocument doc, string path)
{
return SafeGetString(doc, path, null);
}

/// <summary>
/// Safes the get string.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <param name="defaultString">The default string.</param>
/// <returns>System.String.</returns>
public static string SafeGetString(this XmlDocument doc, string path, string defaultString)
{
var rvalNode = doc.SelectSingleNode(path);

if (rvalNode != null)
{
var text = rvalNode.InnerText;

return !string.IsNullOrWhiteSpace(text) ? text : defaultString;
}

return defaultString;
}

/// <summary>
/// Safes the get DateTime.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <returns>System.DateTime.</returns>
public static DateTime? SafeGetDateTime(this XmlDocument doc, string path)
{
return SafeGetDateTime(doc, path, null);
}

/// <summary>
/// Safes the get DateTime.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <param name="defaultDate">The default date.</param>
/// <returns>System.DateTime.</returns>
public static DateTime? SafeGetDateTime(this XmlDocument doc, string path, DateTime? defaultDate)
{
var rvalNode = doc.SelectSingleNode(path);

if (rvalNode != null)
{
var text = rvalNode.InnerText;
DateTime date;
if (DateTime.TryParse(text, out date))
return date.ToUniversalTime();
}
return defaultDate;
}

/// <summary>
/// Safes the get string.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
public static string SafeGetString(this XmlNode doc, string path)
{
return SafeGetString(doc, path, null);
}

/// <summary>
/// Safes the get string.
/// </summary>
/// <param name="doc">The doc.</param>
/// <param name="path">The path.</param>
/// <param name="defaultValue">The default value.</param>
/// <returns>System.String.</returns>
public static string SafeGetString(this XmlNode doc, string path, string defaultValue)
{
var rvalNode = doc.SelectSingleNode(path);
if (rvalNode != null)
{
var text = rvalNode.InnerText;

return !string.IsNullOrWhiteSpace(text) ? text : defaultValue;
}
return defaultValue;
}

/// <summary>
/// Reads the string safe.
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>System.String.</returns>
public static string ReadStringSafe(this XmlReader reader)
{
var val = reader.ReadElementContentAsString();

return string.IsNullOrWhiteSpace(val) ? null : val;
}

/// <summary>
/// Reads the value safe.
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>System.String.</returns>
public static string ReadValueSafe(this XmlReader reader)
{
reader.Read();

var val = reader.Value;

return string.IsNullOrWhiteSpace(val) ? null : val;
}

/// <summary>
/// Reads a float from the current element of an XmlReader
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>System.Single.</returns>
public static float ReadFloatSafe(this XmlReader reader)
{
string valueString = reader.ReadElementContentAsString();

float value = 0;

if (!string.IsNullOrWhiteSpace(valueString))
{
// float.TryParse is local aware, so it can be probamatic, force us culture
float.TryParse(valueString, NumberStyles.AllowDecimalPoint, UsCulture, out value);
}

return value;
}

/// <summary>
/// Reads an int from the current element of an XmlReader
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>System.Int32.</returns>
public static int ReadIntSafe(this XmlReader reader)
{
string valueString = reader.ReadElementContentAsString();

int value = 0;

if (!string.IsNullOrWhiteSpace(valueString))
{
int.TryParse(valueString, out value);
}

return value;
}
}
}
Loading