xtreamcodeserver


Namextreamcodeserver JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryXTreamCode server and library
upload_time2024-09-19 20:03:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseMIT License Copyright (c) 2024 o0zz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords xtream iptv server xtreamcodeserver xtreamcode
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # XTreamCode Server
XTreamCodeServer is a simple API to expose media over XTreamCode API

```
from xtreamcodeserver import *

#Create credentials test/test
credentials_provider = XTreamCodeCredentialsMemoryProvider()
credentials_provider.add_or_update_credentials(XTreamCodeCredentials("test", "test"))

#Add MyMovie.mkv to CategoryName
entry_provider = XTreamCodeEntryMemoryProvider()
category1 = XTreamCodeCategory(name="CategoryName", category_type=XTreamCodeType.VOD)
category1.add_entry(XTreamCodeVod(name="MyMovie", extension=".mkv", stream=XTreamCodeFileSystemStream("./MyMovie.mkv"), description="This is the description for MyMovie"))
entry_provider.add_category(category1)

#Start server
server_xtreamcode = XTreamCodeServer(entry_provider, None, credentials_provider)
server_xtreamcode.setup("0.0.0.0", 8081, "http://127.0.0.1")
server_xtreamcode.start()

print("Server started, it will stop automatically after 10s...")

time.sleep(10)
server_xtreamcode.stop()
```

## Compatibility
This library has been tested with various applications (Box, TV, FireStick, ....)

## Quick start
You can test it by streaming your local media with below line

`python -m xtreamcodeserver -vod /my/media/path -serie /my/media/serie`

This command line will search for "mkv, avi, mp4" movies and expose them on your network.

- Credentials: username=test&password=test
- Port: 8081

For more option refer you to the help

`python -m xtreamcodeserver -h`

## How to access my media

Below are some usefull URLs

### Server/User informations
```
http://127.0.0.1:8081/player_api.php?username=test&password=test
```
### Download playlist.m3u
```
http://127.0.0.1:8081/get.php?username=test&password=test&type=m3u_plus&output=ts
```

### Get JSON information
```
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_live_categories
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_categories
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series_categories
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_live_streams
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_streams
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series_info
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_info
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_short_epg&stream_id=1984029872
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_simple_data_table
```
	
### Stream live content
```
http://127.0.0.1:8081/live/test/test/1594066936.m3u8
http://127.0.0.1:8081/live/test/test/1594066936.ts
```
Where 1594066936 is the ID of the media to stream

### Stream vod content
```
http://127.0.0.1:8081/movie/test/test/7511585546.mkv
```

## Not supported
 - tmdb cannot be provided
 - video and audio information cannot be provided
 - cover_big and movie_image are same

## Additional link/features supported by this server (And not officially supported by XTreamCode)
 - username= password= can be replace by u= p= (Kind of shortcut)
 - m3u playlist can be filter:
```
http://127.0.0.1:8081/get.php?u=test&p=test&filter=serie
http://127.0.0.1:8081/get.php?u=test&p=test&filter=vod
http://127.0.0.1:8081/get.php?u=test&p=test&filter=live
http://127.0.0.1:8081/get.php?u=test&p=test&category_id=1111
```

