jdaymude / xbox2local Goto Github PK
View Code? Open in Web Editor NEWA command line utility for downloading Xbox screenshots and game clips to local storage
License: MIT License
A command line utility for downloading Xbox screenshots and game clips to local storage
License: MIT License
Description
Currently, downloaded screens and clips are named according to their capture time in seconds since the epoch. This isn't great for readability. Update this to be yyyy-mm-ddThh-mm-ss
.
Description
Currently, the history.json
file only stores lists of contentId
s for previously downloaded screenshots and gameclips. Other interesting metadata about the media (date/time of capture, URI, etc.) is either lost or embedded in the filename, which isn't immediately accessible. This could be improved by splitting the history into two files, screenshots.csv
and gameclips.csv
that represent pandas DataFrames storing all the relevant metadata about downloaded entries.
As an aside, this may also help with the long-term goal of minimizing the number of API calls as described in #3.
Can you help develop and maintain this feature?
Yes.
Description
In the situation where xbox2local
is used on one device for different accounts, a more robust approach to multi-user support is needed. In particular, the current design causes history files to conflict.
Description
Unlike what is stated in the README, xbox2local does not actually raise the ERROR 403
error when the X API rate limit is exceeded. This needs to be implemented appropriately and caught whenever any X API call in xbox2local may reach the limit.
Can you help develop and maintain this feature?
Yes.
Description
Looking at the results from this code today, it does not appear to be working correctly. In the screenshot here you can see there are now dates from in the future which were taken today. I also was not creating clips at 1am... Is there a timezone issue not being taken into account from the API maybe?
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
Dates should align with the current data and reality, ie: not assign dates in the future.
Description
xbox2local makes all its X API calls using curl
and downloads all media using wget
. So despite being a Python script that runs anywhere Python is installed, these commands will of course fail on any command lines where curl
and wget
are not present or have different syntax. Support and testing need to be extended for command lines where other utilities are used for URL access.
Can you help develop and maintain this feature?
Yes.
Description
I don't know if anything changed on X API's side or what, since i only know the basics about APIs, but i been trying to use this now and can't seem to make it work.
To Reproduce
Expected Behavior
It should be able to access the API with that key but it doesn't work.
Platform
"windows-cmd"
Description
Screenshots made on the Xbox One S, Xbox One X, and Xbox Series X|S or a Windows 10/11 PC connected to an HDR10 display create two versions of the media on Xbox Live: standard and HDR. xbox2local currently only downloads the standard versions, but this should be extended. Filenames can be simply extended from standardname.png
to standardname_hdr.jxr
.
As of this writing, game clips do not have HDR captures.
Can you help develop and maintain this feature?
Yes.
Description
It may be the case that not all users want to have their screenshots and game clips remain on Xbox Live after they download them. A nice enhancement would be for xbox2local to optionally delete downloaded media from Xbox Live after successfully downloading it, e.g., with a new optional command line argument --delete_after_downloading
.
However, neither X API nor the actual Xbox Live Services RESTful API seem to support this at the moment.
Can you help develop and maintain this feature?
Yes.
Description
When attempting to sign into X API with my Microsoft account so xbox2local can call its APIs, I received the following message:
This has been disabled, as the move to Cloudflare has broken this. Please instead save your logins, and if you have 2FA enabled, create a dummy account.
Because my Microsoft account uses 2FA and I'm not particularly interested in removing that security just to get an Xbox API to work, xbox2local cannot access my Xbox account data.
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
xbox2local is working as intended; the issue is upstream.
Description
As described in the README under Troubleshooting and Gotchas ERROR 403
, xbox2local calls the X API once for authentication, once per page of screenshot results, and once per page of game clip results each time it is run. For users with large media libraries on Xbox Live, this may exceed the 60 requests per hour allowed by X API's free tier. The suggested workaround of using --media_type
to download screenshots and game clips in separate xbox2local calls (straddling over an hour reset) still may not solve the problem since some users may have over 60 pages of results for screenshots or game clips independently.
Since results pages are served in reverse-chronological order, a first improvement would stop xbox2local from querying result pages if it has reason to believe that all older pages are results it has already downloaded. This would require an extension of the download_history.json
file, most likely. However, this does not solve the problem of first-time users with large media libraries; it only helps users who start with libraries small enough to be managed by the 60 requests per hour that may outgrow this limit over time.
Alternatively, with some research into how pagination and continuationToken
information is structured, it may be possible to let the user provide a date to start downloading from, skipping unwanted calls. This is more amorphous though, and I'm not sure how it would actually work.
Can you help develop and maintain this feature?
Yes.
Description
Currently, if you download your media using xbox2local, all files will be named for their creation timestamp, but all have essentially the same file creation date history on the OS... It is possible to modify these values using python, it would be a nice bonus if xbox2local could preserve this data in a way that keeps your media sorted based on when it was actually created (outside of the file name), which would enable OS level file searching, filtering, to be usable then as well for managing backups.
Can you help develop and maintain this feature?
Maybe - Python isn't my primary language, so I am having to relearn things trying to make this work, if I solve it, I will absolutely create a pull request, but right now, I am about 0 / 5 on attempts at anything that doesn't throw new errors.
Description
Currently, the downloaded media are given filenames based on the time they were taken/recorded, yielding a chronological organization. It would be nice to enhance this further by organizing media by game:
local_dir
|---- game1_name
|---- |---- media1_time.png
|---- |---- ...
|---- ...
|---- gamen_name
|---- |---- media1_time.png
|---- |---- ...
Can you help develop and maintain this feature?
Yes.
Just downloaded and set things up, really straight forward, so thanks for a great project so far, however, I did run into this error which seems new here...
My python is a bit rusty, but, if I find a work around, I'll append an PR to address it, if it makes sense.
Scanning the Xbox network for screenshots...
Scanning the Xbox network for game clips...
Traceback (most recent call last):
File "/Users/ktiedt/repos/2023/xbox2local/xbox2local.py", line 179, in <module>
capture_dt=fmt_datetime(clip['contentSegments'][0]['recordDate']),\
File "/Users/ktiedt/repos/2023/xbox2local/xbox2local.py", line 73, in fmt_datetime
raise ValueError('ERROR: No valid date format for \'' + datestr + '\'')
ValueError: ERROR: No valid date format for '2023-03-16T03:39:09.432Z'
Description
The xbox2local script appears to be performing correctly for most all games, but there are some that are not surfaced by X API. In particular, I've experienced this with Sea of Thieves, though there may be other titles as well. However, those screenshots and game clips are definitely uploaded to Xbox Live and are visible on first- and third-party services like the Xbox iOS app, GameDVR, etc. This seems to be upstream (X API) since even the direct curl
calls do not surface any metadata, however.
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
All game media should be downloaded.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.