## Documentation
https://xtream-ui.org/api-xtreamui-xtreamcode/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "xtreamcodeserver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "xtream, iptv, server, xtreamcodeserver, xtreamcode",
    "author": null,
    "author_email": "o0Zz <--@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d6/ee/54a1d3b0e6fcb6dec14f460dddd1c787ff1a13ad0a84e497cd76819ee3ec/xtreamcodeserver-1.1.0.tar.gz",
    "platform": null,
    "description": "# XTreamCode Server\r\nXTreamCodeServer is a simple API to expose media over XTreamCode API\r\n\r\n```\r\nfrom xtreamcodeserver import *\r\n\r\n#Create credentials test/test\r\ncredentials_provider = XTreamCodeCredentialsMemoryProvider()\r\ncredentials_provider.add_or_update_credentials(XTreamCodeCredentials(\"test\", \"test\"))\r\n\r\n#Add MyMovie.mkv to CategoryName\r\nentry_provider = XTreamCodeEntryMemoryProvider()\r\ncategory1 = XTreamCodeCategory(name=\"CategoryName\", category_type=XTreamCodeType.VOD)\r\ncategory1.add_entry(XTreamCodeVod(name=\"MyMovie\", extension=\".mkv\", stream=XTreamCodeFileSystemStream(\"./MyMovie.mkv\"), description=\"This is the description for MyMovie\"))\r\nentry_provider.add_category(category1)\r\n\r\n#Start server\r\nserver_xtreamcode = XTreamCodeServer(entry_provider, None, credentials_provider)\r\nserver_xtreamcode.setup(\"0.0.0.0\", 8081, \"http://127.0.0.1\")\r\nserver_xtreamcode.start()\r\n\r\nprint(\"Server started, it will stop automatically after 10s...\")\r\n\r\ntime.sleep(10)\r\nserver_xtreamcode.stop()\r\n```\r\n\r\n## Compatibility\r\nThis library has been tested with various applications (Box, TV, FireStick, ....)\r\n\r\n## Quick start\r\nYou can test it by streaming your local media with below line\r\n\r\n`python -m xtreamcodeserver -vod /my/media/path -serie /my/media/serie`\r\n\r\nThis command line will search for \"mkv, avi, mp4\" movies and expose them on your network.\r\n\r\n- Credentials: username=test&password=test\r\n- Port: 8081\r\n\r\nFor more option refer you to the help\r\n\r\n`python -m xtreamcodeserver -h`\r\n\r\n## How to access my media\r\n\r\nBelow are some usefull URLs\r\n\r\n### Server/User informations\r\n```\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test\r\n```\r\n### Download playlist.m3u\r\n```\r\nhttp://127.0.0.1:8081/get.php?username=test&password=test&type=m3u_plus&output=ts\r\n```\r\n\r\n### Get JSON information\r\n```\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_live_categories\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_categories\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series_categories\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_live_streams\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_streams\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series_info\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_info\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_short_epg&stream_id=1984029872\r\nhttp://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_simple_data_table\r\n```\r\n\t\r\n### Stream live content\r\n```\r\nhttp://127.0.0.1:8081/live/test/test/1594066936.m3u8\r\nhttp://127.0.0.1:8081/live/test/test/1594066936.ts\r\n```\r\nWhere 1594066936 is the ID of the media to stream\r\n\r\n### Stream vod content\r\n```\r\nhttp://127.0.0.1:8081/movie/test/test/7511585546.mkv\r\n```\r\n\r\n## Not supported\r\n - tmdb cannot be provided\r\n - video and audio information cannot be provided\r\n - cover_big and movie_image are same\r\n\r\n## Additional link/features supported by this server (And not officially supported by XTreamCode)\r\n - username= password= can be replace by u= p= (Kind of shortcut)\r\n - m3u playlist can be filter:\r\n```\r\nhttp://127.0.0.1:8081/get.php?u=test&p=test&filter=serie\r\nhttp://127.0.0.1:8081/get.php?u=test&p=test&filter=vod\r\nhttp://127.0.0.1:8081/get.php?u=test&p=test&filter=live\r\nhttp://127.0.0.1:8081/get.php?u=test&p=test&category_id=1111\r\n```\r\n\r\n## Documentation\r\nhttps://xtream-ui.org/api-xtreamui-xtreamcode/\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 o0zz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "XTreamCode server and library",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/o0Zz/xtreamcodeserver"
    },
    "split_keywords": [
        "xtream",
        " iptv",
        " server",
        " xtreamcodeserver",
        " xtreamcode"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf2d6d804ed6716e6f0ce7ce4c902e6dd929ee7a194979f5d574b7e0d2ad999e",
                "md5": "a3fe06bc8a3410165b2f6530ca2569ca",
                "sha256": "d1b0cbd988f27bd2b5dcf63e1833de096b2e6bc1d96a2d15e0e36e7119302b27"
            },
            "downloads": -1,
            "filename": "xtreamcodeserver-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a3fe06bc8a3410165b2f6530ca2569ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 42391,
            "upload_time": "2024-09-19T20:03:21",
            "upload_time_iso_8601": "2024-09-19T20:03:21.288717Z",
            "url": "https://files.pythonhosted.org/packages/cf/2d/6d804ed6716e6f0ce7ce4c902e6dd929ee7a194979f5d574b7e0d2ad999e/xtreamcodeserver-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6ee54a1d3b0e6fcb6dec14f460dddd1c787ff1a13ad0a84e497cd76819ee3ec",
                "md5": "0774eecb29acfd53c39342ee433660e0",
                "sha256": "7a480d288289e76b7a820017d9270df2d1b13d15384269b804c3fe67664e0020"
            },
            "downloads": -1,
            "filename": "xtreamcodeserver-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0774eecb29acfd53c39342ee433660e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 29501,
            "upload_time": "2024-09-19T20:03:22",
            "upload_time_iso_8601": "2024-09-19T20:03:22.702246Z",
            "url": "https://files.pythonhosted.org/packages/d6/ee/54a1d3b0e6fcb6dec14f460dddd1c787ff1a13ad0a84e497cd76819ee3ec/xtreamcodeserver-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-19 20:03:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "o0Zz",
    "github_project": "xtreamcodeserver",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xtreamcodeserver"
}
        
Elapsed time: 1.79894s