HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: zimjo on 2014-04-03 00:53:19

Title: foo_onewaysync
Post by: zimjo on 2014-04-03 00:53:19
Onewaysync exports playlists and their files to a MP3 player or any other windows path, including MTP devices. It supports on the fly conversion of audio files with various encoders.

Download (http://www.foobar2000.org/components/view/foo_ows)

Current version: 0.7.0

Changes since 0.6.4:
- improve reacting to removal of device
- improve linux style playlists

Known issues:
- unless they are converted, files with subsongs are not split during sync
- MTP devices: Tags of preexisting files are not updated, this is not a bug. Foobar can not access these files directly, therefore it is not possible to update tags without copying the entire file, which would be slow.


How do I use this component?
The component adds a context menu entry in 'File Operations' and a main menu entry in 'File'. For either of them to work properly you'll have to edit the components preferences:
- Configure the encoder setting, if you wish to transcode certain files. If you want to use lame you only need to correct the path to lame.exe in the default entry, double clicking it brings up the edit window.
- On the 'Devices' preference page:
      Add your target location, MTP devices appear automatically in the list if connected.
      Choose target location and encoder from the dropdown menus.
      Select a sync task from the list (not required for context command).
- On the 'Tasks' preference page:
      Choose a titleformatting string and select at least one playlist to sync (not required for context command).

For more information check out the wiki here (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/foo_ows). Big thanks to @tipar for creating it!

Troubleshooting
If you believe you found a bug, please report it in this thread stating the version you used and the console output from foo_ows.
In case you encounter any crashes from this component, please also share the crash log and crash dump.
Title: foo_onewaysync
Post by: mudlord on 2014-04-03 08:55:10
Is it possible to support other encoders than LAME?
I've been wanting to write a component like this for some time for my Sansa Clip Zip for syncing files both ways between my player and reencoding files.

edit: spelling
Title: foo_onewaysync
Post by: zimjo on 2014-04-03 09:49:44
Which encoder are you thinking of?
In principle, you can use any command line encoder able to handle PCM input, if it takes the two arguments source and destination filepath. The component does not care what is called, but it should produce a foobar compatible file at the expected location. However, some hardcoded command line options probably have to be adapted.
Title: foo_onewaysync
Post by: detmek on 2014-04-03 16:10:58
Any chance to support DSP during conversion and lossy-lossy conversion?
I listen my music on phone which does not have crossfeed so I convert files using DSP Crossfeed into AAC. Source format is FLAC, AAC or MP3.
Title: foo_onewaysync
Post by: zimjo on 2014-04-03 22:04:46
Good idea! I've added lossy-lossy conversion, since it is reasonable in case a portable player does not support certain file types.
DSP functionality, however, is beyond the scope of this component. Maybe you can find an app for your phone which has a crossfeed feature...
Title: foo_onewaysync
Post by: chamber32 on 2014-04-04 00:12:55
It would be great if one could specify max total size to copy.

c32
Title: foo_onewaysync
Post by: zimjo on 2014-04-04 11:07:24
What is the benefit of this? You would not be able to prioritize which playlists or files get copied. So the behaviour is similar to right now, copying stops if space in the destination runs out. In particular, every time you run the onewaysync command the same files are copied. The proper way to do this is imho to limit the length of playlists. If you want more refined control over size of playlists I suggest to look into foo_random_pools.
Title: foo_onewaysync
Post by: q-stankovic on 2014-04-06 15:20:07
If there is no playlist checked in "sync commands and options" then foobar2000 crashes when calling a command from main menu -> file -> onewaysync.

I've sended the crash report by foobar2000s crash dialogue.

Edit:

In preferences under the components page foo_onewaysync appears 4 times in the listing

Edit2:

I've sended two crash reports mor. The component crshes often when applying commands from Context menu
Title: foo_onewaysync
Post by: zimjo on 2014-04-06 23:09:04
Thanks for your feedback. Should all be fixed in newest version. Please let me know if you still experience crashes, in particular when using context command.
Title: foo_onewaysync
Post by: q-stankovic on 2014-04-07 18:26:25
Thank you for the component!

Before i come with some small suggestions and a feature request let me ask for the difference of the two commands in context menu "default" and "select..."

At first running the "default" command  opens the same pop up dialogue like "select..." and then not. I don't understand that? What means "default" exactly?. And wouldn't it be enough just to have a "sync to..." command in file operations submenu?

__________________________________________

Another point: isn't it possible to get by sdk the commands of the convert submenu? So it would be possible to grab that commands from the "process destination files with"-list and to take full advantage of fb2k's converter capabilities (edit: see mudlords and  detmeks requets)

__________________________________________

Edit: i would regard it as elegant if the context menu of one way sync would act like the other file operations commands: you start with "sync to..." and could use the dialogue for synching or saving a preset. Doing the latter would then turn "sync to..." command into  "sync to -> submenu (presets + ´...` for calling the sync dialogue)"

Edit2: Ok, that was a very spontaneous request with the recreation of context menu and leads to the idea (if making it work like copy and move to) to having the general sync options in the "playlist to device"-window.
Title: foo_onewaysync
Post by: zimjo on 2014-04-08 09:50:33
I agree with you that it would be most elegant to use the built in foobar converter functionality. However, there is no interface to it in the SDK, in particular there is no way to get handles of the generated files.

The context menu commands should probably be made more intuitive. "Default" actually means last used setting. I will rename this and think about your suggestion for saving presets.
Title: foo_onewaysync
Post by: q-stankovic on 2014-04-08 21:25:04
Thank you for considering! I think apart from having commands in fileops submenu that are acting same the biggest advantage is to have the socalled "general sync options" defined seperately in each preset. So you can reflect that different devices act differently, f.e. one device can play a file format that the other one cannot. Global options are restricting in that case and only meaningful if having only one device. Edit: for the same reason i think it would be better to have these "general sync option" also preset specific in foobar2000 preferences so that the main menu actions could be adressed to different devices

________________________________________________

Two smaller suggestions for improving usability:

1. The name "Playlist to Device" for the popup windows is irritating: when running it the first time from context menu i thought that not only the selection would be copied but the whole playlist. Why not "Files to device"?

2. In preferences the "new" button at first adds the standard expression and then you have to click it for editing. Would be easier if the "new" button calls directly the editing window.



Title: foo_onewaysync
Post by: q-stankovic on 2014-04-08 23:04:43
I agree with you that it would be most elegant to use the built in foobar converter functionality. However, there is no interface to it in the SDK, in particular there is no way to get handles of the generated files.

I think you misunderstood me: i don't mean access of converter component directly by sdk but its commands in context menu - they are missing in the list of "process destination files with" list in ythe preferences. as far as i know that could be possible since i saw th access to dynamic submenus realized in several components. Wouldn't that do the trick?
Title: foo_onewaysync
Post by: zimjo on 2014-04-09 10:37:41
No, as I stated above there is no way for my component to know where converter places the generated files. The key purpose of the component is to export playlist files, and store lossy conversions of lossless files, such that they don't need to be converted every single time. Both of which is not possible with what you suggest, at least not with the current SDK.

Thanks for your suggestions. I agree that the user interface is not perfectly polished, yet. Maybe I'll find time on the weekend to do that.
Title: foo_onewaysync
Post by: zimjo on 2014-06-03 22:39:16
New version 0.2.6 available. Download here (http://www.hydrogenaud.io/forums/index.php?showtopic=105217&view=findpost&p=867056).
-improved: finding existing converted lossy files after move and rename
-improved: adding new folders and titleformat scripts is now more convenient

Currently, I do not plan to rework the context menu. I'm not really familiar with windows GUI programming and not eager to have to create more dialogs.    Just don't have the time for that now, also there doesn't seem to be a major interest...
Title: foo_onewaysync
Post by: yeeeargh on 2014-06-04 10:46:02
hi,

just tested this component and I really like it. Exactly what I needed since I’m re-ripping my collection in FLAC.

But I foobar2000 crashes for me every time I use it. I tried running it via the menu command for a whole playlist and the context command for just a couple of files. The conversion works just fine and I have the files in the destination folder.

I sent both crash reports. If I can help you with other information to fix this, please let me know.

Anyways, thanks for the work!
Title: foo_onewaysync
Post by: zimjo on 2014-06-04 12:41:27
Thanks for your kind feedback and reporting the issue. Are you using the latest version of the component?
Does the destination location contain the playlist files?

Could you please upload the crash logs here, or send them to me via PM. This is probably faster than retrieving them from Peter.
Title: foo_onewaysync
Post by: yeeeargh on 2014-06-04 12:59:07
Thanks for your kind feedback and reporting the issue. Are you using the latest version of the component?

yes. 0.2.6

Does the destination location contain the playlist files?

it just generates the playlist file when I sync a playlist. when i just convert them via the file operations menu no playlist files get generated, am I right?
so yeah, the m3u8 playlist gets generated.

Could you please upload the crash logs here, or send them to me via PM. This is probably faster than retrieving them from Peter.

going to pm them to you.
Title: foo_onewaysync
Post by: fate on 2014-06-21 14:56:27
seems copying fails when the source is part of an zip archive :/

Console:
Error while copying: Z:\irony [ClariS].zip|01 - irony.mp3 -> F:\Music\ClariS - irony

Title: foo_onewaysync
Post by: zimjo on 2014-07-03 22:50:15
A new version with minor fixes is available here (http://www.hydrogenaud.io/forums/index.php?showtopic=105217&view=findpost&p=868918). Please let me know if you still encounter unexpected behaviour or crashes.
Thanks for testing!

@fate: zip or rar files are not supported by this component, sorry. Typically, it does not save a lot of space to compress music files. Why not just uncompress them?
Title: foo_onewaysync
Post by: Chris Norman on 2014-07-15 22:52:30
Thank you very much for this component. I have been waiting for something like this for a long time (basically since my ipod broke and that I have to use other devices / services now).

The ipod manager was the (almost) perfect way to keep a device synced with only a little effort.

I am syncing Google Music a Blackberry Z1 and an old Nokia phone with mp4/mp3 capability now.

Looking at the features of One Way Sync I could use very much the following features:
Again thanks for the development and wish you all the best.

Cheers.





Title: foo_onewaysync
Post by: xen126 on 2014-07-17 17:01:10
Been waiting for something like this for ages!

I can't seem to replace a string with an empty string though.

For example, $replace(%path%,A,B) is fine but not $replace(%path%,A,). Or am I doing something wrong?
Title: foo_onewaysync
Post by: zimjo on 2014-07-17 23:26:40
Thank you very much for this component. I have been waiting for something like this for a long time (basically since my ipod broke and that I have to use other devices / services now).
...
Again thanks for the development and wish you all the best.

Cheers.

Thank you! 

Quote
  • Possibility to use multiple command line settings. Google music is best served with mp3 (everything else gets converted by google music). The other devices are better off with nero mp4 (better sound at very low bitrates).
  • Possibility to conduct multiple commands instead of only one

These are great ideas. I think I will implement them as soon as I have more time again...which will be in a few weeks.

Quote
  • Using the converter e.g. downmixing 5.1. mixes to stereo, to resample to 44,1 kHz or applying replaygain. (Currently, conversion will fail if target e.g. mp3 does not support multiple channels).

I see that multi channel audio is problematic. Though, using foobars converter is not possible for the reasons I listed above. Adding DSP functionality is in principal possible and would resolve the issues you mention. However, I do not see this happening anytime soon. You can apply replaygain also by processing the destination files with a command...

Quote
  • Embed and resize album art. All devices do not show art if it exceeds a certain size. (like foo ipod did)

Personally, I do not use embedded album art. I would expect that album art is present in destination files if it was present in source files, is this not the case? Unless resizing can be achieved with standard functions of the SDK or WinSDK I do not see this coming for future versions.

Quote
  • Even thorough you wrote that you have no know knowledge of where the files are written to: a foo-ipod-like sync functionality would be awesome. If new files are added only these get converted, if files are removed from the playlist, they are being removed from the device as well. (I remember the author stored a sql lite database on the device which stores information of all files on the device).

Currently, only new files get converted/copied if the option to store converted files at source location is activated. In a future version, I will change the behaviour such that it is not necessary to convert files that already exist at the target location even when that option is disabled.
Removing files from the device, when removed from a playlist, is something I would like to see implemented myself. However, it is not straightforward to do, as one file might be referenced in multiple playlists, e.g. even in a playlist which is not part of the onewaysync command being processed. Since I could not come up with a good and simple solution, this is postponed for a later release.


Quote
Been waiting for something like this for ages!

I can't seem to replace a string with an empty string though.

For example, $replace(%path%,A,B) is fine but not $replace(%path%,A,). Or am I doing something wrong?

Glad you like the component. Replacing with empty string works for me!
Title: foo_onewaysync
Post by: xen126 on 2014-07-18 10:50:17
Quote
Been waiting for something like this for ages!

I can't seem to replace a string with an empty string though.

For example, $replace(%path%,A,B) is fine but not $replace(%path%,A,). Or am I doing something wrong?

Glad you like the component. Replacing with empty string works for me!

I've been trying to replace multiple directories in the path so that I can preserve the folder structure when converting. $replace(%path%,C:\,) will work but anything more than that will result in an "incorrect path syntax", e.g. $replace(%path%,C:\Users,)

Although... I've been thinking that it might be easier to just keep the *.lossy.mp3 files and then extract them using a VBS later.

Also, it will be great if changed files, not just newly added files, will be converted as well! I suppose you can compare the .mp3's timestamp with the source file's "Date Modified" file attribute.
Title: foo_onewaysync
Post by: zimjo on 2014-07-18 12:58:15
I've been trying to replace multiple directories in the path so that I can preserve the folder structure when converting. $replace(%path%,C:\,) will work but anything more than that will result in an "incorrect path syntax", e.g. $replace(%path%,C:\Users,)

Although... I've been thinking that it might be easier to just keep the *.lossy.mp3 files and then extract them using a VBS later.

Also, it will be great if changed files, not just newly added files, will be converted as well! I suppose you can compare the .mp3's timestamp with the source file's "Date Modified" file attribute.


Try $replace(%path%,C:\Users\,).
The component will sync changes in tags, that includes replaygain, automatically. So there is no need to compare timestamps... unless I misunderstood your intentions?
Title: foo_onewaysync
Post by: Speech on 2014-07-18 18:04:08
Could you add an option to save lyric files (.lrc), too?
Thanks anyway for developing this plug-in.
Title: foo_onewaysync
Post by: zimjo on 2014-07-18 18:32:58
Regarding lyrics, I can imagine that there are many different usage scenarios. Lyrics could all be stored in a common folder or at the audio source location, and also with varying filenaming schemes. I sincerely doubt that there is a pattern that would fit all users. I'm not going to add universal support for all different lyrics path scenarios. So, probably not. Only case I might consider supporting is lyrics files stored at the same location and with the same filename as the audio source.

Is there a particular reason you do not store lyrics in tags?
Title: foo_onewaysync
Post by: Speech on 2014-07-18 19:16:07
Regarding lyrics, I can imagine that there are many different usage scenarios. Lyrics could all be stored in a common folder or at the audio source location, and also with varying filenaming schemes. I sincerely doubt that there is a pattern that would fit all users. I'm not going to add universal support for all different lyrics path scenarios. So, probably not. Only case I might consider supporting is lyrics files stored at the same location and with the same filename as the audio source.


Well, the case you mentioned is mine and is one of the most used in Lyric Show 3; in this case the audio files and their lyric files only differ by extension. Maybe support some variables / regular expression to locate the files.

Is there a particular reason you do not store lyrics in tags?


Yes, many. If you download them with Lyric Show 3, MiniLyrics or EvilLyrics, you get a lot of crap: synced and unsynced lyrics mixed in the same file, Chinese translations at the end of the line, bad codepage, extra unrelated information, etc. If you put them in external files, you can mass grep them or edit them in an advanced text editor. You definitely don't want to put that crap they directly into your well tagged audio files without your control.

I've just looked at how my Samsung android connects to the computer and came to see the only option is through MTP, not as an external drive. Could you look into how to synchronize through MTP, as well?
Title: foo_onewaysync
Post by: zimjo on 2014-07-18 20:13:27
Well, the case you mentioned is mine and is one of the most used in Lyric Show 3; in this case the audio files and their lyric files only differ by extension.

For this I could add some basic support, but I won't add fancy file location functions.

Quote
Yes, many. If you download them with Lyric Show 3, MiniLyrics or EvilLyrics, you get a lot of crap: synced and unsynced lyrics mixed in the same file, Chinese translations at the end of the line, bad codepage, extra unrelated information, etc. If you put them in external files, you can mass grep them or edit them in an advanced text editor. You definitely don't want to put that crap they directly into your well tagged audio files without your control.

Alright, I see your point. Though, you could still add the lyrics to tags after you edited them via a script.

Quote
I've just looked at how my Samsung android connects to the computer and came to see the only option is through MTP, not as an external drive. Could you look into how to synchronize through MTP, as well?

Certainly not. It's the manufacturers fault if they do not want to support something basic such as the MSC protocol, sorry. FYI: Google and you will find a way to make MSC available on your android. Good luck!
Title: foo_onewaysync
Post by: xen126 on 2014-07-19 07:40:26
I've been trying to replace multiple directories in the path so that I can preserve the folder structure when converting. $replace(%path%,C:\,) will work but anything more than that will result in an "incorrect path syntax", e.g. $replace(%path%,C:\Users,)

Although... I've been thinking that it might be easier to just keep the *.lossy.mp3 files and then extract them using a VBS later.

Also, it will be great if changed files, not just newly added files, will be converted as well! I suppose you can compare the .mp3's timestamp with the source file's "Date Modified" file attribute.


Try $replace(%path%,C:\Users\,).
The component will sync changes in tags, that includes replaygain, automatically. So there is no need to compare timestamps... unless I misunderstood your intentions?


Ah it works now. Thanks!

The component still converts every single file every time for me, because I didn't store the *lossy.mp3 files in the source folders.
Title: foo_onewaysync
Post by: zimjo on 2014-07-19 19:56:35
The component still converts every single file every time for me, because I didn't store the *lossy.mp3 files in the source folders.


As discussed above, this was by design.

The new (http://www.hydrogenaud.io/forums/index.php?showtopic=105217&view=findpost&p=869960) version improves upon this.
Title: foo_onewaysync
Post by: fohrums on 2014-07-27 13:26:11
[request] Option to... clear/format source destination before file transfer

in this case I have a USB flashdrive. I have other songs I don't want in there and when I do the transfer with my 'new' playlist I want the USB flashdrive wiped clean prior. MusicBee had the option to sync device and delete what ever is not matched, so that means songs that are in my 'new' playlist that are already in my USB flashdrive don't get wiped clean and the option to copy over the contents of the playlist continues.
Title: foo_onewaysync
Post by: fohrums on 2014-08-03 23:30:52
[request] 'General Sync Options' > instead of convert lossless files to mp3 why not have the option for non-mp3's to be converted to mp3's. (.M4A, .AAC, .WMA)

This is more practical especially in the sense of portable usage as this will benefit consistent format that every player will read that includes headunits & portable devices.
Title: foo_onewaysync
Post by: FooJoe on 2014-08-16 16:41:18
[request] Convert single tracks from .cue-Files to mp3 (lossy or lossless audio format, embedded or non embedded .cue-file)

I've got many lossless CD-Rips in my library with non embedded .cue files. (for example one single .cue file and one single .tak file)
A test shows that the component just copies the .cue file itself to the target directory, no mp3 is created.
Title: foo_onewaysync
Post by: ShadowVlican on 2014-08-22 03:27:03
i just used this plugin to sync my playlist to a USB drive for my car

it moved all my music instead

now i have to move each file back to its original place and rename them back as well
Title: foo_onewaysync
Post by: zimjo on 2014-08-22 11:38:19
I'm sorry to hear that. An old version of the component might have this bug. Which version of the component did you use? What action did you perform?

I'd like to ask the mods of this forum to grant me the rights of editing at least the corresponding download thread, so old buggy versions can be removed. Since noone responded to, or even read, my PMs, I'm asking again on this way.

Edit: To all that have posted here: Thanks for using this component, I've read your requests, but right now I do not have any time to work on this project. I will commence development and consider the requests above, once I have some spare time again.
Title: foo_onewaysync
Post by: kode54 on 2014-08-22 12:09:20
I'm sorry to hear that. An old version of the component might have this bug. Which version of the component did you use? What action did you perform?

I'd like to ask the mods of this forum to grant me the rights of editing at least the corresponding download thread, so old buggy versions can be removed. Since noone responded to, or even read, my PMs, I'm asking again on this way.

Edit: To all that have posted here: Thanks for using this component, I've read your requests, but right now I do not have any time to work on this project. I will commence development and consider the requests above, once I have some spare time again.


Who exactly did you PM? I am an administrator on this forum, and received no such PM. A fellow administrator also mentioned on IRC not receiving any PMs from you. Who did you PM?

I will grant you Developer rank so you may edit your own posts no matter how old.

EDIT: I see you asked the foobar2000 moderator team. Unfortunately, a lot of them are not online that often, and none of them have the ability to promote users to Developer status anyway. For future reference, bug Peter or myself. Probably better to bug me. Maybe Garf, but believe he is trying to retire from admin role.
Title: foo_onewaysync
Post by: zimjo on 2014-08-22 22:51:19
Thank you kode54!
Title: foo_onewaysync
Post by: Strigoy on 2014-09-27 02:30:08
Wow, simply WOW! This is exactly what I've been looking for since I started using foobar2000 as my main music library manager.

Got one request:
An option to "check for lossless files in destination folder" when you select to convert lossless tracks...

Thing is that I'd actually like to have lossy tracks on my external drive (to cut down the lib size), but I already 'synced' (using file operations) it a while ago, now with OWS I'm updating it, but it will simply convert all the flac's etc even if they already exist in destination folder...

Performing entirely new sync is just painful when I think about it... takes so much time

Another thing is that OWS doesn't handle unavailable symbols for folder/files (like /\:?<>), i.e. if lets say some tag has one of those and you use that tag in target file structure... OWS just aborts and stops syncing, instead I'd like it to continue syncing and just give me report later on, OR ultimately OWS should just replace unavailable symbols with "_" for example

Title: foo_onewaysync
Post by: fohrums on 2014-11-04 03:48:46
This doesn't work well with Linux/Wine as the folder structures are different. It crashes. Anybody know any ways to fix this?

**UPDATE**
fix is making sure you follow wine's format for directory structures, most importantly not forgetting the ending "\"
(remember that in windows it's "\" that's used as a directory seperator not unix-like "/")

e.g.
CORRECT E:\Music\
WRONG  /media/jj/4747-1CEE/Music

reminder for the correct way, DO NOT FORGET the ending "\"
Title: foo_onewaysync
Post by: zimjo on 2014-11-15 15:18:25
Wow, simply WOW! This is exactly what I've been looking for since I started using foobar2000 as my main music library manager.

Thank you!   

An option to "check for lossless files in destination folder" when you select to convert lossless tracks...

Thing is that I'd actually like to have lossy tracks on my external drive (to cut down the lib size), but I already 'synced' (using file operations) it a while ago, now with OWS I'm updating it, but it will simply convert all the flac's etc even if they already exist in destination folder...

Performing entirely new sync is just painful when I think about it... takes so much time

Are you sure the paths and filenames are exactly identical? For me it works as you requested, no conversion (only update of tags) if file is present at target...


Another thing is that OWS doesn't handle unavailable symbols for folder/files (like /\:?<>), i.e. if lets say some tag has one of those and you use that tag in target file structure... OWS just aborts and stops syncing, instead I'd like it to continue syncing and just give me report later on, OR ultimately OWS should just replace unavailable symbols with "_" for example

Ah, yes I will add the symbols '<>' in the next release. '\' could be problematic to implement, because in the titleformat script it can also be intended for the folder structure, and the component cannot distinguish between both cases...we will see if I find a workaround. The others are being replaced already in the current version.

@fohrums: Good to know that it works under Wine!
Title: foo_onewaysync
Post by: foosion on 2014-11-15 17:02:16
'\' could be problematic to implement, because in the titleformat script it can also be intended for the folder structure, and the component cannot distinguish between both cases...we will see if I find a workaround.
You could use titleformat_text_filter_impl_filename_chars (http://foosion.foobar2000.org/doxygen/latest/classtitleformat__text__filter__impl__filename__chars.html) which is what the Converter uses. It replaces illegal file name characters in metadata before they are returned to the script. Therefore it will deal with '\' (and '/') in tag fields but leave them alone when they appear as literal characters in the title formatting script. Of course you can also create your own titleformat_text_filter implementation if you want more control over the substitution scheme.
Title: foo_onewaysync
Post by: drilboor on 2015-01-07 17:12:13
Man I love you, this app is the only thing I missed in foobar!

Got one question tho. I'd like to export each playlist to a separate folder (so: "playlist_name\artist\file.ext" for example), so I tried to add this to the filename, but so far none of these has worked
I tried:
%playlist_name%\
%_playlist_name%\
%node_name%\
%playlist%\

is this even possible? if so, how?
Title: foo_onewaysync
Post by: zimjo on 2015-01-07 18:59:52
Man I love you, this app is the only thing I missed in foobar!

 

is this even possible? if so, how?

No, currently there is no such variable available in this component. You would have to set it up manually, meaning one ows command per playlist.
Title: foo_onewaysync
Post by: attachmentDownload on 2015-01-29 11:34:14
Hey,

Wonderful plugin, especially the part with the possibility to re-encode before transferring.
It would be nice to have the encoding done in parallel. I have an i7 with 4 core and it would clearly speed up to have 4 lame encoder launched in parallel.
It's quite easy to code, you have your array with all the track to encode, just make X other reader where X = nb of CPU Core.

If x=4.
First reader start at 0, then track 4, track 8 etc ...
Second reader start at 1, then 5, then 9 etc ...

Do you think you could implement that ?
Title: foo_onewaysync
Post by: fohrums on 2015-03-19 12:58:16
+request

Adding Cover-Art to converted file. (with the following options to do so):
-A) extract image from converted file
-B) from file/folder structure w/ the name the same as the album
-C) option to choose image to embed

for general use you will never go wrong with option A) as most likely your track will have cover art as it's definitely easier to maintain a library in that fashion. Also, it's possible as people tend to use .flac files these days and if i'm converting from a .wav would option B) be the alternative choice. Otherwise option C) is always the fallback plan.

What foo_onewaysync does offer though (although it never did produce a file image) is the ability to 'Copy cover art' to a file (folder.jpg as default) which doesn't work well if all files are converted and you have all of them sharing the same cover art.
Title: foo_onewaysync
Post by: fohrums on 2015-03-27 06:46:14
+request

Option to disable 'results' dialog window

This is a pop up window that appears right after syncing your selection of tracks. Although it could be closed, it's just a bit of a hassle after many, many conversions made from time to time.
Title: foo_onewaysync
Post by: zimjo on 2015-11-16 22:58:03
A new version is almost ready for release. The component will support MTP, which is tested so far only with the very few devices lying around here. If you want to help me by testing the new version with your device send me a PM 

Changes include:
- MTP storage device support
- conversion multi-threading
- use your favorite command line encoder
- downmix multichannel
- better handling of cue sheets
- lyrics file support
- prevent unnecessary file conversions
- copy cover art fixed
Title: foo_onewaysync
Post by: zimjo on 2015-11-22 18:35:05
I've released a new version with many fixes and new features, check out the first post for details.
Title: foo_onewaysync
Post by: dividebyzero on 2015-11-24 22:36:06
I'm using foobar 1.3.9 and it gives me this error when loading the plugin:

Quote
Failed to load DLL: foo_onewaysync.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.


Is it only made for previous versions of foobar or am I missing something?
Title: foo_onewaysync
Post by: lvqcl on 2015-11-24 23:25:05
Is it only made for previous versions of foobar or am I missing something?


Download and install Visual C++ Redistributable for Visual Studio 2012 (https://www.microsoft.com/en-us/download/details.aspx?id=30679)
Title: foo_onewaysync
Post by: zimjo on 2015-11-25 16:25:39
In the latest release, the Visual C++ Lib is linked dynamically. This means you might need to install the package that lvqcl linked to.

@dividebyzero: Did this fix your problem?
Title: foo_onewaysync
Post by: dividebyzero on 2015-11-25 18:00:19
Yes, tested it now, thank you both!
Title: foo_onewaysync
Post by: zimjo on 2015-11-28 10:36:12
Have any of you encountered issues that need fixing?
Also, I'm interested to know if anyone had success using this component with a MTP device that does not show in Windows explorer?
Title: foo_onewaysync
Post by: musol on 2015-11-28 11:46:43
Have any of you encountered issues that need fixing?
Also, I'm interested to know if anyone had success using this component with a MTP device that does not show in Windows explorer?

I came across one annoyance that I don't know how to fix, if the Song Title contains illegal Characters like "?" it will be replaced with a "_". But the built in Converter in foobar just removes them so the Component doesn't recognize the files that I already copied to my Phone with the Converter and creates another Copy with a "_". I guess it has something to do with titleformat_text_filter_impl_filename_chars that foosion mentioned a page before. I also don't know why onewaysync replaces "Helden... (Intro)" with "Helden___ (Intro)" even though Windows handles "Helden... (Intro)" just fine as a filename. Other than that I'm very happy and thankful that you developed this component
Edit: Another thing I just remembered is if it would be possible to have the option to select multiple cover art files, so that for example folder.jpg and folder.png would be both synced.
Title: foo_onewaysync
Post by: zimjo on 2015-11-28 16:12:06
Thanks for your feedback musol. I'll add support for multiple coverfilenames in the next release.
Regarding filenames, foosion's suggestion is implemented, though only for the user defined titleformatting script. I'll make it resemble foobar's naming scheme entirely, if it's compatible with the library used for MTP access.
Title: foo_onewaysync
Post by: nydrogena-09 on 2015-12-14 05:20:38
Alright I've got a few issues on my hand as well.
1st I am not sure what what the field "Show files removed from destination since last sync" is supposed to show me. Right now it only copies my current playlist and opens it in a new tab instead of actually showing me anything missing. And 2nd foobar2k crashes on me when it tries to convert .cue/flac files. So far MTP seems to be working pretty well with my Nexus 7 and Xperia Z2.
Title: foo_onewaysync
Post by: zimjo on 2015-12-17 16:07:08
I am not sure what what the field "Show files removed from destination since last sync" is supposed to show me.

You use the component to copy files to a target location, e.g. your Nexus 7. Then, you decide to remove some of the songs from your Nexus 7. On the next sync, the component will detect which files were removed from your Nexus 7 (or the target location) and populate a playlist with the corresponding source files.
My typical usage scenario of this feature is the following: While listening to a song on my mobile player, I decide that I no longer want this song in a particular playlist, so I delete the file on my mobile player. After syncing, the song shows up in a specific playlist and I can change its tags (to remove it from autoplaylists) or search for it in all playlists and remove it from where I find it appropriate.

And 2nd foobar2k crashes on me when it tries to convert .cue/flac files.

Please post the dump file here or via pm to me.
So, converting flacs that are not in cue sheets works? Is the cue sheet located at a network path or something like that?

So far MTP seems to be working pretty well with my Nexus 7 and Xperia Z2.

Good to know! 
Title: foo_onewaysync
Post by: nydrogena-09 on 2015-12-21 13:01:48
My typical usage scenario of this feature is the following: While listening to a song on my mobile player, I decide that I no longer want this song in a particular playlist, so I delete the file on my mobile player. After syncing, the song shows up in a specific playlist and I can change its tags (to remove it from autoplaylists) or search for it in all playlists and remove it from where I find it appropriate.

Well that's kinda what I was expecting. Just checked again, it works. I have an idea:
Example:
I sync my playlist and all the files are on my device. Now I listen to my playlist and dislike this one song. I am going to delete it on my device.
Next time I sync, I'd like to know which songs are no longer on the device and ask me if I want to remove them also from my playlist on my computer. Right now it just shows me which songs have been removed since last sync and resyncs these files as well. Or did I miss some check box somewhere?

Please post the dump file here or via pm to me.
So, converting flacs that are not in cue sheets works? Is the cue sheet located at a network path or something like that?

Actually it seems like normal flac-files aren't working as well. It just crashes. Might have not realized that last time.
I am using these encoder options in your settings: "c:\program files (x86)\foobar2000\codec\lame.exe" -b 320

Not sure how to add files: failure_00000003.txt Or do you need the dmp-file?

Code: [Select]
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 72D5D5E0h
Access violation, operation: read, address: 77C5A5E7h
Last win32 error: 38

Call path not available.

Code bytes (72D5D5E0h):
72D5D5A0h:  C7 2B C1 0F BE 4C 24 13 51 8B FE E8 00 EA FF FF
72D5D5B0h:  8B 16 8B 12 6A FF 8D 44 24 3C 50 8B CE FF D2 FF
72D5D5C0h:  45 0C 8B 5D 0C E9 7F 00 00 00 8B 44 24 14 8B 70
72D5D5D0h:  04 83 C0 04 89 44 24 14 8B C6 8D 58 01 8D 49 00
72D5D5E0h:  8A 08 40 84 C9 75 F9 2B C3 3B F8 76 28 2B F8 74
72D5D5F0h:  24 0F BE DA 8D 54 24 28 8B CB E8 C1 FB FF FF 85
72D5D600h:  C0 74 0F 8B 4D 08 8B 11 8B 12 50 8D 44 24 2C 50
72D5D610h:  FF D2 4F 75 DF 8B 4D 08 8B 01 8B 10 6A FF 56 FF

Stack (0B37F340h):
0B37F320h:  00C00000 0B37F3FC 1010D6B0 FFFFFFFF
0B37F330h:  0B37F3B8 72D5D648 0B37F370 00000001
0B37F340h:  101167B0 0B37F414 079D10C8 0000004A
0B37F350h:  2037F49C 0B37F414 10006BB5 10006D21
0B37F360h:  0000004A 10116B74 10116B48 0B37F380
0B37F370h:  10006C20 0B37F38C 10006BB5 00CCCCCC
0B37F380h:  0B37F398 10006ED7 00000000 00000041
0B37F390h:  0B37F6F0 00000041 0B37F3B0 100066DD
0B37F3A0h:  00000041 00000004 00000039 079BB648
0B37F3B0h:  00000004 0B37F3D4 0B37F3CC 72D59E24
0B37F3C0h:  0B37F3E8 101167FA 0B37F414 0B37F408
0B37F3D0h:  10017933 0B37F3E8 101167B0 0B37F414
0B37F3E0h:  0B37F6F0 0B37F414 101169D4 079BBF68
0B37F3F0h:  0000004A 00000080 00000049 0B37F6F0
0B37F400h:  1010E7AA 00000000 0B37F6FC 10043BD8
0B37F410h:  101167B0 77C5A5E7 0B37FE70 0B37F728
0B37F420h:  CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC
0B37F430h:  CCCCCCCC 01CCCCCC 0B37F408 032A1D40
0B37F440h:  CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC
0B37F450h:  CCCCCCCC CCCCCCCC 0B37F408 CCCCCCCC

Registers:
EAX: 77C5A5E7, EBX: 77C5A5E8, ECX: 0B37F300, EDX: 00000020
ESI: 77C5A5E7, EDI: 00000000, EBP: 0B37F3B8, ESP: 0B37F340

Crash location:
Module: shared
Offset: D5E0h
Symbol: "CreateFileAbortable" (+2A1Bh)

Loaded modules:
foobar2000                      loaded at 00850000h - 00A1F000h
ntdll                            loaded at 779B0000h - 77B2B000h
KERNEL32                        loaded at 753F0000h - 754D0000h
KERNELBASE                      loaded at 74D60000h - 74EDE000h
SHLWAPI                          loaded at 757A0000h - 757E5000h
msvcrt                          loaded at 754D0000h - 7558E000h
combase                          loaded at 751C0000h - 7537D000h
COMCTL32                        loaded at 73520000h - 7372F000h
RPCRT4                          loaded at 75690000h - 7573D000h
WINMM                            loaded at 73880000h - 738A4000h
DSOUND                          loaded at 737F0000h - 73876000h
GDI32                            loaded at 757F0000h - 7593F000h
SspiCli                          loaded at 74600000h - 7461E000h
USER32                          loaded at 74620000h - 74767000h
CRYPTBASE                        loaded at 745F0000h - 745FA000h
bcryptPrimitives                loaded at 74D00000h - 74D58000h
sechost                          loaded at 74FF0000h - 75034000h
ADVAPI32                        loaded at 75E70000h - 75EEB000h
SHELL32                          loaded at 76300000h - 776FF000h
cfgmgr32                        loaded at 75050000h - 75087000h
powrprof                        loaded at 777A0000h - 777E4000h
windows.storage                  loaded at 74800000h - 74CF9000h
kernel.appcore                  loaded at 75940000h - 7594C000h
UxTheme                          loaded at 73760000h - 737D5000h
shcore                          loaded at 77710000h - 7779D000h
WINMMBASE                        loaded at 73730000h - 73753000h
profapi                          loaded at 75380000h - 7538F000h
ole32                            loaded at 759D0000h - 75ABB000h
CRYPT32                          loaded at 75CF0000h - 75E68000h
MSASN1                          loaded at 75C90000h - 75C9E000h
zlib1                            loaded at 62E80000h - 62E9F000h
shared                          loaded at 72D50000h - 72D7D000h
Secur32                          loaded at 73D70000h - 73D7A000h
WINHTTP                          loaded at 74330000h - 743CB000h
gdiplus                          loaded at 72D80000h - 72EEB000h
imagehlp                        loaded at 74FC0000h - 74FDB000h
COMDLG32                        loaded at 75590000h - 75682000h
FirewallAPI                      loaded at 74770000h - 747CE000h
dbghelp                          loaded at 731C0000h - 732FF000h
NETAPI32                        loaded at 759B0000h - 759C3000h
dbgcore                          loaded at 73070000h - 73091000h
DAVHLPR                          loaded at 737E0000h - 737EB000h
IMM32                            loaded at 747D0000h - 747FB000h
fwbase                          loaded at 72D20000h - 72D4C000h
MSCTF                            loaded at 777F0000h - 7790F000h
dwmapi                          loaded at 73050000h - 7306D000h
foo_onewaysync                  loaded at 10000000h - 10163000h
OLEAUT32                        loaded at 75090000h - 75122000h
MSVCP110                        loaded at 72C90000h - 72D15000h
MSVCR110                        loaded at 72770000h - 72846000h
mfc110u                          loaded at 72850000h - 72C8F000h
foo_dsp_std                      loaded at 72720000h - 72762000h
foo_cdda                        loaded at 726C0000h - 72711000h
foo_unpack                      loaded at 72670000h - 726BC000h
foo_converter                    loaded at 725E0000h - 72668000h
foo_ui_std                      loaded at 724D0000h - 725DE000h
MSIMG32                          loaded at 724C0000h - 724C6000h
foo_freedb2                      loaded at 72470000h - 724C0000h
foo_fileops                      loaded at 72420000h - 7246E000h
foo_rgscan                      loaded at 723B0000h - 72411000h
foo_input_std                    loaded at 72250000h - 723AB000h
avutil-fb2k-54                  loaded at 721A0000h - 7222A000h
avcodec-fb2k-56                  loaded at 71FC0000h - 7219E000h
MSACM32                          loaded at 72230000h - 72248000h
foo_httpcontrol                  loaded at 71F40000h - 71FB4000h
WS2_32                          loaded at 75AC0000h - 75B1F000h
MPR                              loaded at 71F20000h - 71F36000h
WSOCK32                          loaded at 71F10000h - 71F18000h
foo_playcount                    loaded at 71ED0000h - 71F0E000h
foo_albumlist                    loaded at 71E70000h - 71ECB000h
foo_audioscrobbler              loaded at 04DE0000h - 04E13000h
foo_dsp_eq                      loaded at 71E30000h - 71E67000h
foo_out_wasapi                  loaded at 04EE0000h - 04F09000h
WindowsCodecs                    loaded at 71CB0000h - 71E23000h
clbcatq                          loaded at 75130000h - 751B4000h
dataexchange                    loaded at 71C60000h - 71CA1000h
d3d11                            loaded at 71990000h - 71BAA000h
dcomp                            loaded at 71BB0000h - 71C57000h
dxgi                            loaded at 71900000h - 71983000h
twinapi.appcore                  loaded at 71830000h - 718FD000h
bcrypt                          loaded at 74550000h - 7456B000h
sud                              loaded at 71790000h - 7182E000h
ADVPACK                          loaded at 71760000h - 7178C000h
PROPSYS                          loaded at 73DD0000h - 73F1B000h
DUI70                            loaded at 715F0000h - 71757000h
SETUPAPI                        loaded at 75EF0000h - 762FB000h
VERSION                          loaded at 745E0000h - 745E8000h
mswsock                          loaded at 742E0000h - 7432F000h
PortableDeviceApi                loaded at 6ED90000h - 6EE13000h
explorerframe                    loaded at 6E950000h - 6ED8A000h
edputil                          loaded at 6E900000h - 6E949000h
DEVOBJ                          loaded at 744F0000h - 74512000h
PortableDeviceTypes              loaded at 6E8D0000h - 6E8F8000h
WINTRUST                        loaded at 75CA0000h - 75CE2000h

Stack dump analysis:
Address: 101167B0h (foo_onewaysync+1167B0h), symbol: "foobar2000_get_interface" (+EEED0h)
Address: 10006BB5h (foo_onewaysync+6BB5h)
Address: 10006D21h (foo_onewaysync+6D21h)
Address: 10116B74h (foo_onewaysync+116B74h), symbol: "foobar2000_get_interface" (+EF294h)
Address: 10116B48h (foo_onewaysync+116B48h), symbol: "foobar2000_get_interface" (+EF268h)
Address: 10006C20h (foo_onewaysync+6C20h)
Address: 10006BB5h (foo_onewaysync+6BB5h)
Address: 10006ED7h (foo_onewaysync+6ED7h)
Address: 100066DDh (foo_onewaysync+66DDh)
Address: 72D59E24h (shared+9E24h), symbol: "uPrintfV" (+11h)
Address: 101167FAh (foo_onewaysync+1167FAh), symbol: "foobar2000_get_interface" (+EEF1Ah)
Address: 10017933h (foo_onewaysync+17933h)
Address: 101167B0h (foo_onewaysync+1167B0h), symbol: "foobar2000_get_interface" (+EEED0h)
Address: 101169D4h (foo_onewaysync+1169D4h), symbol: "foobar2000_get_interface" (+EF0F4h)
Address: 1010E7AAh (foo_onewaysync+10E7AAh), symbol: "foobar2000_get_interface" (+E6ECAh)
Address: 10043BD8h (foo_onewaysync+43BD8h), symbol: "foobar2000_get_interface" (+1C2F8h)
Address: 101167B0h (foo_onewaysync+1167B0h), symbol: "foobar2000_get_interface" (+EEED0h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 10125190h (foo_onewaysync+125190h), symbol: "foobar2000_get_interface" (+FD8B0h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 101169D4h (foo_onewaysync+1169D4h), symbol: "foobar2000_get_interface" (+EF0F4h)
Address: 1010A41Fh (foo_onewaysync+10A41Fh), symbol: "foobar2000_get_interface" (+E2B3Fh)
Address: 10030349h (foo_onewaysync+30349h), symbol: "foobar2000_get_interface" (+8A69h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 1004E520h (foo_onewaysync+4E520h), symbol: "foobar2000_get_interface" (+26C40h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 10125190h (foo_onewaysync+125190h), symbol: "foobar2000_get_interface" (+FD8B0h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 101138E8h (foo_onewaysync+1138E8h), symbol: "foobar2000_get_interface" (+EC008h)
Address: 10108BA9h (foo_onewaysync+108BA9h), symbol: "foobar2000_get_interface" (+E12C9h)
Address: 1004DFB8h (foo_onewaysync+4DFB8h), symbol: "foobar2000_get_interface" (+266D8h)
Address: 1004E520h (foo_onewaysync+4E520h), symbol: "foobar2000_get_interface" (+26C40h)
Address: 1004E520h (foo_onewaysync+4E520h), symbol: "foobar2000_get_interface" (+26C40h)
Address: 1010B1C0h (foo_onewaysync+10B1C0h), symbol: "foobar2000_get_interface" (+E38E0h)
Address: 1004E52Bh (foo_onewaysync+4E52Bh), symbol: "foobar2000_get_interface" (+26C4Bh)
Address: 754038F4h (KERNEL32+138F4h), symbol: "BaseThreadInitThunk" (+24h)
Address: 754038D0h (KERNEL32+138D0h), symbol: "BaseThreadInitThunk" (+0h)
Address: 77A156C3h (ntdll+656C3h), symbol: "RtlUnicodeStringToInteger" (+253h)
Address: 74E9F2F0h (KERNELBASE+13F2F0h), symbol: "UnhandledExceptionFilter" (+0h)
Address: 77A2EC80h (ntdll+7EC80h), symbol: "wcstombs" (+90h)
Address: 72CD5FC3h (MSVCP110+45FC3h), symbol: "Xp_subx" (+BF1Dh)
Address: 77A1568Eh (ntdll+6568Eh), symbol: "RtlUnicodeStringToInteger" (+21Eh)
Address: 77A3B6D2h (ntdll+8B6D2h), symbol: "RtlCaptureContext" (+E2h)
Address: 1004E520h (foo_onewaysync+4E520h), symbol: "foobar2000_get_interface" (+26C40h)
Address: 00905A4Dh (foobar2000+B5A4Dh)
Address: 72676F72h (foo_unpack+6F72h)
Address: 10000000h (foo_onewaysync+0h)
Address: 7273722Eh (foo_dsp_std+1722Eh), symbol: "foobar2000_get_interface" (+51EEh)

Environment:
App: foobar2000 v1.3.9
UI: Default User Interface 0.9.5

Components:
Core (2015-11-02 13:34:32 UTC)
    foobar2000 core 1.3.9
foo_albumlist.dll (2015-11-02 13:31:02 UTC)
    Album List 4.5
foo_audioscrobbler.dll (2010-06-04 07:27:04 UTC)
    Audioscrobbler 1.4.7
foo_cdda.dll (2015-11-02 13:30:24 UTC)
    CD Audio Decoder 3.0
foo_converter.dll (2015-11-02 13:30:32 UTC)
    Converter 1.5
foo_dsp_eq.dll (2015-11-02 13:30:52 UTC)
    Equalizer 1.0
foo_dsp_std.dll (2015-11-02 13:30:38 UTC)
    Standard DSP Array 1.3.1
foo_fileops.dll (2015-11-02 13:30:04 UTC)
    File Operations 2.2.1
foo_freedb2.dll (2015-11-02 13:30:14 UTC)
    Online Tagger 0.7
foo_httpcontrol.dll (2013-04-26 16:12:30 UTC)
    HTTP Control 0.97.14-fb2kc
foo_input_std.dll (2015-11-02 13:34:32 UTC)
    Standard Input Array 1.0
foo_onewaysync.dll (2015-12-14 04:19:12 UTC)
    One Way Sync 0.5.4
foo_out_wasapi.dll (2015-07-30 15:12:24 UTC)
    WASAPI output support 3.2.3
foo_playcount.dll (2013-02-01 08:40:46 UTC)
    Playback Statistics 3.0.2
foo_rgscan.dll (2015-11-02 13:31:02 UTC)
    ReplayGain Scanner 2.2.2
foo_ui_std.dll (2015-11-02 13:34:32 UTC)
    Default User Interface 0.9.5
foo_unpack.dll (2015-11-02 13:30:38 UTC)
    ZIP/GZIP/RAR Reader 1.7.1

Recent events:
Pre component load
Loading DLL: C:\Users\xxxx\AppData\Roaming\foobar2000\user-components\foo_onewaysync\foo_onewaysync.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_dsp_std.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_cdda.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_unpack.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_converter.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_ui_std.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_freedb2.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_fileops.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_rgscan.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_input_std.dll
Loading DLL: C:\Users\xxxx\AppData\Roaming\foobar2000\user-components\foo_httpcontrol\foo_httpcontrol.dll
Loading DLL: C:\Users\xxxx\AppData\Roaming\foobar2000\user-components\foo_playcount\foo_playcount.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_albumlist.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_audioscrobbler.dll
Loading DLL: C:\Program Files (x86)\foobar2000\components\foo_dsp_eq.dll
Loading DLL: C:\Users\xxxx\AppData\Roaming\foobar2000\user-components\foo_out_wasapi\foo_out_wasapi.dll
Components loaded in: 0:00.342442
Pre config read
Configuration read in: 0:00.024128
Starting playlist loading
Watching: D:\j-Music
Watching: D:\Downloads
Album List refreshed in: 0:01.474585
User Interface initialized in: 0:01.531490
Processing commandline
initquit::init entry
initquit::init exit
Startup time : 0:02.216026
foo_ows: Syncing 'New Playlist' to  wpd:\Xperia Z2\SD-Karte\MusicTest\%artist%\%album%\%title%.$ext(%_path%)


Machine specifications:
OS: Windows 6.3.9600 x64
CPU: Intel® Core™ i7-3770K CPU @ 3.50GHz, features: MMX SSE SSE2 SSE3 SSE4.1 SSE4.2
CPU threads: 8
Audio: YAMAHA RX-V775 (4- NVIDIA High Definition Audio); DELL U2412M-0 (3- NVIDIA High Definition Audio); DELL U2412M-3 (NVIDIA High Definition Audio); Lautsprecher (2- Logitech G930 Headset)

Also your plugin does not seem to work when Windows Mediafeatures such as Windows Media Player are deactivated. I had to reactivate it and reboot my computer to get this working.
Title: foo_onewaysync
Post by: zimjo on 2015-12-23 14:26:47
Well that's kinda what I was expecting. Just checked again, it works. I have an idea:
Example:
I sync my playlist and all the files are on my device. Now I listen to my playlist and dislike this one song. I am going to delete it on my device.
Next time I sync, I'd like to know which songs are no longer on the device and ask me if I want to remove them also from my playlist on my computer. Right now it just shows me which songs have been removed since last sync and resyncs these files as well. Or did I miss some check box somewhere?

Yes, in principle, it is a good idea. Though, it can not work for autoplaylists. That's why I did not implement it.

Actually it seems like normal flac-files aren't working as well. It just crashes. Might have not realized that last time.
I am using these encoder options in your settings: "c:\program files (x86)\foobar2000\codec\lame.exe" -b 320

Not sure how to add files: failure_00000003.txt Or do you need the dmp-file?

I do need the dump file. See if you can attach a file to a PM, or upload it in this thread (https://www.hydrogenaud.io/forums/index.php?showtopic=105217). Also, add the option -r to your commandline and to make it work with non 44.1kHz songs add -s %sr%, else those converted songs will have wrong pitch.

Also your plugin does not seem to work when Windows Mediafeatures such as Windows Media Player are deactivated. I had to reactivate it and reboot my computer to get this working.

The MTP feature does require Windows Media Player to work.
Title: foo_onewaysync
Post by: Xin-Hong on 2015-12-25 07:13:44
Hello zimjo

The component can not be loaded:
Code: [Select]
Failed to load DLL: foo_onewaysync.dll Reason: This component is missing a required dependency, or was made for different version of foobar2000

even with Visual C++ Redistributable for Visual Studio 2012 installed.

My system: foobar2000 1.3.9, Win 10 x64 (Nov update)
Title: foo_onewaysync
Post by: nydrogena-09 on 2015-12-26 00:05:12
Well that's kinda what I was expecting. Just checked again, it works. I have an idea:
Example:
I sync my playlist and all the files are on my device. Now I listen to my playlist and dislike this one song. I am going to delete it on my device.
Next time I sync, I'd like to know which songs are no longer on the device and ask me if I want to remove them also from my playlist on my computer. Right now it just shows me which songs have been removed since last sync and resyncs these files as well. Or did I miss some check box somewhere?

Yes, in principle, it is a good idea. Though, it can not work for autoplaylists. That's why I did not implement it.

Actually it seems like normal flac-files aren't working as well. It just crashes. Might have not realized that last time.
I am using these encoder options in your settings: "c:\program files (x86)\foobar2000\codec\lame.exe" -b 320

Not sure how to add files: failure_00000003.txt Or do you need the dmp-file?

I do need the dump file. See if you can attach a file to a PM, or upload it in this thread (https://www.hydrogenaud.io/forums/index.php?showtopic=105217). Also, add the option -r to your commandline and to make it work with non 44.1kHz songs add -s %sr%, else those converted songs will have wrong pitch.

Also your plugin does not seem to work when Windows Mediafeatures such as Windows Media Player are deactivated. I had to reactivate it and reboot my computer to get this working.

The MTP feature does require Windows Media Player to work.


Thanks for the encode settings. But I can't seem to find the function in this forum to add files to a post?
Title: foo_onewaysync
Post by: zimjo on 2015-12-27 11:02:32
The component can not be loaded:
even with Visual C++ Redistributable for Visual Studio 2012 installed.

My system: foobar2000 1.3.9, Win 10 x64 (Nov update)

Wait for the next release, which will not depend on shared libraries.
Since I do not use Win10 I cannot give you any further advice, sorry.
Title: Re: foo_onewaysync
Post by: pintwk on 2016-02-21 00:25:53
Have any of you encountered issues that need fixing?
Also, I'm interested to know if anyone had success using this component with a MTP device that does not show in Windows explorer?

Component appears to convert but after it completes I get following output in three different boxes with no files/playlist being created. If I don't do any converting it appears to create the directories and playlist and copy the files no problem.

Code: [Select]
Exported files and playlists succesfully.

1 playlists exported.
4 files converted.
0 files updated.

Code: [Select]
Could not load info (Object not found) from:
"C:\Users\Username\AppData\Local\Temp\OWS5B9B.tmp.mp3"
Could not load info (Object not found) from:
...

Code: [Select]
Could not update tags (Object not found) on:
"C:\Users\Username\AppData\Local\Temp\OWS5B9B.tmp.mp3"
Could not update tags (Object not found) on:
...

Playlist I was attempting to convert was a mix of VBR mp3, 320 CBR mp3, and flac files just for testing.

Don't know if this is some setup in the configuration that I'm screwing up but apologies ahead of time if it is. I'm kind of dumb wrt foobar... And things in general.
Title: Re: foo_onewaysync
Post by: wolfsong on 2016-03-15 13:56:29
In the latest release, the Visual C++ Lib is linked dynamically. This means you might need to install the package that lvqcl linked to.

@dividebyzero: Did this fix your problem?
What do I need for a portable install? Thanks
Title: Re: foo_onewaysync
Post by: Alexander Ostuni on 2016-03-15 15:16:49
Hi,

I can't use this component at all. It allways says it needs at least wmp 10. I have already installed wmp 12
Title: Re: foo_onewaysync
Post by: zimjo on 2016-03-23 22:51:28
Component appears to convert but after it completes I get following output in three different boxes with no files/playlist being created. If I don't do any converting it appears to create the directories and playlist and copy the files no problem.

...

Playlist I was attempting to convert was a mix of VBR mp3, 320 CBR mp3, and flac files just for testing.

Don't know if this is some setup in the configuration that I'm screwing up but apologies ahead of time if it is. I'm kind of dumb wrt foobar... And things in general.
This component comes without a converter it requires an additional one, e.g. lame. This looks to me like your converter is not set up properly. Look in the console for the conversion command and post it here, executable and arguments.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-03-23 22:54:11
In the latest release, the Visual C++ Lib is linked dynamically. This means you might need to install the package that lvqcl linked to.

@dividebyzero: Did this fix your problem?
What do I need for a portable install? Thanks
It should work when the Visual C++ Libs from said package are in the foobar folder or same folder as onewaysync.dll
Title: Re: foo_onewaysync
Post by: zimjo on 2016-03-23 22:56:39
Hi,

I can't use this component at all. It allways says it needs at least wmp 10. I have already installed wmp 12
Are you trying to use an MTP device? If so, WMP is required and must not be deactivated. If the device is visible in WMP it should be fine, though. Which Windows version are you using?
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2016-04-02 21:41:53
Hello zimjo

The component can not be loaded:
Code: [Select]
Failed to load DLL: foo_onewaysync.dll Reason: This component is missing a required dependency, or was made for different version of foobar2000
even with Visual C++ Redistributable for Visual Studio 2012 installed.

My system: foobar2000 1.3.9, Win 10 x64 (Nov update)

For me it's the same problem here. 1.3.10 and Win 10x64

@zimjo:
Quote
It should work when the Visual C++ Libs from said package are in the foobar folder or same folder as onewaysync.dll

How do I get those libs or how can I find them?

Title: Re: foo_onewaysync
Post by: wolfsong on 2016-04-10 07:27:37
Is there documentation for this component? I'm not sure I understand how it works.
Title: Re: foo_onewaysync
Post by: pintwk on 2016-04-12 04:48:35
This component comes without a converter it requires an additional one, e.g. lame. This looks to me like your converter is not set up properly. Look in the console for the conversion command and post it here, executable and arguments.

Yup. I had messed up one of the switches for lame... the same way every time I tried making this work. Thanks for the response. Loving the plugin now.
Title: Re: foo_onewaysync
Post by: Mangix on 2016-04-17 23:53:49
fails under wine due to missing windows media player
Title: Re: foo_onewaysync
Post by: wolfsong on 2016-05-02 15:39:14
In the latest release, the Visual C++ Lib is linked dynamically. This means you might need to install the package that lvqcl linked to.

@dividebyzero: Did this fix your problem?
What do I need for a portable install? Thanks
It should work when the Visual C++ Libs from said package are in the foobar folder or same folder as onewaysync.dll
What are the actually lib files? It works fine on my desktop but not on the portable install which I'm syncing the desktop files from. I've tried installing the redistributable on my work laptop and it still doesn't work.
Title: Re: foo_onewaysync
Post by: muzack on 2016-05-11 15:51:52
How to use this component with ffmpeg as encoder? How to setup the arguments? There seem to be only a replacer for %sr% but not for input and outputfile and the setting for those variables in different to lame:

Code: [Select]
C:\Path_to_lame\lame.exe -b 128 inputfile outputfile

vs
Code: [Select]
C:\Path_to_ffmpeg\ffmpeg.exe -i %filename% -acodec libmp3lame -ab 128k %filename%.mp3

I wish the Encoder part was better documented.
I found no way to (re)-encode m4a or mp3 files, because lame.exe doesn't come with decoders (and flac to mp3 is only possible if a special build is used libsndfile (https://hydrogenaud.io/index.php/topic,86967.msg745216.html#msg745216).
It's also not possible to place a bat files in the encoder settings, instead of a exe file, to handle more complex converting case in that.

Maybe I did something wrong though - but please shed some light on how to setup the encoder section with different input files. (It's also not clear what the field "Convert the following lossy file types" expects as input. A space delimited list of file extensions or comma? mp3 m4a mp4 or mp3,m4a,mp4 - if lossy conversion even works (see above).

Thanks for this nice component!
M.
Title: Re: foo_onewaysync
Post by: NEMO7538 on 2016-05-12 09:55:18
This plugin needs WMP or newer !!! pops up ...
Any workaround?
Title: Re: foo_onewaysync
Post by: zimjo on 2016-06-04 14:19:54
How to use this component with ffmpeg as encoder?
Currently it appears to be incompatible with ffmpeg, since ffmepg expects the arguments in a certain order. The component can only use encoders that can be called in the following way:
Code: [Select]
converter.exe options infile outfile
where infile outfile are added by the component itself, no need to specify it in the call path.
I might extend this as you requested for the next release. On the other hand, you should be able to work around it with a batch script. Post the content of your batch file here and we might be able to make it work.

I found no way to (re)-encode m4a or mp3 files, because lame.exe doesn't come with decoders ...
No decoder on the encoder side is required, the component uses foobar to decode to PCM, which is then supplied to the encoder. Thus, any file which is playable by foobar is automatically supported.

(It's also not clear what the field "Convert the following lossy file types" expects as input. A space delimited list of file extensions or comma? mp3 m4a mp4 or mp3,m4a,mp4.
Actually, it doesn't matter, both works.

Thanks for this nice component!
M.
Your welcome!  :)
Title: Re: foo_onewaysync
Post by: zimjo on 2016-06-05 22:25:42
What are the actually lib files? It works fine on my desktop but not on the portable install which I'm syncing the desktop files from. I've tried installing the redistributable on my work laptop and it still doesn't work.
This plugin needs WMP or newer !!! pops up ...
Any workaround?
fails under wine due to missing windows media player
How do I get those libs or how can I find them?
I can't use this component at all. It allways says it needs at least wmp 10. I have already installed wmp 12
What do I need for a portable install? Thanks
To all those who had problems loading the component: Download release 0.5.5 (https://hydrogenaud.io/index.php/topic,105217.msg923522.html#msg923522) and give it a try. I believe the WMP related issues should be resolved, though this is kind of untested and MTP support will be missing. Leaving feedback on your experience will help development of this component, thanks. I'm also curious whether this now works under Wine.
Title: Re: foo_onewaysync
Post by: fabiospark on 2016-06-19 12:42:26
I have to copy 150MB of lossless Wavpack files to my wife's phone.

She will mostly listen through a not bad amplifier or, more often, through
a Senheiser wireless closed headphone: would you mind helping me to choose
the best settings for the lossy encoding while copying the files?
Consider two different scenarios: one with a limit of 125GB of space (future)
and another one with a 25GB limit (now).

Thanks.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-06-20 18:21:07
I'm not quite sure I understand your question:
Do you want to encode a fixed set of files such that they will fit your given space criteria? Then, you'll have a better chance of getting an educated answer in one of the other HA forums, maybe General Audio.
Or do you want to choose files from your lossless files such that after encoding them to a lossy type your space criterion is met? Then, my recommendation is to use the random pools component together with onewaysync.

Regarding lossy encoding, use whatever sounds transparent (or good enough) to you ;)
Title: Re: foo_onewaysync
Post by: fabiospark on 2016-06-20 18:53:00
Thanks for answering.

I'm asking if given a selection of wavpack files, say 150GB,
there is some lame setting that would grant me to end up
with a certain amount of space, say 30GB.

But most importantly I would ask you now if you can understand
why I ended up with a collection of hissing files instead of getting
the right conversion to mp3.
In the encoder setting I read: lame ["lame.exe" --vbr-new -h -V 4]

Let me also ask you if there is a way to know which of my files
have already been transferred to a device or if there is the possibility
to automatically add a tag to know that.

I need to redo the work I've done yesterday and I will have to re-encode
everything so it would be useful to be able to know the already synced
and to tell the plugin to overwrite the encoded ones.

Thanks.

fabio
Title: Re: foo_onewaysync
Post by: zimjo on 2016-06-21 21:08:48
But most importantly I would ask you now if you can understand
why I ended up with a collection of hissing files instead of getting
the right conversion to mp3.
In the encoder setting I read: lame ["lame.exe" --vbr-new -h -V 4]
Maybe, because it expects a different input format. Add the -r switch (for raw PCM input) and  -s %sr% to pass the correct sampling rate. Your command line should read:
Code: [Select]
"lame.exe" --vbr-new -h -V 4 -r -s %sr%


I need to redo the work I've done yesterday and I will have to re-encode
everything so it would be useful to be able to know the already synced
and to tell the plugin to overwrite the encoded ones.
During sync, the component will not reencode a file if it already exists in the target location. You can simply delete the existing files from the target location and they will be encoded again. That is unless, you checked the 'Save lossy files at lossless sourcepath', in which case you need to delete those as well. You can find them by searching for the file ending '.lossy.mp3'. Check the generated playlist for details on the path of the synced files.
Title: Re: foo_onewaysync
Post by: bmcelvan on 2016-08-02 14:37:05
I'm confused about how this plugin works. Using Windows 7 and my phone is connected via MTP. I can copy/erase/transfer files to my phone just fine using either windows explorer or freefilesync.

I opened foobar, went to library-->configure-->components and dragged the file foo_onewaysync.dll into the window, hit apply and the program tells me I need to restart the program so I do.

Now when I open foobar again, I can right click on either a file or a playlist and goto file operations-->onewaysync-->select and then I get a new window with two popup options an "OK" button and a cancel button. The first popup name is destination, the other is blank. Neither populate anything when I click on them, they are empty menus. I manually tried to add the address of my phones card in the destination field but it didn't do anything. I've tried about 10 times and one of the times it said need Windows Media player version 10 or higher. I have version 12 (Win7) already installed?

I go into settings and find the one way sync section under tools and try to configure a device command and destination there but it still won't do anything. First the Windows Media Player 10 error pops up, then I get to the window which has my device listed and I hit okay, the I get the error:
"One way sync failed: The target device is currently not connected to the system. Try again when device is reconnected. Devicename: \MacS4Mini\Card."

The destination for my phone self populates in the configuration/settings screen and is listed as wpd:\MacS4Mini\Card

Is this the proper syntax?

This is the first plugin I've ever had trouble trying to use. Is there a simple set of instructions on how to use this plugin?

Any help would be great, thanks.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-02 22:47:10
Now when I open foobar again, I can right click on either a file or a playlist and goto file operations-->onewaysync-->select and then I get a new window with two popup options an "OK" button and a cancel button. The first popup name is destination, the other is blank. Neither populate anything when I click on them, they are empty menus. I manually tried to add the address of my phones card in the destination field but it didn't do anything. I've tried about 10 times and one of the times it said need Windows Media player version 10 or higher. I have version 12 (Win7) already installed?
It shouldnt show you the dialog if you didnt make any settings in the preferences. Make sure you have set up a device command in preferences/devices and a titleformatting script in preferences/tasks before using the context command, they should be initialized with default values though. This might be a glitch, i'll have to look into this.
The WMP error means that there was a problem accessing the device with the WPD API, which enables MTP.

Is this the proper syntax?
That's the device you want to use! If you have problems, try closing all other programs that access the device, such as WMP.
Title: Re: foo_onewaysync
Post by: shiphtfour on 2016-08-09 15:30:16
So is this plugin currently not working? When I use version 0.5.4 I get the "This plugin needs WMP 10 or newer" error. When I use version 0.5.5 I get the error "The target device is currently not connected to the system." Any suggestions? P.S. Thanks zimjo for finally giving us a solution for syncing to our phones!
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-09 18:09:14
Syncing via MTP works for me with my Android phones. So far I suspected a Win 10 incompatibility, but apparently some people get this also on Win 7. It's hard to find the problem and fix it if I cannot reproduce the issue!
Could you post the console output from onewaysync after opening the device preferences page and after starting a sync? It is prefixed with foo_ows.
Title: Re: foo_onewaysync
Post by: shiphtfour on 2016-08-09 18:58:07
Syncing via MTP works for me with my Android phones. So far I suspected a Win 10 incompatibility, but apparently some people get this also on Win 7. It's hard to find the problem and fix it if I cannot reproduce the issue!
Could you post the console output from onewaysync after opening the device preferences page and after starting a sync? It is prefixed with foo_ows.
I am also on Windows 7. Here is the console output when opening the device preferences page:
foo_ows: Found 6 WPD devices.
foo_ows: Found storage object SAMSUNG-SM-G930V\Phone
foo_ows: Found storage object SAMSUNG-SM-G930V\Card
foo_ows: WPD device I: object 0 is not accessible.
foo_ows: WPD device K: object 0 is not accessible.
foo_ows: WPD device L: object 0 is not accessible.
foo_ows: WPD device J: object 0 is not accessible.
foo_ows: WPD device M: object 0 is not accessible.

and when attempting to send an album to my android phone:
foo_ows: Exporting selection to  wpd:\SAMSUNG-SM-G930V\Card\Music\$swapprefix(%Album Artist%)\'['%date%']' %album%\%filename%
foo_ows: Error: The target device is currently not connected to the system. Try again when device is reconnected.
Devicename: \SAMSUNG-SM-G930V\Card
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-10 11:35:19
The device is configured properly. There seems to be an internal problem with onewaysync or the library I use for MTP access.
I've uploaded a version (https://hydrogenaud.io/index.php/topic,105217.msg926512.html#msg926512) that prints additional info to the console. People with MTP issues please follow the procedure described above and post the console output. Thanks.
Title: Re: foo_onewaysync
Post by: shiphtfour on 2016-08-10 19:43:39
The device is configured properly. There seems to be an internal problem with onewaysync or the library I use for MTP access.
I've uploaded a version (https://hydrogenaud.io/index.php/topic,105217.msg926512.html#msg926512) that prints additional info to the console. People with MTP issues please follow the procedure described above and post the console output. Thanks.
Here is the console output with the new version:
foo_ows: Found 6 WPD devices.
foo_ows: Found storage object SAMSUNG-SM-G930V\Phone
foo_ows: Found storage object SAMSUNG-SM-G930V\Card
foo_ows: WPD device I: object 0 is not accessible.
foo_ows: WPD device K: object 0 is not accessible.
foo_ows: WPD device L: object 0 is not accessible.
foo_ows: WPD device J: object 0 is not accessible.
foo_ows: WPD device M: object 0 is not accessible.
foo_ows: Exporting selection to  wpd:\SAMSUNG-SM-G930V\Card\Music\$swapprefix(%Album Artist%)\'['%date%']' %album%\%filename%
foo_ows: Found 0 WPD devices.
foo_ows: Error: The target device is currently not connected to the system. Try again when device is reconnected.
   Devicename: \SAMSUNG-SM-G930V\Card
   Number of available devices 0
foo_ows: Reinit wpdplug...
   Number of available devices 0

Thanks for looking into it zimjo!
Title: Re: foo_onewaysync
Post by: Arras on 2016-08-11 19:59:14
For some reason, I got it set up seemingly correctly, but I can't get it to convert anything. When I start syncing, the progress bar goes way too fast for it to be doing any converting, and afterwards it gives the following errors:

One way sync failed: Error: Could not create file on WPD device. Filename: <destination filename>
It gives this one for the first song in the playlist.

Could not load info (Object not found) from:
"C:\Users\<user>\AppData\Local\Temp\<some code>.tmp.mp3"
Could not update tags (Object not found) on:
"C:\Users\<user>\AppData\Local\Temp\<some code>.tmp.mp3"
These ones appear for every song in the playlist.
During the conversion process, if I look at that temporary folder, I can see .tmp files appearing that are presumably the .wav files, since the filesize is very large. However, no .mp3 files appear, and at the end all the .tmp files are deleted, so I assume all those errors are because the mp3 files are never actually created. lame.exe is in the location the encoder settings are pointing at and I left the options unchanged from default. Trying to convert to aac using neroAacEnc.exe gave the exact same result.

Thanks for making this though! If I can get it to work, it'll be exactly what I was looking for to manage the music on my android phone.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-11 23:47:18
Here is the console output with the new version:
[...]

Thanks for looking into it zimjo!
Please check out the new version, see first post (https://hydrogenaud.io/index.php/topic,105218.0.html), and let me know if it fixes your issue.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-11 23:50:22
For some reason, I got it set up seemingly correctly, but I can't get it to convert anything.
Please upgrade to newest version 0.5.6. Then remove all encoder settings and restart foobar, this will insert the default encoder with correct options. Adapt the encoder path according to your setup. Let me know if you're still having problems.
Title: Re: foo_onewaysync
Post by: shiphtfour on 2016-08-12 00:37:32
Please check out the new version, see first post (https://hydrogenaud.io/index.php/topic,105218.0.html), and let me know if it fixes your issue.
Working perfectly now, thank you so much zimjo! Do you take donations? :)
Title: Re: foo_onewaysync
Post by: Arras on 2016-08-12 12:15:16
Please upgrade to newest version 0.5.6. Then remove all encoder settings and restart foobar, this will insert the default encoder with correct options. Adapt the encoder path according to your setup. Let me know if you're still having problems.

Thanks a ton - LAME works now (it seems like the settings carried over from some old version I had installed first were wrong). I still can't get the AAC encoder to work though. Oddly enough, calling the AAC encoder from command line with the same arguments I put into the OWS settings seems to work just fine.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-12 13:27:45
Working perfectly now, thank you so much zimjo! Do you take donations? :)
That is great to hear! :) If you want you can send a donation here (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H8VCF93HBF45C).
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-12 13:33:06
Thanks a ton - LAME works now (it seems like the settings carried over from some old version I had installed first were wrong). I still can't get the AAC encoder to work though. Oddly enough, calling the AAC encoder from command line with the same arguments I put into the OWS settings seems to work just fine.
Great! Regarding the encoder issue: Try reselecting the encoder in your device command and hit apply.
Title: Re: foo_onewaysync
Post by: Arras on 2016-08-12 13:46:05
Thanks a ton - LAME works now (it seems like the settings carried over from some old version I had installed first were wrong). I still can't get the AAC encoder to work though. Oddly enough, calling the AAC encoder from command line with the same arguments I put into the OWS settings seems to work just fine.
Great! Regarding the encoder issue: Try reselecting the encoder in your device command and hit apply.
I tried that, but I just can't seem to get it to work. One more thing - it seems that it creates all the temporary files first, then copies everything. It keeps the WAV files too until it's finished, which means it's currently at 15% or so and already using 10GB hard disk space, which is kind of ridiculous. Is it possible to convert, copy and delete an album before moving on to the next one or something?
Title: Re: foo_onewaysync
Post by: zimjo on 2016-08-12 16:14:34
I tried that, but I just can't seem to get it to work.
I'm not sure if neroaacenc can handle raw pcm streams. When you called the encoder from command line, did you feed it the wav file generated by OWS?
Anyway, with version 0.5.7 you can have additional info printed to the console, which will show you the exact command line called by OWS. This should help resolve your issue.
One more thing...
Done with current version.
Title: Re: foo_onewaysync
Post by: Arras on 2016-08-12 21:30:57
I'm not sure if neroaacenc can handle raw pcm streams. When you called the encoder from command line, did you feed it the wav file generated by OWS?
Anyway, with version 0.5.7 you can have additional info printed to the console, which will show you the exact command line called by OWS. This should help resolve your issue.
Done with current version.
Ah, you're right. I didn't realize there was a difference between .wav files and raw PCM streams, that's what was causing it. neroAacEnc only takes actual WAV files. After switching to FFmpeg and searching for the correct arguments (the correct input type is s16le), I got it to work! Thanks for the help!
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2016-08-22 20:12:27
I tried .flac coversion  with version 0.5.6.

Seems to work like a charm :) Very nice.
Title: Re: foo_onewaysync
Post by: FooJoe on 2016-09-24 10:38:21
Hi there,
First of all if have to thank the developer for this great plugin.

I'm converting my music files (tak or mp3) with onewaysync which works almost perfect.
The destination files (mp3 from lame) are for my car-hifi which couldn't handle ReplayGain.
So I have to change the converted files to get the same volume afterwards with the following steps manually:
1. Do a "scan per file track gain"
2. use "apply track ReplayGain to file content".

When using the option "process destination files with", the selection "apply track ReplayGain to file content" doesn't appear.
The option "scan per file track gain" ist there.

Is it possible to integrate these two steps into the convertion process ?

That would be perfect.  ;D




Title: Re: foo_onewaysync
Post by: Havokdan on 2016-09-24 14:02:37
Translated as was possible within my limitations this plugin for the Portuguese of Brazil, leave it attached.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-09-25 17:36:43
When using the option "process destination files with", the selection "apply track ReplayGain to file content" doesn't appear.
The option "scan per file track gain" ist there.

Is it possible to integrate these two steps into the convertion process ?
After the conversion process ows transfers also the replay gain information to the created file. While this is not necessarily perfectly accurate, I have found it to be sufficient for my needs.

When you try with entries in your playlist, e.g. FLAC files, or entire playlist contents you will find that the context menu item "apply track ReplayGain to file content" is missing there as well. It can be called only with certain file types.
The only way to make it appear in the ows preferences dialog is by selecting an appropriate file in the active playlist. However, this is extremely unreliable, because such a file must be selected also when the ows command is executed!

Maybe the best workflow for you would be to create a script which calls the two commands you need, then call this script via foo_run from ows. See also the foobar commandline guide (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Commandline_Guide).
Title: Re: foo_onewaysync
Post by: Havokdan on 2016-09-25 18:27:26
Good afternoon, I searched but did not find the option to delete my own posts, would like to remove the post I made earlier, does anyone could direct me how I do it or an administrator erase my previous post this?
Title: Re: foo_onewaysync
Post by: wcs13 on 2016-10-27 05:27:14
Hi @zimjo and thanks for this useful component.
In my case, it doesn't seem to handle well large titleformatting strings. Makes foobar crash instantly 100% of the time.
Steps to reproduce :
1. Tasks > TItleformatting Scripts > Paste a large titleformatting string (in my case it's a string that I use for many other purposes so it's tested and it should work)
Code: [Select]
$if(%danse%,'Danse - '$if($strcmp($meta(danse,0),WCS),WCS,$if($strcmp($meta(danse,0),Rock),Rock,$if(%danse%,Autres,ERREUR))),Ecoute)\[$if($and($strstr(%genre%,Comédie),$strcmp($left($meta(album artist),6),Troupe)),%genre%,$if($strstr(%sorting%,'[Coffret]'),$if($strstr(%sorting%,'=='),$left(%sorting%,$sub($strstr(%sorting%,'=='),1)),),$if($and($strstr(%album artist%,Compilation),$not($strstr($left(%sorting%,3),OST))),,[$replace(%sorting%,'==','\')])))\]$if($strstr($left(%sorting%,3),OST),$if($strstr(%sorting%,'=='),'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']),'Remaster',RM,'MFSL Original Master Recording',MFSL),$puts(d,$if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')))$puts(e,1)$puts(f,$sub($strstr($get(d), OST),1))$puts(g,$substr($get(d),$get(e),$get(f)))$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(g),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),$get(f)))$iflonger($get(g),$len($get(c)),' ('$trim($get(b))')',)))$substr($get(d),$add($get(f),1),999)[' ['$replace(%edition%,Remaster,RM,MFSL Original Master Recording,MFSL)']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']' ('[$left(%original release date%,4)-]$left(%date%,4)')'),$if($strstr(%album artist%,Compilation),Compilation\$if(%sorting%,$if($strstr(%sorting%,'[Coffret]'),$substr(%sorting%,$add($strstr(%sorting%,']'),2),$len(%sorting%))' ('%totaldiscs% CDs') ('%date%')'\['['%discnumber%'] ']$replace(%album%,'?','_')[' ['%edition%']'],%sorting%\'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'],'Remaster',RM,'MFSL Original Master Recording',MFSL)),$puts(d,$replace(%album%,'?','_'))$puts(e,1)$puts(f,999)$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(d),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),999))$iflonger($get(d),$len($get(c)),' ('$trim($get(b))')',)))[' ['$replace(%edition%,Remaster,RM,MFSL Original Master Recording,MFSL)']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']' ('[$left(%original release date%,4)-]$left(%date%,4)')'),$if($and($strstr(%genre%,Comédie),$strcmp($left($meta(album artist),6),Troupe)),%subgenre%,$puts(d,$if2($meta_sep(album artist,', ',' & '),$if($strstr(%sorting%,Classique),$replace($meta_sep(composer,', ',' & '),Wolfgang Amadeus,W.A.,Johann Sebastian,J.S.,Ludwig Van,L.V.),$if2(%artist2%,$if2($meta_sep(artist,', ',' & '),$replace($meta_sep(composer,', ',' & '),Wolfgang Amadeus,W.A.,Johann Sebastian,J.S.,Ludwig Van,L.V.))))))$puts(e,1)$puts(f,$if($strstr($get(d),' ('),$sub($strstr($get(d),' ('),1),999))$puts(g,$substr($get(d),$get(e),$get(f)))$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(g),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),$get(f)))$iflonger($get(g),$len($get(c)),' ('$trim($get(b))')',))))\$if($strstr(%sorting%,'[Coffret]'),'('%date%') '$substr(%sorting%,$add($strstr(%sorting%,']'),2),$len(%sorting%))' ('%totaldiscs% CDs')'\['['%discnumber%'] ']$replace(%album%,'?','_')[' ['%edition%']'],'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']),'Remaster',RM,'MFSL Original Master Recording',MFSL))))\%tracknumber% - $if($strcmp($len($meta(works)),0),,$if($strstr(%works%,'[]'),$puts(v,$replace(%works%,'[]',))$puts(w,$substr($get(v),$if($strstr(%works%,'=='),$add($strstr($get(v),'=='),2),0),999))$if($strstr(%works%,'[]'),['['$get(w)'] '],[$get(w)' - ']),))$replace(%title%,'?','_')$puts(a,$replace(%version%,'Alternate, ',,'Demo, ',,'Original, ',,'Remix, ',,'Reprise, ',,', Alternate',,', Demo',,', Original',,', Remix',,', Reprise',,Alternate,,Demo,,Original,,Remix,,Reprise,))$puts(b,%subversion%)$if($strcmp($get(a),'?'),$puts(a,))$if($strcmp($get(b),'?'),$puts(b,))$if($get(a),' ['$get(a)[', '$get(b)]']',[' ['$get(b)']'])[' - '%subtitle%][' ('$if($and($not($strcmp($len($meta(album artist)),0)),$not($strcmp($if2($meta(album artist2),$meta(album artist)),$if2(%artist2%,$meta(artist)))),$not($strcmp($meta(artist),$meta(performer)))),$puts(n,$if($or($strstr(%sorting%,Classique),$strstr(%genre%,Classique)),$if($strcmp($meta(album artist),Compilation),,performer),artist))$puts(m,$if2(%artist2%,$meta($get(n),0)))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(a,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(a,$get(m)))$puts(m,$if(%artist2%,,$meta($get(n),1)))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(b,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(b,$get(m)))$puts(m,$if(%artist2%,,$meta($get(n),$sub($meta_num($get(n)),1))))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(c,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(c,$get(m)))$if(%artist2%,$get(a),$ifgreater($meta_num($get(n)),3,$get(a)', [...] & '$get(c),$ifgreater($meta_num($get(n)),2,$get(a)', '$get(b)' & '$get(c),$ifgreater($meta_num($get(n)),1,$get(a)' & '$get(b),$get(a))))),)')']
2. "Choose titleformatting" drop-down menu > Try to select the created titleformatting string
3. When selecting the string, it's an instant foobar crash, guaranteed
BTW : foobar 1.3.9, onewaysync 0.5.9

Can you please help ? Thanks. ;)
Title: Re: foo_onewaysync
Post by: zimjo on 2016-10-27 22:17:37
In my case, it doesn't seem to handle well large titleformatting strings.
...
BTW : foobar 1.3.9, onewaysync 0.5.9

Thanks for reporting this issue.
Fixed and tested working with 0.5.9b
Title: Re: foo_onewaysync
Post by: wcs13 on 2016-10-30 22:42:21
I'm trying to download 0.5.9b from the components page : http://www.foobar2000.org/components/view/foo_ows
The page says 0.5.9b, but once downloaded and installed, foobar components page in preferences window says 0.5.9.
And most of all, it keeps crashing immediately with my string !
I've tried uninstalling it / reinstalling it : same problem.
FYI the settings seem to be kept after uninstall, since once reinstalled I found all my settings and my long string.
File size is 1 886 516 bytes. @zimjo , any hints ?
Title: Re: foo_onewaysync
Post by: zimjo on 2016-10-31 13:15:23
It seems there is still the wrong file on the server...dont know why. :(  I won't be able to change that before tomorrow night, please try again then.

Edit: The file in the component repository is broken and unusable, I'll post here when it is working again.
Title: Re: foo_onewaysync
Post by: Slated on 2016-10-31 22:32:26
Currently it appears to be incompatible with ffmpeg

Code: [Select]
ffmpeg.exe -f s16le -ar %sr% -ac 2 -i %in% -y -f ogg -codec:a libvorbis -ac 2 -qscale:a 6 -ar 44100 -vn %out%

Works for me.
Title: Re: foo_onewaysync
Post by: Slated on 2016-11-01 00:00:54
However, now I have a couple of new problems.

First, I want to strip chars like the single quote from the output.

I tried:
Code: [Select]
%artist%\%album%\%tracknumber% $replace(%title%.$ext(%_path%),"'",_)

But that gives me:
Code: [Select]
foo_onewaysync: Could not create directory structure; unknown path format 0d

Ideally I'd prefer to just remove that char altogether and not replace it with anything, but I haven't quite figured that out yet.

Next, it seems it can't write the sqlite database to the target, even though it can write the audio files to the same target.

Code: [Select]
foo_ows: Attempting to copy file C:\Users\Slated\AppData\Local\Temp\OWSF128.tmp.sqlite to F:\.ows_SGS4.sqlite
Error while copying: C:\Users\Slated\AppData\Local\Temp\OWSF128.tmp.sqlite -> F:\.ows_SGS4.sqlite
  The system cannot find the file specified. 
foo_ows: Error: Error copying file, see Console for details. Make sure that there is enough free space and check permissions.

Both C:\Users\Slated\AppData\Local\Temp\OWSF128.tmp.sqlite and F:\ do exist and have write permissions for the user (me) that owns the foobar process.

 ???
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-01 23:28:00
First, I want to strip chars like the single quote from the output.
...
Ideally I'd prefer to just remove that char altogether and not replace it with anything, but I haven't quite figured that out yet.
Try this one:
Code: [Select]
$replace(files\%artist%\%album%\%tracknumber% - %title%,'',).$ext(%_path%)
For an explanation see here (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#Syntax).

Next, it seems it can't write the sqlite database to the target, even though it can write the audio files to the same target.

Code: [Select]
foo_ows: Attempting to copy file C:\Users\Slated\AppData\Local\Temp\OWSF128.tmp.sqlite to F:\.ows_SGS4.sqlite
Error while copying: C:\Users\Slated\AppData\Local\Temp\OWSF128.tmp.sqlite -> F:\.ows_SGS4.sqlite
  The system cannot find the file specified. 
foo_ows: Error: Error copying file, see Console for details. Make sure that there is enough free space and check permissions.
That's windows complaining that it cannot find the file, don't know why it would do that. Can you copy using windows explorer? Is F: some kind of special volume?
Title: Re: foo_onewaysync
Post by: Slated on 2016-11-02 02:42:01
"(two single quotes in a row) results in one single quote"

Ah, the magic formula is revealed  8)

Forget what I wrote about the copy operation failing. It turned out to be weirdness with the target (a NetDrive2 network share mapped from an ftp server). DOS/PowerShell copy failed too, but Explorer copy succeeded for some reason. I assume the share inherits permissions from the NetDrive2 service, whatever they are. The ftp "server" is actually just my Android running Solid Explorer with an ftp share. I just plugged it directly in to the PC instead. Problem solved.

Thanks.
Title: Re: foo_onewaysync
Post by: muxx on 2016-11-02 15:51:40
I cannot update to 0.5.9b! Downloaded the file several times but the error message in Foobar is always: "Could not load component "foo_onewaysync.fb2k-component": Unsupported format or corrupted file" Could you fix it?
Thank you!
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-02 20:20:39
Thanks, I was aware of the problem. I would have removed the file, but that is not possible afaik. The reason was an issue with my network, all uploads ended up being corrupted. The download should be okay now.

Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2016-11-08 20:16:35
Hello there :)

I have the following problem.
I have a .flac and want to covert and send it to my s5 mini (lollipop 5.1.1) smartphone.
I got the following message.
By the way I'm using win 10

What could be the problem?
The console says :
foo_onewaysync: Could not create directory structure; unknown path format 0d e

I just found another bug I think. When I want to reset the page, foobar crashes.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-08 23:42:38
You tried to use 'Process destinations files with...' with your smartphone as file destination. This is not possible, because foobar cannot access the files on a device connected via MTP (WPD stands for windows portable device, which is microsofts framework for MTP), therefore you cannot run any context command on those destination files.
Uncheck this option and you're good.

I reproduced the crash and will provide a fix soon. Workaround: You can reset onewaysyncs settings by deleting the file foo_onewaysync.dll.cfg in foobars configuration folder.
Title: Re: foo_onewaysync
Post by: Decalicatan_Decalicatan on 2016-11-09 23:46:02
Thank you for this component @zimjo, it is very useful!

By the way, does anybody some software that can manage music files on a device connected via MTP (to create playlists to be played later once the device is not connected anymore or to read/edit tags) ?
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2016-11-11 20:58:44
Hello,

I unchecked the option but I recognized that the files are converted but there seems to be a problem with saving the files on the device.
The files are not there.

I always get:
foo_onewaysync: Could not create directory structure; unknown path format 0d  :o
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-11 22:05:34
Thank you for this component @zimjo, it is very useful!
8)
By the way, does anybody some software that can manage music files on a device connected via MTP (to create playlists to be played later once the device is not connected anymore or to read/edit tags) ?
If your device is a smartphone you should be able to find some app that can do this. Otherwise, I don't know any. Most software creates temporary files when dealing with MTP devices, which is, if I understood correctly, what you do not want.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-11 22:13:37
I always get:
foo_onewaysync: Could not create directory structure; unknown path format 0d  :o
It would help if you could post more information from the console, in particular the target path and the line 'foo_ows: Attempting to copy file ...' before the error message.
Title: Re: foo_onewaysync
Post by: casinero.triste on 2016-11-17 14:15:58
Can anybody give some help about how to make conversion for specific file types work?
I have WMA and APE in my music collection, which I need to convert when running ows.
APE works by checking "Convert lossless files", though this is not perfectly ideal for me since my mobile player does support FLAC.
Anyway for WMA, no matter what I input in the "Convert these lossy file types" box, ows simply directly copy the original WMA file.
What did I miss?
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-17 17:20:41
Uncheck 'convert lossless files' and check 'convert these lossy file types'. Everything should work as you want, if you write
Code: [Select]
wma,ape
in the box. The file endings need to be .wma and .ape, respectively. Conversion of wma works for me. Note that conversion of DRM protected files is not supported.
Title: Re: foo_onewaysync
Post by: casinero.triste on 2016-11-17 22:55:01
That's exactly what I do. However the result is as follows:
Quote
foo_ows: Found 1 WPD devices.
foo_ows: Found storage object HTC One 801e\內部儲存空間
foo_ows: Exporting selection to  wpd:\HTC One 801e\內部儲存空間\Music\%genre%\%filename%
foo_ows: Attempting to copy file D:\share\音樂\Vienna Teng - Green Island Serenade.WMA to wpd_\HTC One 801e\內部儲存空間\Music\Sentimental\Vienna Teng - Green Island Serenade.WMA
foo_ows: Attempting to copy file D:\share\音樂\周杰倫 - 藉口.ape to wpd_\HTC One 801e\內部儲存空間\Music\Sentimental\周杰倫 - 藉口.ape
Deleting temporary files.
foo_ows: Finished task 'New Task'.
foo_ows: Reading from db.
foo_ows: SQL error: no such table: OWS
foo_ows: Attempting to copy file  to
foo_ows: Error: File not found
Deleting temporary files.
foo_ows: Done with command 'New Command'.


Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-20 14:37:15
Your file extension is in capital letters, which is why it was not considered for file conversion. The latest release 0.5.9d handles this properly.
Title: Re: foo_onewaysync
Post by: superfalse on 2016-11-27 20:18:39
Hey there, thanks for this awesome tool!

I'm using it with a Moto G (3rd Gen) and it seems to be working quite well. I've only got a minor issue: if I remove a song from my playlist on the PC and synchronize, the track is indeed removed from the playlist on my phone. However, it doesn't delete the actual file from the device even though 'Delete unreferenced files from destination' is checked in the settings.
Title: Re: foo_onewaysync
Post by: zimjo on 2016-11-28 20:35:41
Thanks for reporting. This will work again with the latest version 0.5.9e.
Title: Re: foo_onewaysync
Post by: superfalse on 2016-11-28 20:50:35
Wow, that was quick. Thank you, works like a charm. :)
Title: Re: foo_onewaysync
Post by: jyra on 2017-01-01 12:46:19
Does anybody have this running under Wine? I'm trying it under Wineskin (Mac) but it just makes foobar crash when I go to the 'Devices' section in the preferences.
Title: Re: foo_onewaysync
Post by: YellowJelly on 2017-01-02 00:55:29
The plugin crashes every time I run the command "Rated", but it works completely fine every time I use the command "Unrated". The only difference between both is the command name and the folder destination name (MusicaRated and MusicaUnrated). Everything else is exactly the same.
Any idea on how to fix this? :(
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-02 07:11:16
Does anybody have this running under Wine? I'm trying it under Wineskin (Mac) but it just makes foobar crash when I go to the 'Devices' section in the preferences.
Afaik Wineskin does not support the WPD API. Most likely that is the reason for the crash. With any luck, I might be able to come up with a workaround, if you send me the crash report and dump file.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-02 07:15:25
The plugin crashes every time I run the command "Rated", but it works completely fine every time I use the command "Unrated". The only difference between both is the command name and the folder destination name (MusicaRated and MusicaUnrated). Everything else is exactly the same.
Any idea on how to fix this? :(
Would you please share the crash report and dump file, thanks.
Are you sure they are absolutely identical? Do they process the same set of files?
Title: Re: foo_onewaysync
Post by: jyra on 2017-01-02 08:05:49
Does anybody have this running under Wine? I'm trying it under Wineskin (Mac) but it just makes foobar crash when I go to the 'Devices' section in the preferences.
Afaik Wineskin does not support the WPD API. Most likely that is the reason for the crash. With any luck, I might be able to come up with a workaround, if you send me the crash report and dump file.

Here is my crash report (somehow I can't get to upload here directly..):
http://www.mediafire.com/file/cin5k9mfx7z5qd6/crash_report.zip (http://www.mediafire.com/file/cin5k9mfx7z5qd6/crash_report.zip)

Thank you for taking the time to check on this.
Title: Re: foo_onewaysync
Post by: zarach on 2017-01-06 22:19:10
Hello! first post (prolly), hello to everyone else too in that case.

First off, I love your component, it's finally the one I was looking for to not have to manually maintain two separate databases with my mobile phone...
however, there is one weird quirk I noticed, tracks would just get replaced with another with no rhyme or reason. I'll be listening to Mungo Jerry at one moment, and the following track will be tagged as Mungo Jerry, with all correct fields, but will be some other song instead. Perhaps either sync or Foobar are mixing up temporary mp3 files and putting them in the wrong places? I wish I had more info regarding this, it's been 2-3 syncs over mass-storage and a final one over MTP. Somehow in between, it must have confused some files. Never more than one per album though!
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-07 09:27:53
That sounds funny. I'll need some more information to figure this out: Which version of ows are you using? Were all of the affected files reencoded? If so, how many conversion threads are you using? Is there anything these songs might have in common?
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2017-01-07 21:18:24
Hello,

this plugin doesn't work with my phone:

I am using Win10
My phone is an s5 mini: SM-G800f running still with Lollipop 5.1.1
I have foobar2000 v. 1.3.14 and the plugin version 0.5.9e.

When I try to send files to phone I get in the console the following message:
foo_onewaysync: Could not create directory structure; unknown path format 0d
 >:(

What Do I do wrong?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-08 14:44:46
Thank you for taking the time to check on this.
Try with the latest version and let me know about the result.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-08 15:07:45
My phone is an s5 mini: SM-G800f running still with Lollipop 5.1.1
I have foobar2000 v. 1.3.14 and the plugin version 0.5.9e.

When I try to send files to phone I get in the console the following message:
foo_onewaysync: Could not create directory structure; unknown path format 0d
 >:(

What Do I do wrong?
Don't know. What else does the console say?
Title: Re: foo_onewaysync
Post by: jyra on 2017-01-08 15:28:50
Thank you for taking the time to check on this.
Try with the latest version and let me know about the result.

It works great, thank you very much. Never thought I would be able to sync foobar playlists with my Android phone from OSX. :D
I used this app to mount the SD Card in my phone: https://forum.xda-developers.com/android/apps-games/app-universal-mass-storage-enabler-beta-t3240097
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2017-01-08 18:36:58
Don't know. What else does the console say?

I replaced the name of the mp3 file with XXXX.

When trying to send an mp3 to my phone there a window pops up with the following text:

One way sync failed: Error: Could not copy file to WPD device, problem reading the source file. Filename: XXXX.mp3
The console says: foo_ows: Error: Error: Could not copy file to WPD device, problem reading the source file. Filename: XXXX.mp3

When trying to send a flac file the console says:
foo_ows: Exporting selection to  wpd:\Spirit of the ocean (Galaxy S5 m\Phone\%artist%\%album%\[%discnumber%.]%title%.mp3
foo_ows: Conversion Complete
foo_onewaysync: Could not create directory structure; unknown path format 0do eo

For me it seems there is a problem with actually saving the files on the telephone. I think there was a version where this worked.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-08 18:39:55
My phone is an s5 mini: SM-G800f running still with Lollipop 5.1.1
I have foobar2000 v. 1.3.14 and the plugin version 0.5.9e.

When I try to send files to phone I get in the console the following message:
foo_onewaysync: Could not create directory structure; unknown path format 0d
 >:(

What Do I do wrong?
Don't know. What else does the console say?
After looking into this a bit more, I'm convinced your titleformatting script is faulty or results in an invalid path!
With the current release it becomes easier to spot such issues and the component will try to workaround. However, the target filenames might differ from the desired filename!

Edit: Missed your reply when posting this. Try version 0.5.10c, and post the console output again. The path
Code: [Select]
wpd:\Spirit of the ocean (Galaxy S5 m\Phone...
looks suspicious, are you sure there is a '(' in the devicename? Also, the problem might be in the filename that you decided not to post.
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2017-01-08 20:47:49
Hello Zimjo,

with the new component it gave me all devices available in the popup window. I copied the text and wanted to post it but my PC gave me later a blue screen.

I remember that there stood:
Devicename: Spirit of the ocean     .mp3 (this wasn't the correct device)
It listed all availabe devices with wpd:\Spirit of the ocean (Galaxy S5 m\Phone...

After you said that the device name could be a problem I changed it do S5mini by renaming it.

Now it is working :)

But I have a question though:
Is it better to:
a)  put the destination folder under "Devices" for example: wpd:\S5mini\Card\Musik with the  titleformatting script under Tasks %artist%\%album%\[%discnumber%.]%tracknumber%.%title%.$ext(%_path%)
or
b) put alone the device with the sd card under "Devices" for example: wpd:\S5mini\Card\ with the  titleformatting script under Tasks Musik\%artist%\%album%\[%discnumber%.]%tracknumber%.%title%.$ext(%_path%)

I use the last option.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-08 21:09:42
Great! It doesn't really matter if you choose (a) or (b). As long as the device string does not contain titleformatting you're good. Though, when the option create subfolder for each task is checked and you're using multiple tasks per device option (a) is probably what you want.
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2017-01-08 21:23:43
I want to say a big

Thank you :-*

Since they abandoned real massstorage mode and used instead media transfer protol in android this was the most annoying thing for me that I couldn't send the files directly from foobar to my phone.

I have a lot FLAC files but also some MP3. With your plugin I can create a playlist and then send it to my phone despite having FLAC and MP3 in my playlist because it recognizes if there are losless files and converts them into mp3 :)
Title: Re: foo_onewaysync
Post by: wcs13 on 2017-01-25 00:55:46
Hi,
I'm trying to figure out how One Way Sync works.
So far, all my synced files have no file extension (no ".mp3", nothing at all).
That happens for all files, converted or not.
That also happens if I sync the files to a local hard drive instead of my smartphone.
What am I doing wrong ?
Thanks.

Here's a test done on a small number of files (only 9 audio files) for debugging purposes :

Code: [Select]
Exported files and playlists succesfully.
1 playlists exported.
3 files converted.
0 files updated.
----------------------
Could not load info (Object not found) from:"R:\TMP\OWSDB0A.tmp.mp3"
Could not load info (Object not found) from:"R:\TMP\OWSE46E.tmp.mp3"
Could not load info (Object not found) from:"R:\TMP\OWSEDF0.tmp.mp3"
----------------------
Could not update tags (Object not found) on:"R:\TMP\OWSDB0A.tmp.mp3"
Could not update tags (Object not found) on:"R:\TMP\OWSE46E.tmp.mp3"
Could not update tags (Object not found) on:"R:\TMP\OWSEDF0.tmp.mp3"

FYI, R: is a 1GB RAM drive with 200 MB free space.
All 9 resulting files are without any extension.
Also, if I try to view the resulting m3u playlist file with a text editor, its contents don't have any extensions either.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-25 18:14:41
Most likely the titleformatting string does not contain the file extension. Unfortunately, your post does not show that part of the console log. Add
Code: [Select]
.$ext(%_path%)
to the end of the titleformatting string to append the file extension. If you set up a converter, make sure that the appropriate file extension is set in the converter dialog.
Title: Re: foo_onewaysync
Post by: techi63 on 2017-01-25 22:26:08
Is it possible to keep the original folder structure? Thank you
Title: Re: foo_onewaysync
Post by: wcs13 on 2017-01-26 18:37:16
@zimjo : thanks. The titleformating string is the same I've been using for years for lots of other things (moving/copying files for instance), and the file extension has always been preserved, so why should I add it now specifically for your component ?
Here it is if you want to take a look :
Code: [Select]
[$if($and($strstr(%genre%,Comédie),$strcmp($left($meta(album artist),6),Troupe)),%genre%,$if($strstr(%sorting%,'[Coffret]'),$if($strstr(%sorting%,'=='),$left(%sorting%,$sub($strstr(%sorting%,'=='),1)),),$if($and($strstr(%album artist%,Compilation),$not($strstr($left(%sorting%,3),OST))),,[$replace(%sorting%,'==','\')])))\]$if($strstr($left(%sorting%,3),OST),$if($strstr(%sorting%,'=='),'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']),'Remaster',RM,'MFSL Original Master Recording',MFSL),$puts(d,$if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')))$puts(e,1)$puts(f,$sub($strstr($get(d), OST),1))$puts(g,$substr($get(d),$get(e),$get(f)))$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(g),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),$get(f)))$iflonger($get(g),$len($get(c)),' ('$trim($get(b))')',)))$substr($get(d),$add($get(f),1),999)[' ['$replace(%edition%,Remaster,RM,MFSL Original Master Recording,MFSL)']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']' ('[$left(%original release date%,4)-]$left(%date%,4)')'),$if($strstr(%album artist%,Compilation),Compilation\$if(%sorting%,$if($strstr(%sorting%,'[Coffret]'),$substr(%sorting%,$add($strstr(%sorting%,']'),2),$len(%sorting%))' ('%totaldiscs% CDs') ('%date%')'\['['%discnumber%'] ']$replace(%album%,'?','_')[' ['%edition%']'],%sorting%\'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'],'Remaster',RM,'MFSL Original Master Recording',MFSL)),$puts(d,$replace(%album%,'?','_'))$puts(e,1)$puts(f,999)$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(d),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),999))$iflonger($get(d),$len($get(c)),' ('$trim($get(b))')',)))[' ['$replace(%edition%,Remaster,RM,MFSL Original Master Recording,MFSL)']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']' ('[$left(%original release date%,4)-]$left(%date%,4)')'),$if($and($strstr(%genre%,Comédie),$strcmp($left($meta(album artist),6),Troupe)),%subgenre%,$puts(d,$if2($meta_sep(album artist,', ',' & '),$if($strstr(%sorting%,Classique),$replace($meta_sep(composer,', ',' & '),Wolfgang Amadeus,W.A.,Johann Sebastian,J.S.,Ludwig Van,L.V.),$if2(%artist2%,$if2($meta_sep(artist,', ',' & '),$replace($meta_sep(composer,', ',' & '),Wolfgang Amadeus,W.A.,Johann Sebastian,J.S.,Ludwig Van,L.V.))))))$puts(e,1)$puts(f,$if($strstr($get(d),' ('),$sub($strstr($get(d),' ('),1),999))$puts(g,$substr($get(d),$get(e),$get(f)))$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(g),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),$get(f)))$iflonger($get(g),$len($get(c)),' ('$trim($get(b))')',))))\$if($strstr(%sorting%,'[Coffret]'),'('%date%') '$substr(%sorting%,$add($strstr(%sorting%,']'),2),$len(%sorting%))' ('%totaldiscs% CDs')'\['['%discnumber%'] ']$replace(%album%,'?','_')[' ['%edition%']'],'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']),'Remaster',RM,'MFSL Original Master Recording',MFSL))))\$if($strcmp($len($meta(works)),0),,$if($strstr(%works%,'[]'),$puts(v,$replace(%works%,'[]',))$puts(w,$substr($get(v),$if($strstr(%works%,'=='),$add($strstr($get(v),'=='),2),0),999))$if($strstr(%works%,'[]'),['['$get(w)'] '],[$get(w)' - ']),))$replace(%title%,'?','_')$puts(a,$replace(%version%,'Alternate, ',,'Demo, ',,'Original, ',,'Remix, ',,'Reprise, ',,', Alternate',,', Demo',,', Original',,', Remix',,', Reprise',,Alternate,,Demo,,Original,,Remix,,Reprise,))$puts(b,%subversion%)$if($strcmp($get(a),'?'),$puts(a,))$if($strcmp($get(b),'?'),$puts(b,))$if($get(a),' ['$get(a)[', '$get(b)]']',[' ['$get(b)']'])[' - '%subtitle%]' ('$puts(n,$if($or($strstr(%sorting%,Classique),$strstr(%genre%,Classique)),$if($strcmp($meta(album artist),Compilation),,performer),artist))$puts(m,$if2(%artist2%,$meta($get(n),0)))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(a,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(a,$get(m)))$puts(m,$if(%artist2%,,$meta($get(n),1)))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(b,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(b,$get(m)))$puts(m,$if(%artist2%,,$meta($get(n),$sub($meta_num($get(n)),1))))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(c,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(c,$get(m)))$if(%artist2%,$get(a),$ifgreater($meta_num($get(n)),3,$get(a)', [...] & '$get(c),$ifgreater($meta_num($get(n)),2,$get(a)', '$get(b)' & '$get(c),$ifgreater($meta_num($get(n)),1,$get(a)' & '$get(b),$get(a)))))')'

Attached is my converter dialog (some files need to be converted to mp3, some others don't).
The complete converter line is : "C:\Program Files\dBpoweramp\encoder\mp3 (Lame)\lame.exe" --cbr -q0 -b 320
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-26 22:15:13
Is it possible to keep the original folder structure? Thank you
Use
Code: [Select]
%path%
as titleformatting script for the task to preserve the folder structure. Or
Code: [Select]
$replace(%path%,stringToRemove,)
where stringToRemove is a prefix you want removed.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-26 22:22:13
@zimjo : thanks. The titleformating string is the same I've been using for years for lots of other things (moving/copying files for instance), and the file extension has always been preserved, so why should I add it now specifically for your component ?
Two reasons: Your titleformatting string breaks the logic that determines whether there is already an extension present and if not adds it automatically, and I'm not going to extend that logic now just because you are to lazy to add a few characters to the string. It seems you want to use my component, not the other way round.

The converter dialog looks alright.
Title: Re: foo_onewaysync
Post by: wcs13 on 2017-01-26 23:20:44
@zimjo : I didn't imply that I was lazy or anything. I just asked a mere question : "why should I add it now ?". I asked it because I like to understand. I wanted to understand why when I pass the same string to foobar, it just works. I wanted to know if there was a special reason why your component couldn't just act in the same way that foobar seems to do.

I just didn't know that I'd be running into "yet another developer with an ego bigger than the solar system just because he does some coding", that he would be condescending to me ("I'm not going to extend that logic now..."), and that he would dare call "lazy" somebody who was able to do a titleformatting script (dozens actually) bigger than those of 99% of foobar users. So big in fact, that I've had several foobar components modified by their developers, because the length of my scripts made them crash.

But yeah, aside from that, I must definitely be "lazy".

So hey, be nicer to the next guy who asks you something, OK ?
And thanks for nothing.
Title: Re: foo_onewaysync
Post by: jaydee77 on 2017-01-27 12:08:29
I'm using it with a Moto G (3rd Gen) and it seems to be working quite well. I've only got a minor issue: if I remove a song from my playlist on the PC and synchronize, the track is indeed removed from the playlist on my phone. However, it doesn't delete the actual file from the device even though 'Delete unreferenced files from destination' is checked in the settings.
I've got exact the same problem with latest version 0.5.10c. Bug is back again?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-27 22:36:45
... and the file extension has always been preserved, so why should I add it now specifically for your component ?
I didn't imply that I was lazy or anything. I just asked a mere question : "why should I add it now ?". I asked it because I like to understand. I wanted to understand why when I pass the same string to foobar, it just works. I wanted to know if there was a special reason why your component couldn't just act in the same way that foobar seems to do.
Your response sounded arrogant and your intention did not come across. Also, you did not state why the solution suggested initially is not viable for you.
In short: It can't be done exactly as foobar does it, because foo_fileops is not part of the foobar API. Even if it was, it would not be able to copy to MTP devices.
As I explained before, the reason is your titleformatting string, though not its magnificent length, but its content. Since the component does a lot of special string handling to be able to use the MTP library, I try to avoid changes in that area, at least before I polish the codebase.
While I develop this in my free time and for my own use I'm happy to share it with you guys. However, this requires a certain quality standard. By now, I've added more features than I anticipated initially, which makes maintaining that standard difficult without quite some additional effort and infrastructure.

... and that he would dare call "lazy" somebody who was able to do a titleformatting script (dozens actually) bigger than those of 99% of foobar users. So big in fact, that I've had several foobar components modified by their developers, because the length of my scripts made them crash.
Well done! Feeling better now?

And thanks for nothing.
In this thread, I answered every reported issue, try to offer practical solutions and fix things where necessary. In fact, this all comes free of charge, so actually your not entitled to anything.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-27 22:39:56
I'm using it with a Moto G (3rd Gen) and it seems to be working quite well. I've only got a minor issue: if I remove a song from my playlist on the PC and synchronize, the track is indeed removed from the playlist on my phone. However, it doesn't delete the actual file from the device even though 'Delete unreferenced files from destination' is checked in the settings.
I've got exact the same problem with latest version 0.5.10c. Bug is back again?
Works as intended for me. Remember that files, which were copied to the device with a version from before this was fixed, can still not be deleted automatically.
Title: Re: foo_onewaysync
Post by: Lucky Luciano on 2017-01-29 11:44:56
Tried installing it but Foobar hangs at start. I cannot access the console.
Installing other components works.
Version is 1.3.14


List of installed components
Spoiler (click to show/hide)
Title: Re: foo_onewaysync
Post by: zimjo on 2017-01-29 12:55:22
Try with a clean foobar install. If that works there is probably an incompatibility with another component. Try adding them one after another to identify the incompatible one.
Title: Re: foo_onewaysync
Post by: Lucky Luciano on 2017-01-29 15:23:03
I removed the component files, installed foo_onewaysync, moved back the other files and now it seem to work for some weird reason.

Anyway thanks a lot, this finally allows me to use my foobar2000 with my Nokia Lumia Phone!
Title: Re: foo_onewaysync
Post by: jaydee77 on 2017-01-30 11:58:20
Works as intended for me. Remember that files, which were copied to the device with a version from before this was fixed, can still not be deleted automatically.
A full resync did help. Thanks
Title: Re: foo_onewaysync
Post by: wcs13 on 2017-01-30 19:41:42
@zimjo : thanks. I didn't mean to sound arrogant initially. I was hoping for a technical explanation like the one you finally gave about foobar API and MTP devices, which makes sense. So yes, thank you for that.

Nobody here is entitled to anything regarding your component (we're not entitled to additional features, etc.). Everybody understands that. My point was merely about asking a question and expecting an answer that would make sense. That's all.

Also, I never said that the suggested solution wouldn't be viable. It probably is, haven't tried it yet. I just wanted to understand why there wouldn't be another one, in technical terms. I'm glad we sorted this out. :)
Title: Re: foo_onewaysync
Post by: Rollin on 2017-02-17 19:30:55
It seems that when editing titleformatting script in Tasks->Titleformatting scripts, changes aren't saved. So the only way to "edit" script is actually to remove it and create new one . Is it by design? foo_onewaysync 0.5.10c, foobar2000 1.3.14
Title: Re: foo_onewaysync
Post by: zimjo on 2017-02-18 09:09:20
For me the changes are displayed in the list of titleformatting scripts and the modified script appears in the dropdown list of scripts that can be assigned to a task. What might have gotten you confused is that the titleformatting script of a task is not automaticcaly modified. You want to explicitly assign the modified script to a task.
Title: Re: foo_onewaysync
Post by: fohrums on 2017-02-20 03:35:10
# SUGGEST

* Encoder
  + Define defaults for encoder settings
    - ofcourse we only want the basics for lowest size possible for portable devices
    - reason being, I don't know how to set this up and all my files are really large .flacs

(https://postimg.org/image/rvsojic4x/)
Title: Re: foo_onewaysync
Post by: zimjo on 2017-02-22 10:23:42
There is already a default entry after first installation of onewaysync. You can make it reappear by removing all encoders from the list, then restart foobar.
For the lame encoder you can find reasonable settings in the HA wiki (http://wiki.hydrogenaud.io/index.php?title=LAME#Recommended_encoder_settings). Searching the forum you will find information for other encoders as well.
Title: Re: foo_onewaysync
Post by: fohrums on 2017-02-24 23:05:47
There is already a default entry after first installation of onewaysync. You can make it reappear by removing all encoders from the list, then restart foobar.

I see. It's really cut-dry then.
Title: Re: foo_onewaysync
Post by: fohrums on 2017-02-25 01:33:04
# [SUGGEST] Being able to choose profiles to export w/ using hotkeys

I use OWS to export tracks using hotkeys. I've managed to define a hotkey and kept using "Last Used" to export a selection of tracks or even the track now-playing for quite a while. Now, this method isn't working for me anymore, because I export to various destinations - a local-directory being one & my phone being another.

So to export to different destinations you have to define it under "OWS -> Devices". Since we're talking about hotkeys here I can't actually export like how I intend to because apparently a "Sync Tasks" has to be defined and. The problem w/ OWS's Tasks is that they're only specific to an entire playlist as a whole

## - PROBLEM

* Unable to export "Profiles" using hotkeys labeled as [Context]
  + Because context-menu in Foobar2000 is the only way to export the following options w/ OWS profiles:
    - track-selection(s)
    - track-nowplaying

(https://postimg.org/image/6jttvbmnv/)
(https://postimg.org/image/s4ywixjej/)

## - SOLUTION

* none-so-far

___

#### > NOTE

* OWS's "Tasks" are only specific to playlists as a whole
  + This is why you can't use profiles to export the way I intend to
* What does [Context] have anything to do with exporting files?
  + Foobar2000's Context is otherwise known as right-clicking tracks and choosing options
    - so then profile hotkeys can't be set to export to destinations you've defined
Title: Re: foo_onewaysync
Post by: Safranente on 2017-03-02 23:31:00
Hi!

Really cool to develop such a useful component. However, so far I'm no able to use it.
Version:
0.5.10c
Log:
foo_ows: Error: Error: Could not copy file to WPD device, problem reading the source file. Filename: H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3
foo_ows: Done with command 'Best'.

The item plays normally in foobar, I also tested other playlists.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-03 13:54:14
Are path and filename correct?
Another user posted a similar problem, there it turned out that the file was on the network and the file could not be copied using the windows command console either. So, can you try the following command in cmd.exe and report the result:
Code: [Select]
copy "H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3" %userprofile%

Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-03 13:59:09
## - PROBLEM

* Unable to export "Profiles" using hotkeys labeled as [Context]
  + Because context-menu in Foobar2000 is the only way to export the following options w/ OWS profiles:
    - track-selection(s)
    - track-nowplaying
You could create a shortcut that calls a script which first adds selected items to a specific playlist, then calls a specific OWS command that is set up for that playlist and the desired device. With foo_run and the available foobar commandline commands I believe this to be possible.
Title: Re: foo_onewaysync
Post by: Safranente on 2017-03-04 02:12:59
Are path and filename correct?
Another user posted a similar problem, there it turned out that the file was on the network and the file could not be copied using the windows command console either. So, can you try the following command in cmd.exe and report the result:
Code: [Select]
copy "H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3" %userprofile%



Thanks for your quick reply. It's an external drive, formatted as NTFS.
This is the cmd result
C:\WINDOWS\system32>copy "H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3" %userprofile%
        1 file(s) copied.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-04 08:07:38
In OWS settings check the "Print additional debug info to console" and post the console output.
Title: Re: foo_onewaysync
Post by: Safranente on 2017-03-06 01:13:40
foo_ows: Attempting to copy file wpd:\Moto G (4)\SD-Karte von SanDisk\.ows_Best.sqlite to C:\Users\xxxx\AppData\Local\Temp\OWS46E5.tmp.sqlite
foo_ows: Done with command 'Best'.
foo_ows: Attempting to copy file wpd:\Moto G (4)\SD-Karte von SanDisk\.ows_Best.sqlite to C:\Users\xxxx\AppData\Local\Temp\OWS9A75.tmp.sqlite
foo_ows: Reading from db.
foo_ows: Reading from db.
Deleting temporary files.
foo_ows: Syncing 'Best(Rating)' to  wpd:\Moto G (4)\SD-Karte von SanDisk\Best\%artist% - %title%.$ext(%_path%)
foo_ows: Attempting to copy file H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3 to wpd:\Moto G
foo_ows: Error: Error: Could not copy file to WPD device, problem reading the source file. Filename: H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3
Deleting temporary files.
foo_ows: Done with command 'Best'.
Title: Re: foo_onewaysync
Post by: fohrums on 2017-03-06 13:32:56
foo_ows: Attempting to copy file wpd:\Moto G (4)\SD-Karte von SanDisk\.ows_Best.sqlite to C:\Users\xxxx\AppData\Local\Temp\OWS46E5.tmp.sqlite
foo_ows: Done with command 'Best'.
foo_ows: Attempting to copy file wpd:\Moto G (4)\SD-Karte von SanDisk\.ows_Best.sqlite to C:\Users\xxxx\AppData\Local\Temp\OWS9A75.tmp.sqlite
foo_ows: Reading from db.
foo_ows: Reading from db.
Deleting temporary files.
foo_ows: Syncing 'Best(Rating)' to  wpd:\Moto G (4)\SD-Karte von SanDisk\Best\%artist% - %title%.$ext(%_path%)
foo_ows: Attempting to copy file H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3 to wpd:\Moto G
foo_ows: Error: Error: Could not copy file to WPD device, problem reading the source file. Filename: H:\Musik\S\Sega Bodega\Kii\01 - Sega Bodega feat. Arm Watches Fingers - Kii.mp3
Deleting temporary files.
foo_ows: Done with command 'Best'.

Not too sure about this, but can you make sure your phone remains unlocked and have screen stay on for re-assurance.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-06 19:51:50
@Safranente: Your problem should be fixed with a new version. I have it ready for release, but right now the upload to the components page is not working...
Title: Re: foo_onewaysync
Post by: kode54 on 2017-03-07 04:48:07
The upload is truncated. Are you sure that it's supposed to be:

1) Version "0."
2) The download is 1.8MB and truncated.
3) The archive says the DLL is supposed to be over 4MB, is this correct?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-07 16:39:43
1) That is intentional. Hoping that the automatic update will not kick in, also for users to notice something is off... ;)
2) The size is correct.
3) Also correct.

I'm frequently having issues when uploading components. Before, I blamed my ISP, but now it seems there might be an issue with the server for the following reason: Tried uploading to the component page since yesterday, last time tried just now. The uploads end up having random bitflips compared to the original. Downloads, however, are always binary identical (in this case broken though). Uploading using mobile internet connection gave same result. Uploading to the forum worked right away, see first post.
Title: Re: foo_onewaysync
Post by: kode54 on 2017-03-07 21:13:29
That's quite amazing, especially since the server also signs every upload internally, so that it can validate the resulting downloads with the automatic update feature. Have you tried using a different web browser? Maybe faulty firewall or antivirus? There's also https for the foobar2000.org server's base subdomain, so you could try that as well to eliminate any firewall or other activity that affects cleartext traffic.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-07 21:59:32
Trying a different browser was a good idea, unfortunately without success. So far I tried with firefox and a fresh install of chrome, both with and without https. With https and chrome I get a ERR_SSL_BAD_RECORD_MAC_ALERT error after attempting the upload, and the file on the server seems to be unchanged. With https and firefox there is a similar error after upload (secure connection was set back), also no file change.
Don't believe that firewall or antivirus are an issue, because I observe similar behaviour with my mobile, which is not running any firewall or antivirus.
Title: Re: foo_onewaysync
Post by: kode54 on 2017-03-08 03:44:16
Okay, I tried uploading the forum copy myself, and it errors out randomly, ranging from roughly one thousand bit flips, to taking a full 90 seconds and timing out, to uploading successfully in about 10 seconds.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-03-08 19:50:58
Good to know it's not a problem on my end. And thanks for uploading a working archive.
Title: Re: foo_onewaysync
Post by: Safranente on 2017-03-09 02:48:29
@Safranente: Your problem should be fixed with a new version. I have it ready for release, but right now the upload to the components page is not working...

works well now, thank you!
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2017-04-28 21:29:29
I don't know if this is a bug with onewaysync, or just me making a mistake, but for some reason onewaysync doesn't want to work with qaac.

I've tested using qaac in foobar, and it converts my FLAC files to m4a just fine:

and qaac also works directly from the command line with this: H:\Install Files\qaac>qaac "C:\song.flac" -V 63 -o "C:\song.m4a"

Since onewaysync passes the encoder a raw PCM16 file and requires the %sr$ variable, I had to adapt the above (basic) command line command to this:
"H:\Install Files\qaac\qaac.exe" %in% --raw --raw-rate %sr% -V 63 --ignorelength -o %out%

When I then run the onewaysync some FLACs to test, it appears to have completed successfully...
"Exported files and playlists succesfully.

1 playlists exported.
1 files converted.
0 files updated."

However, behind that window are two other windows:
Could not load info (Object not found) from:
"C:\Users\jmaeshawn\AppData\Local\Temp\OWS4622.tmp.m4a"

and the second window:
Could not update tags (Object not found) on:
"C:\Users\jmaeshawn\AppData\Local\Temp\OWS4622.tmp.m4a"

The output folder on my phone contains nothing but a file called ".ows_Pixel.sqlite"

I've spent hours trying to figure this problem out . I should also mention that onewaysync converts just fine when using the built-in lame setting and that I'm not the only one having problems with qaac. I googled it, and it came up with a Japanese topic about using onewaysync with foobar. Since I'm bilingual, I read it and took note of the line"ちなみにこれってlame以外のエンコーダーを指定する事は可能ですか?qaacで試してみたらなんかエラー出ちゃいます。"
(Which translates to "By the way, is it possible to set it up with encoders other than lame? When I tried it out with qaac, it brings up some kind of error.")

Could someone explain why the conversion to aac completely fails only when being run through onewaysync, and how to fix the issue?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-04-30 09:14:30
Quote
"H:\Install Files\qaac\qaac.exe" %in% --raw --raw-rate %sr% -V 63 --ignorelength -o %out%
You are using arguments that exclude each other: --ignorelength cannot be used with --raw.
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2017-05-01 05:50:25
Thank you for the suggestion, zimjo. This time, I tried eliminating --raw and making the command line:
"H:\Install Files\qaac\qaac.exe" %in% --rate %sr% -V 63 --ignorelength -o %out% -
but this failed again with the same errors I had in my last post.

Doing some more research, I brought up the console window and looked at what foobar itself was passing to qaac as parameters during a successful version from FLAC:
 Command line: "C:\Program Files (x86)\Audio\foobar2000\encoders\qaac.exe" --ignorelength -s --no-optimize -V 64 -o "01 - Song.m4a" -
Working folder: C:\convertTest\
Encoder process still running, waiting...
Encoder process terminated cleanly.
Track converted successfully.
Total encoding time: 0:04.547, 48.90x realtime

Since that worked fine, I copied the parameters into onewaysync exactly, only replacing the "01 - Song.m4a"
 "C:\Program Files (x86)\Audio\foobar2000\encoders\qaac.exe" --ignorelength -s --no-optimize -V 64 -o %out% -
but it still gave the same exact errors as before.

Since I read that out of aac encoders, qaac provides the best quality at the smallest file size compared to other aac encoders, I'd really like to get it working with onewaysync. Do you have any other suggestions, or are onewaysync and qaac just not inter-compatible?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-05-01 10:10:06
You got rid of the wrong one. Try
Code: [Select]
"H:\Install Files\qaac\qaac.exe" %in% --raw --raw-rate %sr% -V 63 -o %out%
As stated in the encoder settings dialog, onewaysync uses the raw format.
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2017-05-01 12:27:46
*facepalms*
Thank you so much for helping, zimjo. That worked perfectly!

 Here I was thinking that the reason it said onewaysync uses raw format in the settings dialog is because foobar itself used that format, which led to me removing the wrong thing and copying the settings from the main encoder.

Regardless of how long it took to get here, it finally converted correctly, so I really appreciate the help. Now to figure out how to have it auto attach the cover image as a tag to the resulting m4a file without bringing up a file selection window for every single album in the playlist one by one... Hopefully that doesn't take as long to figure out.

Thanks again!
Title: Re: foo_onewaysync
Post by: zimjo on 2017-05-01 14:41:48
You're welcome!  :)
Onewaysync will automatically transfer tags from the source to the resulting m4a, so that album art is only embedded in the m4a if it was already present in the source file. The other method is to use folder based album art, e.g. folder.jpg. But automatically embedding art that was not present in the source file is not possible with onewaysync. Only possible method would be to specify a context command ('Process destination files with' ...) that does what you want. However, this won't work if the destination is on a MTP device, because such files can not be modified directly.
Title: Re: foo_onewaysync
Post by: hxrmn on 2017-05-05 02:58:21
Would it be possible to have a setting per task on whether to create a playlist file for that task?

siiiiiiiiick component anyways tho
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2017-05-05 13:51:47
You're welcome!  :)
Onewaysync will automatically transfer tags from the source to the resulting m4a, so that album art is only embedded in the m4a if it was already present in the source file. The other method is to use folder based album art, e.g. folder.jpg.
Thank you for the explanation of how onewaysync's tagging system works. However, while I have been testing it out with converting my flac and mp3 files to my Google Pixel (an MTP device),  it appears to copy the text tags from the source file to the main, but the converted file does not have the album art that was attached to the source. I have over 900 songs all with embedded artwork (and no external artwork in the folders to try the folder method you suggested) , and therefore I would really like to have all the images automatically tagged on the resulting m4a files as well.

Is there a switch or setting I need to turn on in onewaysync to get it to copy album art over to the tags, or is it supposed to be automatic? I do have the "copy cover art" setting under devices checked, though that doesn't seem to be doing anything...
Title: Re: foo_onewaysync
Post by: zimjo on 2017-05-15 23:02:54
Never really used embedded artwork in lossless files, so I never came across this, but you're right, it currently does not get copied. I will adress this with the next release.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-05-15 23:04:41
Would it be possible to have a setting per task on whether to create a playlist file for that task?

A single playlist file for all the playlists in the task? Or do you just want creating playlists turned off for that task?
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2017-05-31 16:51:35
Hello there,

I have similar problems like jmaeshawn :( . I use an fraunhofer aac encoder fdkaac.exe. I read several pages also http://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC (http://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC).

Now I have in the settings:
Quote
"C:\Program Files (x86)\foobar2000\Encoder\FraunhoferAAC\fdkaac.exe" %in%  --profile 2 --bitrate-mode 4 -s %sr% %out%

I get the following error message:
Quote
One way sync failed: Error: Could not copy file to WPD device, problem reading the source file. Filename: C:\Users\Ina\AppData\Local\Temp\OWS3A3B.tmp.m4a

I assume I did something wrong with the command line. So I would be happy to get a hint :) .
Title: Re: foo_onewaysync
Post by: Spirit_of_the_ocean on 2017-06-03 15:00:13
Sorry, I couldn't find a sort of edit button.

Okay, last time I wanted to create a command line and read this message board I was very tired. So now I realized what zimjo was posting. Onewaysync uses a raw input.

Now I used the posted command line and adapt it to the fraunhofer encoder.

My setting now is:
Code: [Select]
"C:\Program Files (x86)\foobar2000\Encoder\FraunhoferAAC\fdkaac.exe" %in% --raw --raw-rate %sr% -p 2 -m 5 -o %out%

I will try and change some settings.

@zimjo: Thanks again for your plugin. Since I often listen to music on my smartphone this makes it a lot easier to get new music on my phone.

I have some kind of request:

Could it be possible to make the Edit Encoder window wider. I now often take the code and put it into a text editor programm than change the code and copy it to the window.

Title: Re: foo_onewaysync
Post by: zimjo on 2017-06-21 22:17:58
Could it be possible to make the Edit Encoder window wider. I now often take the code and put it into a text editor programm than change the code and copy it to the window.
Check out the latest version...
Title: Re: foo_onewaysync
Post by: dawolman on 2017-07-07 17:32:17
I am having a problem when I set the number of conversion threads to 2 or higher. It seems like the tmp files created cannot be accessed by qaac.

My command line is

Code: [Select]
"C:\Program Files (x86)\foobar2000\encoders\qaac.exe" %in% --raw --raw-rate %sr% -V 73 -o %out%

and the errors from the console:

Quote
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS5B29.tmp: The process cannot access the file because it is being used by another process.
NP
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS5B2C.tmp: The process cannot access the file because it is being used by another process.
\
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS5B26.tmp: The process cannot access the file because it is being used by another process.
P
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS5B2B.tmp: The process cannot access the file because it is being used by another process.
7PTV
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS5B2A.tmp: The process cannot access the file because it is being used by another process.
P@
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS5B27.tmp: The process cannot access the file because it is being used by another process.
~P

It works fine with just one conversion thread, but I would like to use more to increase the speed of conversion. Any help would be greatly appreciated.
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2017-07-07 23:38:05
Zimjo, Thank you so much for fixing the issue with copying embedded images from flac files! I've tested it several times, and it seems to working great now! :)

However, I'm also having a similar issue to the one that dawolman described above. The encoder properly encodes and tags the first file, and then throws errors for the second file onwards. (After encoding all the other files, no less.)

I try to run the encode again, and this time it skips the first file since it already exists in the destination folder, encodes and tags the second file properly, then throws errors on the third file onward. So on and so forth, I've needed to run the process 100+ times to get it to do the entire playlist song-by-song  when my conversion threads is set to 8.

Curious, I tried using onewaysync's default LAME encoder:
Code: [Select]
"C:\Program Files (x86)\Audio\foobar2000\LAME\lame.exe" --vbr-new -h -V 4 -r -s %sr% %in% %out%
as well as my regular qaac encoder settings:
Code: [Select]
"C:\Program Files (x86)\Audio\foobar2000\encoders\qaac.exe" %in% --raw --raw-rate %sr% -V 63 -s -o %out%
just to see if it would do anything different, but they both seem to have the same problem when the encoder threads are set higher than 1. So it doesn't seems to be an encoder issue, but rather the plugin just has problems running more than 1 thread at a time.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-08 21:21:21
Cannot confirm that there is a general problem with the plugin. Converting with lame and up to 4 threads works just fine for me on Win 7. I recommend to exclude the generated lossy files from the media library. In case you convert to mp3, adding
Code: [Select]
*.lossy.mp3
to the media library exclude list will do the trick.
Does that change anything?
What windows version are you on?


I am having a problem when I set the number of conversion threads to 2 or higher. It seems like the tmp files created cannot be accessed by qaac.

It works fine with just one conversion thread, but I would like to use more to increase the speed of conversion. Any help would be greatly appreciated.
What windows version are you on? Please test with lame and report back if you observe the same issue.

Zimjo, Thank you so much for fixing the issue with copying embedded images from flac files! I've tested it several times, and it seems to working great now! :)
Great, thanks for the feedback  :)
Title: Re: foo_onewaysync
Post by: dawolman on 2017-07-08 21:47:36
OK, it works with lame. I am using Windows 10 x64.

I have no idea if this is relevant, but the output from lame gets printed in the console while the qaac processes pop up in their own command windows.

It seems like qaac is being run on the temporary files before the plugin is done creating them.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-09 05:48:12
The lame processes also have their own cmd window, its probably just minimized.
Do you have the 'print additional debug info to console' option enabled. If not so, what is the output from lame, is there any error?

The plugin determines only the name of the temorary file, but it is created by the encoder. So besides qaac, there should not be any other process accessing the file. Can you test if manually calling multiple instances of qaac works: Enable the 'print additional debug info to console' option. Look for the qaac command line in foobar console. Copy at least two distinct conversion commands and paste each of them in cmd.exe. Execute them simultaneously. Does that work?
Title: Re: foo_onewaysync
Post by: dawolman on 2017-07-09 17:06:11
OK, I tested two conversion commands simultaneously and it does work.

I think I should have been more clear about which temporary file. I mean the file that contains the PCM data, which i'm guessing is not created by qaac.

When I run OWS with multiple threads I get the following output:

Quote
foo_ows: Using encoder qaac with file ext m4a
 encoder cmd line "C:\Program Files (x86)\foobar2000\encoders\qaac.exe" %in% --raw --raw-rate %sr% -V 73 -o %out%
foo_ows: Converting file. Commandline: "C:\Program Files (x86)\foobar2000\encoders\qaac.exe"  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9E.tmp" --raw --raw-rate 44100 -V 73 -o  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9E.tmp.m4a"
foo_ows: Converting file. Commandline: "C:\Program Files (x86)\foobar2000\encoders\qaac.exe"  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9D.tmp" --raw --raw-rate 44100 -V 73 -o  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9D.tmp.m4a"
foo_ows: Converting file. Commandline: "C:\Program Files (x86)\foobar2000\encoders\qaac.exe"  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9B.tmp" --raw --raw-rate 44100 -V 73 -o  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9B.tmp.m4a"
foo_ows: Converting file. Commandline: "C:\Program Files (x86)\foobar2000\encoders\qaac.exe"  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9C.tmp" --raw --raw-rate 44100 -V 73 -o  "C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9C.tmp.m4a"
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9D.tmp: The process cannot access the file because it is being used by another process.
n]2 
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9B.tmp: The process cannot access the file because it is being used by another process.
R3\
foo_ows: End of converter output
foo_ows: Error: Conversion thread exit code 2. Converter output follows:
qaac 2.64, CoreAudioToolbox 7.10.9.0
ERROR: C:\Users\DANIEL~1\AppData\Local\Temp\OWS2F9C.tmp: The process cannot access the file because it is being used by another process.
"Z:'
foo_ows: End of converter output

The first process works fine, but the rest of the batch give the error "The process cannot access the file because it is being used by another process." It seems like qaac is being called on the subsequent PCM temp files before they are finished being created which causes the error.

When i run lame this issue does not occur. There are no errors and all files are encoded successfully.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-09 21:51:16
It is assured that generation of the PCM file is finished before the conversion command is executed.
The component does not make any distinction between different encoders. It simply executes the commands that you see printed to the console. So, if it works with lame, qaac must have some special requirements.

When the problem occurs, can you try to figure out which process has opened the problematic file? You can find some methods how to do that here (https://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows).

Title: Re: foo_onewaysync
Post by: 2sevens on 2017-07-11 17:09:34
Hello, I'm a bit new to the world of Foobar plugins, but this looks amazingly useful - thanks for making it!

Unfortunately, I cannot get it working

I'm unable to load Onewaysync 0.6.0 in Foobar V1.3.15 or 1.3.16.

I've hit the same problems in the following use-cases:
-Portable Mode enabled, BPM Analyser, IPod Manager and Columns UI loaded
-Standard Mode enabled, no optional components loaded

The machine runs on WinXP (I know, don't ask), with user accounts set up.

Foobar was installed by User in Portable Mode and Administrator in Standard Mode.

The error files are attached.

Are there any known conflicts or am I doing something wrong??  It looks like an excellent tool & I'd love to be asble to use it.  Thanks in advance for any help or suggestions.
Title: Re: foo_onewaysync
Post by: lvqcl on 2017-07-11 17:53:23
Are there any known conflicts or am I doing something wrong??  It looks like an excellent tool & I'd love to be asble to use it.  Thanks in advance for any help or suggestions.

Error code 3221225501 = 0xC000001D = illegal instruction.
Probably this component was built with SSE2 instructions enabled, and your CPU doesn't support them.
Title: Re: foo_onewaysync
Post by: 2sevens on 2017-07-11 20:16:00
Thanks for letting me know.  That old CPU is certainly creaking with age now.  Maybe time to retire it.

Appreciate you taking the trouble to help :)
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-13 16:47:31
Error code 3221225501 = 0xC000001D = illegal instruction.
Probably this component was built with SSE2 instructions enabled, and your CPU doesn't support them.
Possible, but I just double checked, there are no such optimizations. In principle, it should run fine on WinXP. Asking google shows that sometimes also bad drivers or a messed up windows installation can result in this error. My suggestion is to try with a clean windows install.
Title: Re: foo_onewaysync
Post by: kode54 on 2017-07-14 02:34:23
If you are building with MSVC 2013 or newer, SSE2 optimizations are enabled by default, and must be explicitly disabled.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-14 07:49:15
The component is built with MSVC 2012.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-14 07:51:34
It is assured that generation of the PCM file is finished before the conversion command is executed.
The component does not make any distinction between different encoders. It simply executes the commands that you see printed to the console. So, if it works with lame, qaac must have some special requirements.
The latest version 0.6.1 has a workaround for this issue.
Title: Re: foo_onewaysync
Post by: dawolman on 2017-07-14 14:18:02
It is assured that generation of the PCM file is finished before the conversion command is executed.
The component does not make any distinction between different encoders. It simply executes the commands that you see printed to the console. So, if it works with lame, qaac must have some special requirements.
The latest version 0.6.1 has a workaround for this issue.


Thank you! Everything is working great now.

I really appreciate the hard work you have put in to developing the plugin. Keep up the good work!
Title: Re: foo_onewaysync
Post by: lvqcl on 2017-07-14 17:31:39
If you are building with MSVC 2013 or newer, SSE2 optimizations are enabled by default, and must be explicitly disabled.
AFAIK it was MSVC 2012.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-07-17 10:59:03
Thanks for letting me know.  That old CPU is certainly creaking with age now.  Maybe time to retire it.
Here is a special build for you to test.
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2017-09-05 21:13:48
Hi again,
I really thank you again for how you made it work with qaac after I pointed it out a while back.

This time, I wanted to ask about something different. I know that individual songs can be synced by right clicking on them and choosing File Operations>One Way Sync> Last Used.
But is there a function for dynamically choosing which playlists to sync other than choosing them each time in the "tasks" preference page?

The reason I'm asking is because I'm trying to make two buttons on my foobar2000 skin for "Sync All Playlists" and "Sync Current (Active) Playlist", which is when I realized that the fb.RunContextCommand used for buttons only accepts functions in the context menu. That menu currently only shows File>One Way Sync>(NameofDevice).

This is when I realized that it would be helpful if expanded context menu options could be added as such:
File>One Way Sync>(NameofDevice)>Sync All Playlists
File>One Way Sync>(NameofDevice)>Sync Current Playlist
File>One Way Sync>(NameofDevice)>Sync Selected Playlists
In which the first two would do as stated, and the "Sync Selected Playlists" would run the current method of only syncing the playlists that were pre-selected in the tasks page.

Would it be possible for you to add these options in a future version, or is there already an option for these in One Way Sync somewhere that I am just overlooking?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-09-09 12:52:55
From what you write, it seems you are talking about the main menu. Anyways, that would be the proper place for such a command. In principle, this can be done and I might look into it.
Title: Re: foo_onewaysync
Post by: belidzs on 2017-09-12 18:29:46
First of all, big thanks to the dev who donates his time to develop this plugin for the community.

I decided to give this plugin a try after I finally abandoned m-TAGS which was incompatible with most of the synchronization/conversion plugins out there.

Unfortunately even though I didn't configure anything fancy I experienced that OWS modifies some of my source files. By the time I realized this, many of my files have been changed and had to be restored from backup. Checking a few of them revealed that mostly the image tag has been changed, but some files also had changes in the middle of them (according to KDiff3)

Considering the circumstances I'm unable to currently make use of this plugin, however I'm glad if I can help tracing down this problem, so maybe it can be fixed.

Please let me know which files are needed to replicate the issue.
Title: Re: foo_onewaysync
Post by: zimjo on 2017-09-15 17:06:45
Make sure to uncheck the options 'One Way Sync->Store path to lossy file in tags', 'One Way Sync/Devices->Always embed cover art', and maybe also 'One Way Sync/Devices->Copy cover art'. Then source files should no longer become modified. In any case, OWS only alters meta information, i.e. in the tags/embedded cover art, not in the music.
Title: Re: foo_onewaysync
Post by: belidzs on 2017-09-15 17:22:57
Make sure to uncheck the options 'One Way Sync->Store path to lossy file in tags', 'One Way Sync/Devices->Always embed cover art', and maybe also 'One Way Sync/Devices->Copy cover art'. Then source files should no longer become modified. In any case, OWS only alters meta information, i.e. in the tags/embedded cover art, not in the music.

Thanks for the tip, this solves my issue! To be honest I didn't expect a plugin called One Way Sync to touch any of the source files. I thought all of these alterations will only take place in the destination files. Even if it's only the metadata, any modification can cause problems if the source files are hashed for some reason (for instance because they are shared by a torrent client).

Just out of curiosity why did you decide to go this way?

ps: I think a warning message would be nice when user selects one of these options
Title: Re: foo_onewaysync
Post by: zimjo on 2017-09-16 09:04:25
Just out of curiosity why did you decide to go this way?
'One Way Sync/Devices->Always embed cover art'
It would be very slow (USB sticks etc.) or even impossible (MTP devices) to modify the file at the destination. Creating a temporary copy would be slower as well.

'One Way Sync->Store path to lossy file in tags'
When conversion speed is low, it makes sense to store the converted file at the path of the lossless source. Then, if the user decides to move the lossless source file to another path, the converted file can no longer be found by OWS. Storing the path as a tag resolves this problem.
Title: Re: foo_onewaysync
Post by: belidzs on 2017-09-20 10:41:59
Just out of curiosity why did you decide to go this way?
'One Way Sync/Devices->Always embed cover art'
It would be very slow (USB sticks etc.) or even impossible (MTP devices) to modify the file at the destination. Creating a temporary copy would be slower as well.

'One Way Sync->Store path to lossy file in tags'
When conversion speed is low, it makes sense to store the converted file at the path of the lossless source. Then, if the user decides to move the lossless source file to another path, the converted file can no longer be found by OWS. Storing the path as a tag resolves this problem.

I totally agree with the second point. However I noticed that all the converted files are first saved to the temporary directory and only after all of them are converted are they copied to the final device.

Isn't this temporary state would be perfect to add the cover art?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-09-21 19:16:15
Not all files require conversion. I agree with your point, but it does not apply to those files being copied without prior conversion.
Title: Re: foo_onewaysync
Post by: defiler218 on 2017-10-16 22:34:00
First, thank you for this awesome plugin. It is just what I was seeking in order to sync my playlist with Android phone.

Strangely I cannot make it work completely. Since I don't need any transcoding, I set my encoder to simple `copy` utility in Windows 10.

Copying to MTP storage works perfectly until the plugin tries to copy .m3u file or near that time. Then plugin freezes so do Explorer if I try to look up MTP folder. After several minutes the storage disconnects. It is very strange because the plugin perfectly copies all files before that for pretty long time. Any idea what might be the problem?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-10-17 21:29:09
Your encoder settings should not matter, unless you check 'Convert lossless files' or 'Convert these lossy file types'.

Whats the console output when that happens?

As a workaround you can set some folder on your computer as the destination. Then, copy the contents of that folder to your android using windows explorer. Do playlist copy without issue when done this way?
Title: Re: foo_onewaysync
Post by: defiler218 on 2017-10-31 19:15:59
As a workaround you can set some folder on your computer as the destination. Then, copy the contents of that folder to your android using windows explorer. Do playlist copy without issue when done this way?

Sorry for long delay. I tried what you said and now it's obvious that there is no issue with plugin. My phone doesn't want to transfer .m3u files for some reason. If I rename file's extension it is copied without issues. Now I'm going to figure why it is so picky.  ::)  Thanks for help!
Title: Re: foo_onewaysync
Post by: defiler218 on 2017-10-31 19:41:14
Could you make playlist addition as an option? It seems that MTP allows devices to restrict media formats such as playlists for instance.

UPD: Maybe I'm wrong and this is just a bug. Actually it is filed in Android Bug Tracker but not confirmed yet - https://issuetracker.google.com/u/1/issues/67428227
Title: Re: foo_onewaysync
Post by: zimjo on 2017-11-01 12:12:44
Indeed MTP can have special treatment for certain file types, see e.g. here (https://social.technet.microsoft.com/Forums/windows/de-DE/8ec3e084-735c-4456-90f0-fc190ab36a7f/warning-message-your-device-might-not-be-able-to-play-or-view-this-file-when-copying-mp3s-to-mtp?forum=w7itproui). I believe it is the drivers choice to enforce such special treatment.
So, you are either having a driver issue or you are suffering from the bug you linked to.
Try updating your android, as well as the phone drivers on your PC. Then, if you still observe the same problem, I suggest you open a new issue in android bug tracker.
Title: Re: foo_onewaysync
Post by: hxrmn on 2017-11-28 03:13:32
Would it be possible to have the component save playlists as m3u8 files instead of m3u? I noticed some issues with certain device players (e.g. Poweramp, Black Player) reading non-Western characters in m3u playlist files.

I know you can just rename them afterwards but is there any hidden benefit to leaving them as m3u?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-11-29 21:53:50
While this might work for Poweramp, it will surely result in problems with other players. There is always some player, where the one or the other does not work. There are a number of players that refuse to recognize m3u8 as playlist file. Therefore, I consider m3u to be the more compatible extension, even though you are technically correct. Since there are players where even m3u8 is not treated as proper unicode, but in the local codepage instead, I believe any attempt to find an extension that fits all is bound to fail.

Maybe there is an option in those players to change the default codepage?
Title: Re: foo_onewaysync
Post by: Anakunda on 2017-12-16 11:13:55
Is this plugin only supporting wired sync? I expected it also supports wire-less protocols (ftp or smb would come handy)

I'm using sharing PC library with portable in three steps - 1) conversion from lossless source to Opus via fixed converter profile to local folder 2) embedding cover within foobar and removing padding 3) send via ftp to device using Beyond Compare and remote folder sync profile.
This workaround is already rather straightforward and quick, can OneWaySync furthermore improve/consolidate the process?
Title: Re: foo_onewaysync
Post by: zimjo on 2017-12-18 19:14:10
Currently, to use SMB you have to mount the network share. This will be improved for the next update.
If the network share is mounted ows can do all of the three steps you listed.

PS: FWIW, you can use wires, antennas, use voodoo magic, or send a raven, as long as there is a windows drive letter it will work with ows ;)
Title: Re: foo_onewaysync
Post by: timvherpen on 2018-01-03 22:53:40
Is this plugin only supporting wired sync? I expected it also supports wire-less protocols (ftp or smb would come handy)

I'm using sharing PC library with portable in three steps - 1) conversion from lossless source to Opus via fixed converter profile to local folder 2) embedding cover within foobar and removing padding 3) send via ftp to device using Beyond Compare and remote folder sync profile.
This workaround is already rather straightforward and quick, can OneWaySync furthermore improve/consolidate the process?
Might aswell use something like Syncthing or Bittorrent/Resilio Sync.
I have a folder on my pc that's connected to the music folder on my phone using the syncthing app. Works exactly as you'd want it to, except it's safer and faster than ftp.
Title: Re: foo_onewaysync
Post by: otamaglimmer on 2018-03-04 01:04:44
Hi!

I've found this plugin incredibly useful, until now I had to copy my albums using the Windows Explorer, but finally I can copy albums to my MTP-only smartphone. Thanks!

I've configured it to convert my lossless files to cbr300 mp3s and copy them to the appropriate folder on the SD card. This are my lame settings:
"c:\program files (x86)\foobar2000\lame.exe" --cbr -h -b 320 -r -s %sr% %in% %out%

But I have a problem, it does not copy covers at all. I have files named "cover.jpg" or "folder.jpg" and many times a folder named "Artwork" with several pictures inside. I've tried configuring the cover filename as *.jpg,*.png but didn't seem to affect the process. I also tried writting there cover.jpg,cover.png,folder.jpg,Artwork/* and other combinations, but nothing was copied alongside the mp3 files.

In the One Way Syng options, Devices tab I've played with all the combinations activating and deactivating "Copy cover art" and "Always embed cover art"... no luck.

When the selected files are lossless they get converted and copied, but with no artwork is embedded or copied. When the files are mp3, and they have embedded artwork, it gets copied to the destination folder, but again no other files like jpgs are copied.

This is the console output, successfully copying files but not the cover art (in case it helps):

Code: [Select]
foo_ows: Attempting to copy file M:\Música\Art Pepper\1956 - The Complete Freewheeling Sessions\15 - Warnin'.mp3 to wpd:\Prime\sdcard1\Music\Art Pepper\1956 - The Complete Freewheeling Sessions\15 - Warnin'.mp3
foo_ows: Attempting to copy file M:\Música\Art Pepper\1956 - The Complete Freewheeling Sessions\16 - Stompin' At The Savoy.mp3 to wpd:\Prime\sdcard1\Music\Art Pepper\1956 - The Complete Freewheeling Sessions\16 - Stompin' At The Savoy.mp3
Deleting temporary files.
foo_ows: Finished task 'Copy to SD Card'.
foo_ows: Reading from db.
foo_ows: SQL error: no such table: OWS
foo_ows: Attempting to copy file  to
foo_ows: Error: File not found
Deleting temporary files.
foo_ows: Done with command 'Grand Prime'.

Are those sql errors related in some way to this?
Am I doing something wrong?

Thanks in advance!!
Title: Re: foo_onewaysync
Post by: zimjo on 2018-03-07 22:43:45
For cover filename enter:
Code: [Select]
cover.jpg,cover.png,folder.jpg
Files inside a different folder are currently not supported. Placeholders like * are not supported. When specifying a subfolder make sure to use '\' as folder separator.
Also make sure that 'Copy cover art' is checked. This works for me. With 'Always embed cover art' the art is embedded here as well. So the component seems to work as expected.
If there is still a problem, please post exact path of music files and cover art which is not copied.

PS: For long lists of filenames there seems to be an issue which will be fixed in the next release.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-03-13 23:03:56
But I have a problem, it does not copy covers at all. I have files named "cover.jpg" or "folder.jpg" and many times a folder named "Artwork" with several pictures inside. I've tried configuring the cover filename as *.jpg,*.png but didn't seem to affect the process. I also tried writting there cover.jpg,cover.png,folder.jpg,Artwork/* and other combinations, but nothing was copied alongside the mp3 files.
This should improve with the latest release 0.6.2. You can also specify artwork in subfolders, such as
Code: [Select]
Artwork\cover.jpg,Artwork\folder.jpg,Artwork\cover.png
Though, placeholders are not supported.

Is this plugin only supporting wired sync? I expected it also supports wire-less protocols (ftp or smb would come handy)
Since 0.6.2 smb is supported.
Title: Re: foo_onewaysync
Post by: otamaglimmer on 2018-03-24 20:07:45
This should improve with the latest release 0.6.2. You can also specify artwork in subfolders, such as
Code: [Select]
Artwork\cover.jpg,Artwork\folder.jpg,Artwork\cover.png
Though, placeholders are not supported.
Thanks. This is an improvement!
Are there any plans to support placeholders in the future? or at least to copy folders too. In my case I would copy all files inside an "Artwork" folder, or the whole folder itself. Either would be great...
Title: Which strategy, if any, to update info of tracks already sent to the phone?
Post by: fabiospark on 2018-03-28 09:48:49
I converted many tracks and sent them to the phone memory card
with the same folder structure I use in my PC FB:
- Audio\All music\Artist\Album\tracknumber.title for music, and
- Audio\Spoken\Artist\Album\tracknumber.title for audiobooks and courses.

After that I updated a lot of tags on the PC and I would like to
update the files on the memory card.

On the PC, some are Wavpack and some are MP3,
on the card all of them are MP3.

Is there a strategy I can follow to update (or sync) the info in the files on the card
accordingly to the info of the file on the PC?

I didn't use Onewaysync to convert and copy the files to the card, though.

Thanks.
Title: Re: foo_onewaysync
Post by: nikolai4ik on 2018-04-02 18:11:11
Gave this component another go just now (tried it multiple times across several years - never got it to work) and managed to get it working, thanks!

Actually my sync failed at 40% because folder name was too long (album title is Circles Super Bon Bon Sleepless How Many Cans? True Dreams of Wichita Monster Man Mr. Bitterness Maybe I’ll Come Down St. Louise Is Listening I Miss the Girl Unmarked Helicopters The Idiot Kings So Far I Have Not Found the Science). Is it possible to limit the path length somehow? Now I have to resync from the start...

And front.jpg not being copied.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-04-02 21:32:12
Are there any plans to support placeholders in the future? or at least to copy folders too. In my case I would copy all files inside an "Artwork" folder, or the whole folder itself. Either would be great...
There is currently no plan to support this, sorry.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-04-02 21:36:30
Is there a strategy I can follow to update (or sync) the info in the files on the card
accordingly to the info of the file on the PC?

I didn't use Onewaysync to convert and copy the files to the card, though.
Did you originally copy the files with foobar? Then it should be possible. You will need an encoder set up for  conversion to mp3 in ows. For ows to update your existing files: Move them into a folder named 'files'. Then set up an ows command using the exact same titleformatting you used when originally copying the files. Let me know if you run into issues.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-04-02 21:42:25
Gave this component another go just now (tried it multiple times across several years - never got it to work) and managed to get it working, thanks!

Actually my sync failed at 40% because folder name was too long (album title is Circles Super Bon Bon Sleepless How Many Cans? True Dreams of Wichita Monster Man Mr. Bitterness Maybe I’ll Come Down St. Louise Is Listening I Miss the Girl Unmarked Helicopters The Idiot Kings So Far I Have Not Found the Science). Is it possible to limit the path length somehow? Now I have to resync from the start...

And front.jpg not being copied.
Good to know that it works :)
What is your target device, MTP/WPD by any chance? Then the device might be limiting path length. You can shorten it in your titleformat script, see here (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#String_functions).
Can you give more info on the front cover issue?
Title: Re: foo_onewaysync
Post by: nikolai4ik on 2018-04-03 05:13:08
Gave this component another go just now (tried it multiple times across several years - never got it to work) and managed to get it working, thanks!

Actually my sync failed at 40% because folder name was too long (album title is Circles Super Bon Bon Sleepless How Many Cans? True Dreams of Wichita Monster Man Mr. Bitterness Maybe I’ll Come Down St. Louise Is Listening I Miss the Girl Unmarked Helicopters The Idiot Kings So Far I Have Not Found the Science). Is it possible to limit the path length somehow? Now I have to resync from the start...

And front.jpg not being copied.
Good to know that it works :)
What is your target device, MTP/WPD by any chance? Then the device might be limiting path length. You can shorten it in your titleformat script, see here (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#String_functions).
Can you give more info on the front cover issue?
WPD yes, microSD card via USB card reader. MTP is a nightmare.
$cut helped with my issue, thanks.
Covers do copy actually, didn't know this happens afterwards.
Title: Re: foo_onewaysync
Post by: nikolai4ik on 2018-04-09 18:31:32
What's error 4?

foo_ows: Error: Could not copy file to WPD device. source: "D:\hfsdf\Music\The Beatles\Hey Jude (1970)\01 - Can't Buy Me Love.mp3", destination: "\I:\I:\Music\The Beatles\Hey Jude (1970)\01 - Can’t Buy Me Love.mp3", error 4
Title: Re: foo_onewaysync
Post by: zimjo on 2018-04-10 20:22:08
... destination: "\I:\I:\Music\The Beatles\Hey Jude (1970)\01 - Can’t Buy Me Love.mp3"
This path can not work. Please post your settings for destination and titleformat script or alternatively a more complete console log.
Title: Re: foo_onewaysync
Post by: nikolai4ik on 2018-04-11 06:59:50
... destination: "\I:\I:\Music\The Beatles\Hey Jude (1970)\01 - Can’t Buy Me Love.mp3"
This path can not work. Please post your settings for destination and titleformat script or alternatively a more complete console log.
No, it does work (USB card reader with microSD inside), it's just that 1 song was refusing to be copied until I deleted it from the card and reran OWS. Error code wasn't very informative though.

https://i.imgur.com/vJ5sE6T.png
https://i.imgur.com/4tIZ45b.png

Also, is it possible to rename front.jpg to folder.jpg during syncing?
Title: Re: foo_onewaysync
Post by: zimjo on 2018-04-17 20:09:41
That is a funny naming scheme for wpd storage..  :o  :D
You could write a script that takes care of the renaming and set it up with foo_run. Then choose the foo_run command in ows to do the postprocessing of files.
Title: Re: foo_onewaysync
Post by: theroelr on 2018-04-19 20:21:36
Hello,

I seem to have run into a problem when syncing a larger number of files. Yesterday I transferred a bit over 1000 songs. Today I noticed 2 or 3 songs were missing, but at the same time about 2 or three songs appeared as duplicates in my library. But these duplicate songs would have different file names. For example, I have SongA.mp3 and SongB.mp3, but both files contain SongA (and its metadata) and SongB is nowhere to be found.

I may have identified what the issue could be, but I am not 100% if this is really what is happening:

Before all the songs are copied they are converted and temporarily stored in the Temp-folder. Each file seems to get a name of the shape
Code: [Select]
OWS<4-digit hexadecimal number>.tmp.<extension>
Is this number randomly generated or is there some structure behind it? And if it is randomly generated, is there a check for collisions? Because what I think is happening is that two different songs get the same file name after conversion, which means one song will "disappear" and one song will appear twice.
Title: Re: foo_onewaysync
Post by: firewater on 2018-05-13 21:20:09
Thank you very much for this plugin!
Title: Re: foo_onewaysync
Post by: rehelekretep on 2018-05-21 11:37:37
Hi zimjo, this is a fantastic plugin! However, I think I'm going mad.
When I first downloaded this plugin and got it running, it was automatically embedding cover art - in fact it gave me anotification when transferring files, something along the lines of 'embedding art' and then it would transfer.
Now, no matter what I select in my plugin options, it refuses to embed art.
Do you have any idea why this might be?
Title: Re: foo_onewaysync
Post by: rehelekretep on 2018-05-21 11:42:12
Ok this is bizarre - when I DESELECT the options "Copy cover art" and therefore "Always embed cover art" is greyed out, it actually copies and embeds the cover art. How has this reversal happened?!
Title: Re: foo_onewaysync
Post by: Plain Old Me on 2018-06-03 03:48:27
Hi zimjo (and everyone else, as this is my first post),

thank you so much, I just tried OWS. Here are some issues I had so far...


Thank you for considering!
Title: Re: foo_onewaysync
Post by: zimjo on 2018-06-14 21:55:48
Because what I think is happening is that two different songs get the same file name after conversion, which means one song will "disappear" and one song will appear twice.
Good find. There is a very small chance for collisions, so what you described might be what happened. The next release will be collision free.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-06-14 21:58:47
Ok this is bizarre - when I DESELECT the options "Copy cover art" and therefore "Always embed cover art" is greyed out, it actually copies and embeds the cover art. How has this reversal happened?!
This could be a foobar issue, see https://hydrogenaud.io/index.php/topic,114257.0.html (https://hydrogenaud.io/index.php/topic,114257.0.html).
Title: Re: foo_onewaysync
Post by: zimjo on 2018-06-14 22:21:21
Convert song 1, convert song 2,... transfer song 1, transfer song 2,... transfer song 999.
This MO has two flaws:
a) If one has to abort a large sync task, any progress so far is lost, the already converted files are not transfered.
b) Syncing a library of 10,000 tracks means 10,000 copies in %TEMP%, which fills my HDD to the rim.
The sequence is playlist1 (convert and copy), playlist2 (convert and copy) and so forth... so unless you have gigantic playlists the HDD space issue is minor and not too much progress is lost when aborting.

There seems to be no way to embedd artwork without copying the external image file, which is what happens if one checks "Copy cover art". If it is unchecked, the folder.jpg will not be copied, but there is also no embedded artwork anymore.
There is: Check 'Copy cover art' and 'Always embed cover art'.

#metoo. A warning would have been nice.  :(
...
First of all, I transcode, so there already are temporary files, no additional steps would be necessary. And secondly, even if there was no en-/transcoding, I would gladly wait a little longer than have my source files manhandled.
I prefer general solutions. Since not everybody transcodes there is no viable solution without creating more temp files and I do not consider that a good solution. You see, there is no solution with justifiable implementation effort.
Title: Re: foo_onewaysync
Post by: daihen on 2018-07-08 03:10:20
Not a good plug-in...

Tried to use it but a very serious issue occurs on about 1% of my transfers. I noticed that some files will have mismatched information from other files. Not worth combing through thousands of files to fix this error. Auto-fill will not work as it will either have wrong file names/directory/etc. or wrong meta-data. Not one or the other.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-07-08 21:41:01
@theroelr issue is fixed with version 0.6.3

@daihen: Judging from your post it is for the greater good to remove this component: To delete files copied onto your device with this component check the 'delete unreferenced files' option and run the sync command. Then empty the synced playlists and sync again.
Title: Re: foo_onewaysync
Post by: tipar on 2018-07-21 01:02:47
As awesome as it is I do not like the fact that I cannot copy all the files to the same folder; I mean they are separated by artist even if I titleformat only with _path. Good work indeed, anyway.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-07-27 13:50:03
Works for me. %_path% might contain subfolders already! Instead try something like
Code: [Select]
%artist% - %title%
if you want to put all files in same folder. Also, disable the 'Create subfolder for each task' option.
Title: Re: foo_onewaysync
Post by: randal1013 on 2018-07-28 13:54:07
Just discovered this component and it's great! One suggestion: add an option to include DSPs in a task.
Title: Re: foo_onewaysync
Post by: Erratic on 2018-08-11 15:03:30
Can't seem to get the "Delete unreferenced files" option to work at all, I still end up with the old files not on the playlist not being deleted at all.

Also how do I format filenames with spaces in them?
I want to get a format such as "track. artist - title" which I can do fine elsewhere in foobar, but in OWS filenames seem only scripted up to the first script element
ie for the above I would normally use "%track%. %artist% - %title%" but in OWS it results in a filename of eg "01.mp3".
If i use the %filename% script I get double "filename.mp3.mp3" but without the leading "tracknumber." even if it had one in the filename"


Title: Re: foo_onewaysync
Post by: jmaeshawn on 2018-08-23 04:40:36
You helped fix an issue I was having once before, but now I am having a different issue, and I have no idea what is causing this,

Basically, what happens is this:
I want to sync a playlist with 97 songs in it, and have onewaysync start doing so. It begins converting the files and I can see them in the windows %temp% directory as
Code: [Select]
OWS1CA8.tmp.m4a
OWS1CD8.tmp.m4a
OWS1D27.tmp.m4a
OWS2DB6.tmp.m4a
OWS2DE6.tmp.m4a
OWS2E54.tmp.m4a
OWS3ACC.tmp.m4a
...
etc.

However, the strange thing is that about halfway into the sync, many of the .tmp.m4a files in the windows temp directory begin disappearing, before all of the songs have even been converted,
Therefore, only 36 of the 97 songs get synced, with the rest generating the following errors in two different error windows:
Code: [Select]
Could not load info (Object not found) from:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS1CA8.tmp.m4a"
Could not load info (Object not found) from:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS1CD8.tmp.m4a"
Could not load info (Object not found) from:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS1D27.tmp.m4a"
Could not load info (Object not found) from:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS2130.tmp.m4a"
...
etc
and
Code: [Select]
Could not update tags (Object not found) on:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS1CA8.tmp.m4a"
Could not update tags (Object not found) on:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS1CD8.tmp.m4a"
Could not update tags (Object not found) on:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS1D27.tmp.m4a"
Could not update tags (Object not found) on:
"C:\Users\Jmaeshawn\AppData\Local\Temp\OWS2130.tmp.m4a"
...
etc

I also tried a test sync using the mp3 conversion that is default with onewaysync, but have the same issues with it.

I'm guessing these errors are caused by the files that are in the %temp% directory disappearing before onewaysync has finished processing them, but do you know why this is happening now, even though it was working just fine before?

The only thing that's changed since the last time I synced is that there was a windows update that updated me to the latest Windows 10 build (I'm now on "Version 1803 OS Build 17134.228").

Would the Windows update cause this problem with onewaysync to suddenly arise, somehow? I updated the component to the latest 0.6.3a build just to see if it was some sort of compatibility issue between the new windows version and the previous version of onewaysync that I was using, but the problem remained.

Please help me with this. Thank you in advance.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-08-24 19:24:32
@Erratic it works for me. Can you post the console log. Enable the 'Print additional debug info to console' option.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-08-24 19:26:07
@jmaeshawn never seen this behavior. Maybe your harddrive is almost full, and windows starts to delete files in temp folder by itself?
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2018-08-24 20:12:41
@zimjo: I hadn't thought of that, but I think that may have been the problem...

In my case, my C:\ drive is a small 128GB SSD, which only had 10GB left on it. Because the windows %temp% directory defaults to the C: drive, it looks like files were getting deleted because of how onewaysync makes a copy of all 97 of the flac files, plus the completed converted mp3 or m4a files in the %temp% directory.

One thing that would help prevent things like this (for other people like me who use small SSDs as their system drive) would be if you added an option in the onewaysync settings so that a user could specify a path where the temporary files get stored. That way, a user could set the temp files to go to any directory they want to, otherwise onewaysync would default to "C:\Users\Name\AppData\Local\Temp" as usual if the user did not specify a different directory

Is it possible for you to add such an option?
Title: Re: foo_onewaysync
Post by: zimjo on 2018-08-24 21:50:26
Deactivate the Win10 feature 'storage sense'. This should fix your issue for now. I'll think about a better solution for future releases, such that you can reactivate it.
Title: Re: foo_onewaysync
Post by: jmaeshawn on 2018-08-25 03:21:46
I didn't even know there was a "Storage sense" setting in Windows 10. Thank you for letting me know about it. I turned it off, and also turned off a seemingly related setting I found right under the Storage sense setting, labeled "Delete temporary files that my apps aren't using".

This seems to be a good temporary workaround for the problem, but I hope you can come up with a better, long-term solution for this, since I'm sure everyone else with similar setup as me (SSD users or people with smaller HDDs) will appreciate having this fixed, too.

Thank you in advance for your work.
Title: Re: foo_onewaysync
Post by: tipar on 2018-08-26 21:55:51
As awesome as it is I do not like the fact that I cannot copy all the files to the same folder; I mean they are separated by artist even if I titleformat only with _path. Good work indeed, anyway.

Now we're talking! It copied all the files but if I am not wrong I can not press a playlist and then just copy the files. I must create a different task for different playlists, isn't? Thanks and regards.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-08-27 18:39:25
You can, using the context menu command. You can also select multiple playlists per task.
Title: Re: foo_onewaysync
Post by: tipar on 2018-09-02 14:03:49
Hi again, I am creating the wiki page of the component. I do not know if maybe you can revise the text before sending it or if you do not want any wiki. I have several questions. before sending it. I can post them here or send by PM. Regards.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-09-02 16:14:06
Great idea! Post here or PM me, whatever you prefer.
Title: Re: foo_onewaysync
Post by: tipar on 2018-09-03 18:27:17
*'''Save lossy files at lossless source path''':
The exact meaning and what is the point?

*'''Convert lossless files''':
What is the point?

*'''Show files removed since last sync''': the files that were removed after the previous sync will be added to a special playlist
On Foobar?

*'''Delete unreferenced files''':
Files that are not check to copy on the next sync will be erased on the destination device?

*'''Import files from device''':
Are they not already transferred?

*'''Delete files after successful import''':
Where and what is the point? Maybe if you do not want them on Foobar and you are only transferring them with the intention of erasing them after is done?

I hope they are not too complicated I have only to fix those things to finish the Wiki. Regards and thanks.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-09-04 22:37:55
*'''Save lossy files at lossless source path'''
Stores converted files, so they do not need to be converted again. Useful for machines with weak CPU but lots of storage.

*'''Convert lossless files''':
What is the point?
Converting e.g. flac to mp3 or opus saves lots of storage space. If you have lossless files, such as e.g. flac, you probably do not need the same quality on your mobile player. Enabling this option will make OWS convert lossless files to another format, using the specified encoder in ows settings.

*'''Show files removed since last sync''': the files that were removed after the previous sync will be added to a special playlist
On Foobar?
Files deleted at the target location will be added to a special foobar playlist.

*'''Delete unreferenced files''':
Files that are not check to copy on the next sync will be erased on the destination device?
That is right.

*'''Import files from device''':
Are they not already transferred?
This is for people that use their device also as usb stick, or maybe the device is a mobile phone and they want to import images...  One can specify a general folder on the device and files within that folder will be copied. This can be any type of file, totally unrelated to foobar.

*'''Delete files after successful import''':
Where and what is the point? Maybe if you do not want them on Foobar and you are only transferring them with the intention of erasing them after is done?
See answer above.
Title: Re: foo_onewaysync
Post by: tipar on 2018-09-05 17:38:12
Thanks; I will post the Wiki when done, I have to do a last couple of checks.
Title: Re: foo_onewaysync
Post by: tipar on 2018-09-08 12:41:10
If you see some errros, feel free to correct it. http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/foo_ows

Regards.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-09-08 21:57:01
Hello,

First off, this plugin is an absolute godsend! Does everything foo_dop did, just for other devices! I thank you very much for creating it :)
I have a few questions regarding the plugin:
1. Is there a way to see a log of all the changes that were made in a sync? It would be very useful to me
2. For some reason, when converting files, once a folder has a question mark or a dot (could happen in more cases, those are the only ones I've seen so far) it would replace them with an underscore, unlike foobar's file operations feature, The question marks I can somewhat understand because they're an "illegal" character in folder names, but why replace the dots? As far as I know they're not illegal (as file operations can and does create folders with dots in the name)…

Thanks for all your work, and thanks in advance for any help regarding those questions :)
Title: Re: foo_onewaysync
Post by: zimjo on 2018-09-13 20:02:21
The closest thing to a log is what is written to the console. You can make this log more verbose in OWS's settings.
Regarding char replacement: Dots are replaced if they are the last character in a folder or if they are directly after a space. Also three subsequent dots are replaced.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-09-13 20:03:35
Thanks tipar!  :D  If you don't mind I will share the link and credit you in the first post.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-09-14 11:15:40
The closest thing to a log is what is written to the console. You can make this log more verbose in OWS's settings.
Regarding char replacement: Dots are replaced if they are the last character in a folder or if they are directly after a space. Also three subsequent dots are replaced.

Thanks for the reply!
For some reason I didn't notice the "additional debug info" option in the settings.
I assume there is no way to change how the chars are replaced without modifying the source code, right?
Title: Re: foo_onewaysync
Post by: zimjo on 2018-09-14 16:13:16
Why do you need to change how chars are replaced?
You're right, it cannot be done without modifying source code.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-09-16 09:57:31
Why do you need to change how chars are replaced?
You're right, it cannot be done without modifying source code.

Well... I have some albums / songs with question marks and three subsequent dots in their titles, so I would have liked to have them similarly named to how foobar's file operations feature names them (as that's the standard for me and the way I've been using to sort my music accordingly until I came across your plugin).

Title: Re: foo_onewaysync
Post by: tipar on 2018-09-24 15:04:09
Thanks tipar!  :D  If you don't mind I will share the link and credit you in the first post.

It is OK, Firefox did not let me enter the forum in the previous Mozilla update, I just waited until I could, sorry for the delay. Regards.
Title: Re: foo_onewaysync
Post by: kode54 on 2018-09-26 03:39:21
That was due to a certificate issue that was not taken care of while it would have been possible to transition seamlessly. The paid certificate was allowed to expire, and the server was configured to pin the certificate vendor that paid certificate came from. What should have happened, is the pinning should have been reduced or even removed two weeks before expiration, so that a seamless transition could occur when the certificate finally expired.

The only alternative for existing users was to either clear their HPKP settings file of any references to this domain, which was fairly straightforward, if not annoying, for desktop browsers, while quite troublesome for mobile browsers. Or wait out the two weeks.
Title: Re: foo_onewaysync
Post by: dogseatdogfood on 2018-10-13 16:35:30
The addon fails to sync crashing with a null pointer error whenever there is any playlist to sync. If there are no playlists checked for the task, the addon completes with "Exported files and playlists succesfully. 0 playlists exported. 0 files converted. 0 files updated."

I have uninstalled, deleted the addon configuration, and reinstalled the addon, and this still happens.

Crash log and dump attached.
Title: Re: foo_onewaysync
Post by: dogseatdogfood on 2018-10-13 23:10:59
The addon fails to sync crashing with a null pointer error whenever there is any playlist to sync. If there are no playlists checked for the task, the addon completes with "Exported files and playlists succesfully. 0 playlists exported. 0 files converted. 0 files updated."

I have uninstalled, deleted the addon configuration, and reinstalled the addon, and this still happens.

Crash log and dump attached.
I think I figured it out. I had added .cue-files that pointed to non-existing files to my playlists by accident. Probably the component tries to stat every file in the playlist and gets an unexpected null value when it's a cue pointer? I tried with some dead items in the playlist and they didn't crash anything.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-10-20 16:04:22
Thanks for the detailed bug report. Makes my life easier :)

Fixed with new release 0.6.3b.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-11-18 21:22:21
Hello,
I've encountered the known problem which mismatches metadata and files in my device - some files end up in the wrong path, some get incorrect metadata after conversion, and some files suffer from both symptoms.
I have version 0.6.3a of the component.

Is there a way to solve this problem?
Title: Re: foo_onewaysync EMPTY PLAYLIST
Post by: azagoria on 2018-12-01 00:06:52
I am new to all of this and just trying to synch playlists to my AGPTEK A05 mp3 player.  When I select all the files in an established FOO playlist; right click and go through synch process, the music files are downloaded , neatly organized in files by album, and show up in the navigation on the AGPTEK.  The named playlist does show up under playlists, however, when I click on it it says no files.  No files were associated with the list.  There is an .m3u file on the device with playlist name,  but it is only 1 KB size.  What am I doing wrong?

Thanks.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-12-07 21:20:05
Hello,
I've encountered the known problem which mismatches metadata and files in my device - some files end up in the wrong path, some get incorrect metadata after conversion, and some files suffer from both symptoms.
I have version 0.6.3a of the component.

Is there a way to solve this problem?
Do you have large playlists? How many threads do you use?
Try cleaning up temporary files in Windows, maybe this will improve the situation, but I doubt it. Also try limiting the number of conversion threads to one and see if this fixes the problem.
Title: Re: foo_onewaysync
Post by: zimjo on 2018-12-07 21:24:50
No files were associated with the list.  There is an .m3u file on the device with playlist name,  but it is only 1 KB size.  What am I doing wrong?

Thanks.
Is the player connected via MTP? You can tell by the first letters of the device path in OWS, if they are 'wpd' it is connected via MTP.
Files on MTP devices can not be modified. This is not a limitation of OWS or foobar, but of windows.

To work around this, you can set up a OWS sync command. Or you first export to your hard drive and copy files manually to your mp3 player.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-12-09 21:20:45
Do you have large playlists? How many threads do you use?
Try cleaning up temporary files in Windows, maybe this will improve the situation, but I doubt it. Also try limiting the number of conversion threads to one and see if this fixes the problem.

Yes, to be frank I only have one playlist with all my music in it... 3082 items. I use 3 threads, that's the maximum the plugin will let me.
Will try to clean the temp folder and limit the threads to 1 and see what I get.

Thanks!
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-12-10 19:44:47
Okay, I have tried to limit the conversion threads to 1, and it didn't help...
I think something is messing with my temp folder but I'm not sure what. I will try to configure my temp folder to another drive and try again, and will report back.
Also I have attached the debug info from foobar's log (password protected - sent you a PM with the password) If it's any help.

Thanks a lot :)
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-12-11 11:12:36
Okay, I have tried to limit the conversion threads to 1, and it didn't help...
I think something is messing with my temp folder but I'm not sure what. I will try to configure my temp folder to another drive and try again, and will report back.
Also I have attached the debug info from foobar's log (password protected - sent you a PM with the password) If it's any help.

Thanks a lot :)

Tried again with a different temp folder on a different drive (previously was on a SSD, now on a HDD), but still errors occur.
The mismatched files are different every time so it's probably not a problem with specific files.

Any clue to what's going on?
Title: Re: foo_onewaysync
Post by: zimjo on 2018-12-11 20:25:44
@Pok_Madui if you are on Win10, please do check the following windows settings:
I didn't even know there was a "Storage sense" setting in Windows 10. Thank you for letting me know about it. I turned it off, and also turned off a seemingly related setting I found right under the Storage sense setting, labeled "Delete temporary files that my apps aren't using".

This seems to be a good temporary workaround for the problem, but I hope you can come up with a better, long-term solution for this, since I'm sure everyone else with similar setup as me (SSD users or people with smaller HDDs) will appreciate having this fixed, too.

Thank you in advance for your work.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-12-11 20:34:56
@Pok_Madui if you are on Win10, please do check the following windows settings:

Those two settings are disabled on my PC, even before i got the plugin.
Maybe it's the size of my playlist, I don't know...
Title: Re: foo_onewaysync
Post by: zimjo on 2018-12-11 21:51:51
Release 0.6.4 hopefully fixes these issues for good  :)
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-12-12 10:36:23
Release 0.6.4 hopefully fixes these issues for good  :)

Thanks! Will try again later today and report back with the results.
Title: Re: foo_onewaysync
Post by: Pok_Madui on 2018-12-12 16:56:40
I'm happy to report that I've tried syncing to my phone again, and so far I haven't found any problems!

Thanks zimjo for all your support and hard work and for this awesome plugin, it really makes the process of syncing to my phone as simple as (literally) pressing a button  :D


Title: Re: foo_onewaysync
Post by: nekoht on 2019-02-07 01:20:57
Attempting to convert FLAC files still doesn't work for me.

Code: [Select]
foo_ows: Syncing 'All Music' to  G:\MusicTransfer\Library\%album artist%\%album%\%title%.$ext(%_path%)
foo_ows: Using encoder lame with file ext mp3
encoder cmd line C:\Tools\lame3.100\lame.exe -s %sr%
foo_ows: Converting file. Commandline: C:\Tools\lame3.100\lame.exe -s 44100 "C:\Users\zachd\AppData\Local\Temp\OWS810C.tmp" "C:\Users\zachd\AppData\Local\Temp\OWS810C.tmp.mp3"
foo_ows: Error: Conversion thread exit code -1. Converter output follows:
Warning: unsupported audio format
Can't init infile 'C:\Users\zachd\AppData\Local\Temp\OWS810C.tmp'
p
foo_ows: End of converter output
foo_ows: Converting file. Commandline: C:\Tools\lame3.100\lame.exe -s 44100 "C:\Users\zachd\AppData\Local\Temp\OWS8979.tmp" "C:\Users\zachd\AppData\Local\Temp\OWS8979.tmp.mp3"
foo_ows: Error: Conversion thread exit code -1. Converter output follows:
Warning: unsupported audio format
Can't init infile 'C:\Users\zachd\AppData\Local\Temp\OWS8979.tmp'
o 
foo_ows: End of converter output
foo_ows: Converting file. Commandline: C:\Tools\lame3.100\lame.exe -s 44100 "C:\Users\zachd\AppData\Local\Temp\OWS92D0.tmp" "C:\Users\zachd\AppData\Local\Temp\OWS92D0.tmp.mp3"
foo_ows: Error: Conversion thread exit code -1. Converter output follows:
Warning: unsupported audio format
Can't init infile 'C:\Users\zachd\AppData\Local\Temp\OWS92D0.tmp'
3\
foo_ows: End of converter output
foo_ows: Converting file. Commandline: C:\Tools\lame3.100\lame.exe -s 44100 "C:\Users\zachd\AppData\Local\Temp\OWS9D03.tmp" "C:\Users\zachd\AppData\Local\Temp\OWS9D03.tmp.mp3"
foo_onewaysync: Error during file conversion: User abort
foo_ows: Error: User abort
Deleting temporary files.
foo_ows: Done with command 'Move'.

I can convert these files from the command line perfectly fine, so it seems like something is getting messed up when it's converted to PCM. The output contains a bunch of garbage characters too. They don't show up in the code block, so see the picture for reference.
Title: Re: foo_onewaysync
Post by: zimjo on 2019-02-08 18:55:03
As described in the OWS encoder settings dialog you must configure the encoder for raw pcm input. For lame, this means you must include the -r switch in the lame command line.
Title: Re: foo_onewaysync
Post by: bee on 2019-03-17 08:07:22
Is it possible to sync to an ftp folder? I tried mapping it to my phone and got a success popup, but nothing was actually transferred. Might have something to do with the fact that an ftp path uses "/" instead of "\"
Title: Re: foo_onewaysync
Post by: Iwakura on 2019-03-18 01:21:33
Been using this for quite a while alongside Syncthing for putting files onto my phone.
One pretty major reoccurring problem I face is that the wrong album art gets applied to entire albums at a time

Updated a few weeks ago when I lost my output drive, continues to happen on clean exports

Title: Re: foo_onewaysync
Post by: zimjo on 2019-03-26 18:12:20
Is it possible to sync to an ftp folder? I tried mapping it to my phone and got a success popup, but nothing was actually transferred. Might have something to do with the fact that an ftp path uses "/" instead of "\"
Please provide more details, i.e. the console log.
Title: Re: foo_onewaysync
Post by: zimjo on 2019-03-26 18:14:56
Been using this for quite a while alongside Syncthing for putting files onto my phone.
One pretty major reoccurring problem I face is that the wrong album art gets applied to entire albums at a time
What does your config look like? Is it reproducible? More info is needed, i.e. the console log.

OWS requires the album art to be located in the same folder as the music files.
Title: Re: foo_onewaysync
Post by: runinit2 on 2019-08-13 08:27:58
I am having an issue getting any conversions working.. Maybe its an issue with the 1.5 beta? The command works in cmd.exe and its using the raw pcm stream!

foo_ows: Using encoder OGG with file ext ogg
   encoder cmd line c:\tools\oggenc2.exe --raw --resample %sr% -q 5 %in% %out%
foo_onewaysync: Encountered error Unsupported file format
D:\Music\FLAC\2019\Captain Kirk\Jurassic Dark [EP]\02 - Katvealue.flac, , D:\Music\FLAC\2019\Captain Kirk\Jurassic Dark [EP]\02 - Katvealue.flac.lossy.ogg
foo_onewaysync: Encountered error Unsupported file format
Title: Re: foo_onewaysync
Post by: zimjo on 2019-08-13 17:14:43
Decoding of the original flac file (D:\Music\FLAC\2019\Captain Kirk\Jurassic Dark [EP]\02 - Katvealue.flac) failed. Without looking at the file I can not say more. Can you upload the file somewhere for further analysis? Maybe send me the link via PM.
Title: Re: foo_onewaysync
Post by: runinit2 on 2019-08-15 05:12:57
Decoding of the original flac file (D:\Music\FLAC\2019\Captain Kirk\Jurassic Dark [EP]\02 - Katvealue.flac) failed. Without looking at the file I can not say more. Can you upload the file somewhere for further analysis? Maybe send me the link via PM.

I have uploaded the file, I will send it to you in a PM.

I reinstalled the stable version of foobar and tried this test again. The console does contain more information when Im using 1.4 which may be of help! I tested this with two different encoders (which are working with the same switches from cmd.exe), and also tried testing it against a local harddrive (to rule out any android/mtp related issues). For some reason %in% and %out% are not passing the paths/filenames? Maybe I am using a conflicting extension?

Console Output using LAME

foo_ows: Using encoder lamev0 with file ext mp3
   encoder cmd line c:\tools\lame\lame.exe --vbr-new -h -V 0 -r -s %sr% %in% %out%
foo_ows: Converting file. Commandline: c:\tools\lame\lame.exe --vbr-new -h -V 0 -r -s 44100  ""  ".mp3"
foo_ows: Error: Conversion thread exit code -1. Converter output follows:
Could not find ".mp3".
Can't init infile '.mp3'

Console Output using oggenc2

foo_ows: Using encoder OGG with file ext ogg
   encoder cmd line c:\tools\oggenc2.exe  -q 5 --raw --resample %sr% %in% %out%
foo_ows: Converting file. Commandline: c:\tools\oggenc2.exe  -q 5 --raw --resample 44100  ""  ".ogg"
foo_ows: Error: Conversion thread exit code -1073741819. Converter output follows:
foo_ows: End of converter output
Title: Re: foo_onewaysync
Post by: zimjo on 2019-08-23 20:28:16
Converting the file works for me with foobar v1.3.5. I can not reproduce the issue.
The flac is decoded to a temporary file. After that the temporary file is passed to the encoder (such as lame, oggencode etc.). In your case, the temporary file was not generated. This can happen if the file is faulty, but this is not the case.
Please make sure that your computer is running stable, and is not low on hard drive space or RAM.
Title: Re: foo_onewaysync
Post by: runinit2 on 2019-08-24 19:05:40
Very odd.

I re-imaged my laptop and reinstalled foobar2k + components from scratch.. seems to work now.
Title: Re: foo_onewaysync
Post by: marapavelka on 2019-08-25 14:39:32
Doe's OWS work with portable version of fb2k? When I want to convert flac files, I get Could not load info (Object not found) from: "C:\Users\marek\AppData\Local\Temp\OWS3F56.tmp.mp3" and  Could not update tags (Object not found) on: "C:\Users\marek\AppData\Local\Temp\OWS3F56.tmp.mp3" errors. Could I change location of temp files to my portable folder or somewhere else?
Title: Re: foo_onewaysync
Post by: zimjo on 2019-08-31 10:49:53
Sounds like this (https://hydrogenaud.io/index.php/topic,105218.msg961370.html#msg961370) issue, see here (https://hydrogenaud.io/index.php/topic,105218.msg961455.html#msg961455) for a solution.
Title: Re: foo_onewaysync
Post by: muxx on 2019-08-31 23:39:09
Ok, today I have used this very helpful plugin for the first time. And it works for me. Nice! Thank you zimjo!
One thing is confusing for me (maybe because of my insufficient linguistic level)... - the syntax for title-formatting scripts.
I would like to set the plugin so it changes the tracknumbers in the destination-folder (single folder) exactly like the order in the playlist - starting from 001 up to n. Have I explain understandably?
My question: is this possible with a script?
My used "Various Artists\%track% - %artist% - %title%.$ext(%_path%)" in the section "Tasks" works to that effect that the tracknumbers of the generating files all have numerics like its position on the albums.

Thank you!! :-*
Title: Re: foo_onewaysync
Post by: zimjo on 2019-09-01 18:01:37
What you are looking for is called %list_index%, see here (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.25list_index.25). Unfortunately, it only works in playlist view, but NOT in OWS.
Title: Re: foo_onewaysync
Post by: muxx on 2019-09-01 19:26:48
Ok. Is there a possibility to integrate the functionality in OWS?
Otherwise we must re-tag all the files after the conversion for a correct playback in specified order.
If I alone with the problem then maybe it would be more trouble than it's worth.....
Title: Re: foo_onewaysync
Post by: zimjo on 2019-09-01 19:56:08
The component generates a playlist at the target location.
Title: Re: foo_onewaysync
Post by: thesitarhero on 2020-01-23 21:43:05
Release 0.6.4 hopefully fixes these issues for good  :)

Unfortunately I'm having these same issues with version 0.6.4. It worked initially but now only works with very small playlists, not sure why. Temp files are deleted part way through conversion.
Title: Re: foo_onewaysync
Post by: zimjo on 2020-01-26 18:56:30
Check available space on your harddrive and also these settings from windows:
I didn't even know there was a "Storage sense" setting in Windows 10. Thank you for letting me know about it. I turned it off, and also turned off a seemingly related setting I found right under the Storage sense setting, labeled "Delete temporary files that my apps aren't using".
Title: Re: foo_onewaysync
Post by: evndude on 2020-03-05 21:48:53
First, thanks zimjo for the awesome plugin. Only wish I had found this sooner!

I had some trouble figuring out how to use Opus, so hopefully this will help someone. To use opus, you must have "--raw" included as an option. For example:

"C:\Program Files (x86)\foobar2000\encoders\opusenc.exe" --raw --bitrate 96 %in% %out%

There is a minor issue using Opus though. A warning appears because sample rate is missing, but Opus does not require it, since it always uses 48kHz.

The warning comes in two places:
- console while converting: "foo_ows Warning: Sampling rate not specified during encoding! Please add %sr% to your encoder setting."
- pressing OK after using "Edit Encoder": "Warning: Sampling rate not specified. Please add %sr% to encoder command, e.g. for lame '-s %sr%'.

Not a big deal issue since it does not interfere with functionality at all. If converting a lot of tracks though, the entire console is filled with warnings.

Thanks again!
Title: Re: foo_onewaysync
Post by: zimjo on 2020-03-28 11:42:33
Glad you find it helpful  :)

From the opusenc documentation:
Quote
--raw-rate N
    Set sampling rate for raw input (default: 48000).
opusenc assumes raw input to have a samplerate of 48kHz. So, if the original file has a different sample rate, such as 44.1kHz or 96kHz, the resulting opus file will have wrong pitch.

In your example the command line should read
Code: [Select]
"C:\Program Files (x86)\foobar2000\encoders\opusenc.exe" --raw --raw-rate %sr% --bitrate 96 %in% %out%
Title: Re: foo_onewaysync
Post by: evndude on 2020-03-28 18:48:55
Ah now it makes sense. Everything I read said it always uses 48kHz, and people suggested not to mess with it, but now I realize that's only for the output. Also at least some of online documentation seems to be missing the --raw-rate option, but now I see it checking the actual opus help options from the command line. I already did that before but I must have overlooked it. It was "working" even without sample rate being specified, but who knows what it was doing. Thanks again!
Title: Re: foo_onewaysync
Post by: TheEmpathicEar on 2020-05-12 15:03:52
Hi. I have been using Foobar with the iPod Manager for years to sync with my iPod. Now, I have a Samsung Galaxy A51. I was wondering if this plug-in could synchronize my music collection to my phone? And/or is there a better way to do this?
Title: Re: foo_onewaysync
Post by: TheEmpathicEar on 2020-05-15 17:23:50
Been using this for quite a while alongside Syncthing for putting files onto my phone.
One pretty major reoccurring problem I face is that the wrong album art gets applied to entire albums at a time

Updated a few weeks ago when I lost my output drive, continues to happen on clean exports

My first look at this before I purchase MediaMonkey or some other commercial software. What is SyncThing?
Title: Re: foo_onewaysync
Post by: g13092 on 2020-07-17 16:57:50
Hi, trying to familierize myself with fb2k for syncing SD / usb cards for my car.  I tried the monkey thing for a while, but it was sketchy.  OWS looks like the ticket.  I have it syncing, but I also want it to remove things I take out of my playlist.  I have Delete unreferenced files checked and Show files removed since last sync checked.  But, the files removed from the playlist remain in the destination after additional syncs.  So, I check the log, and right after the last song copy, I notice:

Deleting temporary files.
foo_ows: Finished task 'New Task'.
foo_ows: Reading from db.
foo_ows: SQL error: no such table: OWS
foo_ows: Attempting to copy file  to
foo_ows: Error: File not found
Deleting temporary files.
foo_ows: Done with command 'truck_sd_test'.
foo_ows: Found 2 WPD devices.
foo_ows: Found storage object 64sd\F:
foo_ows: Found storage object Zune\Storage

The two errors caught my attention.  I'm not writing to the SD or the Zune.  Truck-test just goes to a folder for testing purposes...
OWS is 0.6.4, fb2k is 1.5.5

Title: Re: foo_onewaysync
Post by: g13092 on 2020-07-20 02:47:19
Anyone have an idea about the errors?  Maybe an idea why the unreferenced files weren't removed?
Title: Re: foo_onewaysync
Post by: Kuras on 2020-07-25 15:30:42
To my understanding, OWS converts music files into a temporary file and copies it all to the destination folder at the end of the operation (or in a similar sense). However, when an issue occurs or the destination device disconnects, the operation freezes or terminates prematurely, rendering all progress for naught. Is it possible to convert each file directly to the destination instead, like the default converter?
Title: Re: foo_onewaysync
Post by: zimjo on 2020-09-06 08:47:32
645 date=1595209639]
Anyone have an idea about the errors?  Maybe an idea why the unreferenced files weren't removed?
The feature requires the database to be present. In your case the database is not found or empty. Probably because you moved the files without moving the database.
Title: Re: foo_onewaysync
Post by: zimjo on 2020-09-06 09:03:40
To my understanding, OWS converts music files into a temporary file and copies it all to the destination folder at the end of the operation (or in a similar sense). However, when an issue occurs or the destination device disconnects, the operation freezes or terminates prematurely, rendering all progress for naught. Is it possible to convert each file directly to the destination instead, like the default converter?
What action do you expect upon removal of device?
OWS copies all files belonging to one playlist in one go. I do not have the time nor the motivation to change this at the moment. As conversion is done very quickly by CPUs nowadays, this is also not a big issue. What is slow about OWS is copying to WPD devices and updating tags on normal devices.
Nevertheless, all playlists that finished syncing before an interruption will be present at the destination.
Title: Re: foo_onewaysync
Post by: ReFreezed on 2021-02-11 14:34:28
645 date=1595209639]
Anyone have an idea about the errors?  Maybe an idea why the unreferenced files weren't removed?
The feature requires the database to be present. In your case the database is not found or empty. Probably because you moved the files without moving the database.
I have the same issue, but the database file does exist and is not empty (several kb). Copying files to the destination (my phone) works, but reading that file doesn't seem to. I just installed the component and everything worked right away, except for the file deletions after I remove things from the playlist. I did not move any files, and 'Delete unreferenced files' is checked. I tried removing the files from the destination manually and then re-sync but it still doesn't work. I'm using Windows 7.

Log:
foo_ows: Attempting to copy file wpd:\HTC One X\Internal storage\Music Sync\.ows_HTC.sqlite to C:\Users\MyName\AppData\Local\Temp\OWS65DC.tmp.sqlite
foo_ows: Error: File not found wpd:\HTC One X\Internal storage\Music Sync\.ows_HTC.sqlite
foo_ows: Syncing 'SYNC' to  wpd:\HTC One X\Internal storage\Music Sync\%artist%_%album%_%discnumber%%tracknumber%. %title%.$ext(%_path%)
foo_ows: Using encoder lame with file ext mp3
   encoder cmd line "D:\path\to\lame.exe" --vbr-new -h -V 4 -r -s %sr% %in% %out%
foo_ows: Attempting to copy file D:\Music\blahblahblah1.mp3 to wpd:\HTC One X\Internal storage\Music Sync\blahblahblah1.mp3
(...)
foo_ows: Attempting to copy file D:\Music\blahblahblah99.mp3 to wpd:\HTC One X\Internal storage\Music Sync\blahblahblah99.mp3
foo_ows: Attempting to copy file C:\Users\MyName\AppData\Local\Temp\OWS685D.tmp.m3u to wpd:\HTC One X\Internal storage\Music Sync\SYNC.m3u
Deleting temporary files.
foo_ows: Finished task 'Default'.
foo_ows: Reading from db.
foo_ows: Attempting to copy file C:\Users\MyName\AppData\Local\Temp\OWS65DC.tmp.sqlite to wpd:\HTC One X\Internal storage\Music Sync\.ows_HTC.sqlite
Deleting temporary files.
foo_ows: Done with command 'HTC'.
Title: Re: foo_onewaysync
Post by: thathobo on 2021-02-16 04:39:56
Haven't synced in a couple of months due to the slow speed of the sync (37k items in library), so I couldn't tell you precisely what point it stopped working, but upon trying today OWS crashes Foobar every time right when it starts to try to sync my "All Music" smart playlist which I use as a convenient way to add all my new music to my phone.  Attempting to sync any other set of playlists returns an error like "One way sync failed: Error: Could not create directory on WPD device. Another item with the name \SAMSUNG-SM-G930A\Card\Tabletop Playlists might exist already, or check permissions."  Have not yet attempted removing all music on my phone and trying again from scratch, but due to this process taking ~8 hours and being prone to errors and crashing, I'm not keen to do that as a first step.  Any help would be appreciated.  Crash files attached.
Title: Re: foo_onewaysync
Post by: zimjo on 2021-03-10 17:17:11
@thathobo can you check if it works with the attached version. It has to be installed manually, just replace the existing component dll in the foobar folder with the attached one.
Title: Re: foo_onewaysync
Post by: hummel124 on 2021-03-12 16:01:16
I would like to ask for a feature (which was already mentioned in 2015):
I would very much appreciate a %playlist% tag in the Titleformatting Scripts to be able to create different folders by selecting several playlists in one single task. Any other solution would be welcome.

I sync differrent playlists to different devices and it's a bit of a mess in the tasks & devices.

I really like the plugin and thank you for your time :)

Thank you
Chris
Title: Re: foo_onewaysync
Post by: Odinos on 2021-03-17 21:07:58
What does error 3 mean? I cannot find any error code references in the wiki.

Code: [Select]
One way sync failed: Could not copy file to WPD device. source: "D:\Music Library\Sophie - Nothing More to Say + EEEHHH (2013)\03 - Sophie - Nothing More to Say (Vox).mp3", destination: "\Pixel 4\Internal shared storage\Music\Sophie - Nothing More to Say - EEEHHH (2013)\01 - Nothing More to Say (Vox).mp3", error 3

Code: [Select]
One way sync failed: Could not copy file to WPD device. source: "D:\Music Library\KOAN Sound - Funk Blaster (2011)\02 - KOAN Sound - Meanwhile, In The Future.mp3", destination: "\Pixel 4\Internal shared storage\Music\KOAN Sound - Funk Blaster (2011)\04 - Meanwhile, In The Future.mp3", error 3
Title: Re: foo_onewaysync
Post by: ruebe on 2021-03-18 22:18:49
@thathobo can you check if it works with the attached version. It has to be installed manually, just replace the existing component dll in the foobar folder with the attached one.

For me neither version works. The first task ends (temp files removed according to the console), and as soon as the second one starts (first song from the second task about to be copied) I get the same error with both dll's ("official" one and the one attached to your comment).

Nothing else is mentioned in the console (additional debug info is enabled).
Title: Re: foo_onewaysync
Post by: tkakanowski on 2021-03-19 23:12:48
So I'm desperately trying to get away from iTunes for syncing music to my phone; I currently sync about 150GB of files (4700 approx right now), from a collection of a little over 30K files costing 2TB.  I convert to ALAC/M4A then have to muck about with iTunes to get them on my phone.  Its a bit of a PITA!  I'd like to move to using FB2K on mobile, but the only way to bypass iTunes there is to use fb2k mobile's built in FTP server.  I've not been able to figure out a way to integrate that as a destination device/folder in OWS; the closest I got was mapping the folder to a windows drive letter, but OWS raised IO errors when trying to write to it, and I can conceive of several reasons why.  Love your tool, I've depended on it for the last 4-5 years or so, and I'm just curious if you have any intent to support FTP as a destination?  You use sqllite as a mechanism instead of file timestamps for synchronizing, and that would be needed in this scenario, as the fb2k mobile FTP server doesn't support the commands to update timestamps on files, so files on that server have totally different timestamps as compared to the sources, and scanning content for differences (in my case) would take hours for certain.  Thanks for your time!
Title: Re: foo_onewaysync
Post by: Imaris on 2021-04-21 02:42:29
Hi!
I've encountered a problem with file names. If there is any whitespace in the file or directory name right before a dot, it would be copied without that space. If there are several dots, there will be "_" symbols replacing some of the dots. That renaming happens regardless of how I get the text, from %filename% or %title%.
For example:
2007 ''Auļos...''/01. Ievads - bites un bungas.mp3 -> 2007 ''Auļos__.''/01. Ievads - bites un bungas.mp3
2005 ''Sounds of Pain...''/04. Sounds of Pain....flac -> 2005 ''Sounds of Pain__.''/04. Sounds of Pain__..flac
1997 ''Sol Niger Within''/22. Magickal Theatre .33.flac -> 22. Magickal Theatre.33.flac

File names are important for me, because I export my own playlists from foobar that use all my library, and these songs are missing when playing the playlists on phone because of wrong file names.

What can I do to prevent renaming files like that when I use OneWaySync?

My titleformatting script:
$right($directory_path(%path%),$sub($len($directory_path(%path%)),9))\%filename%

Thanks!
Title: Re: foo_onewaysync
Post by: stevehero on 2022-02-26 02:31:28
When I try to edit existing encoder settings they don't stick.

I have to create a new one every time. 

Is there a way around this?
Title: Re: foo_onewaysync
Post by: stevehero on 2022-04-09 20:51:04
I have my files like so in album folders:

track 1.flac
track 2.flac
folder.jpg



I have folder.jpg in the cover filename text box. But the file is never copied to the destination folder. Would I be doing something else wrong?

Here's the log:
Quote
[20:57:30] foo_ows: Attempting to copy file  to
[20:57:30] foo_ows: Error: File not found
[20:57:30] Deleting temporary files.
[20:57:30] foo_ows: Done with command 'OPPO Transfer'.

Title: Re: foo_onewaysync
Post by: olad on 2022-04-16 16:10:41
Hi,
Exactly the same problem here, fresh install, first sync works good, but once i delete a song from the synced playlist the next sync freeze with the same console output than ReFreezed user.
I'm on Win 10 with a WPD device.
I really find this extension useful, how can i help to fix this issue ?


645 date=1595209639]
Anyone have an idea about the errors?  Maybe an idea why the unreferenced files weren't removed?
The feature requires the database to be present. In your case the database is not found or empty. Probably because you moved the files without moving the database.
I have the same issue, but the database file does exist and is not empty (several kb). Copying files to the destination (my phone) works, but reading that file doesn't seem to. I just installed the component and everything worked right away, except for the file deletions after I remove things from the playlist. I did not move any files, and 'Delete unreferenced files' is checked. I tried removing the files from the destination manually and then re-sync but it still doesn't work. I'm using Windows 7.

Log:
foo_ows: Attempting to copy file wpd:\HTC One X\Internal storage\Music Sync\.ows_HTC.sqlite to C:\Users\MyName\AppData\Local\Temp\OWS65DC.tmp.sqlite
foo_ows: Error: File not found wpd:\HTC One X\Internal storage\Music Sync\.ows_HTC.sqlite
foo_ows: Syncing 'SYNC' to  wpd:\HTC One X\Internal storage\Music Sync\%artist%_%album%_%discnumber%%tracknumber%. %title%.$ext(%_path%)
foo_ows: Using encoder lame with file ext mp3
   encoder cmd line "D:\path\to\lame.exe" --vbr-new -h -V 4 -r -s %sr% %in% %out%
foo_ows: Attempting to copy file D:\Music\blahblahblah1.mp3 to wpd:\HTC One X\Internal storage\Music Sync\blahblahblah1.mp3
(...)
foo_ows: Attempting to copy file D:\Music\blahblahblah99.mp3 to wpd:\HTC One X\Internal storage\Music Sync\blahblahblah99.mp3
foo_ows: Attempting to copy file C:\Users\MyName\AppData\Local\Temp\OWS685D.tmp.m3u to wpd:\HTC One X\Internal storage\Music Sync\SYNC.m3u
Deleting temporary files.
foo_ows: Finished task 'Default'.
foo_ows: Reading from db.
foo_ows: Attempting to copy file C:\Users\MyName\AppData\Local\Temp\OWS65DC.tmp.sqlite to wpd:\HTC One X\Internal storage\Music Sync\.ows_HTC.sqlite
Deleting temporary files.
foo_ows: Done with command 'HTC'.
Title: Re: foo_onewaysync
Post by: nikolai4ik on 2022-06-15 21:00:46
Hey guys, I have a weird problem - this plugin hates Red Hot Chili Peppers. For example I just synced my playlist with the phone and in the OWS removed items playlist I have 18 songs - all by RHCP despite the fact that they shouldn't have been removed by my filters. Not the first time it happens (last time it did, I just moved them to my phone manually). Where should I look?
Title: Re: foo_onewaysync
Post by: ThinkWithP_body on 2022-08-22 18:02:34
Hi, I'm having trouble getting OWS 0.7.0 to convert my lossy files. The files in question are in m4a or mp3 and are being converted to m4a.
https://live.staticflickr.com/65535/52303804068_4032c51f14_o.jpg
https://live.staticflickr.com/65535/52303836093_cb10a3eae5_o.jpg
When the conversion finishes I get these messages and the converted files will not copy to the destination


Quote
Could not update tags (Object not found) on:
"C:\Users\twp\AppData\Local\Temp\OWS39C7.tmp.m4a"

Exported files and playlists succesfully.

2 playlists exported.
1 files converted.
2 files updated.

When I stalk the temp folder, I see that files with the same name but without the .m4a at the end are being created and deleted. If I get rid of the File ext from the encoder settings. I'll end up with file names like OWS39C7.tmp. and OWS won't recognize those either.
These problems won't occur when I use opus or lame, only qaac.
How can I work around this? Thanks for your time!
Title: Re: foo_onewaysync
Post by: stevehero on 2023-01-04 22:32:26
Just tried this component again because there are no real options to convert to a USB. Using the converter in fb but it has no way of syncing (deleting unreferenced files but it does have DSP) (Although this component suffers a bug with this, see below).

Bugs I've encountered:

Feature request:

Log below:
Code: [Select]
[22:22:54] foo_ows: Exporting selection to  C:\Users\username\Desktop\test\%album%\%title%.$ext(%_path%)
[22:22:54] foo_ows: Using encoder 320kbps with file ext mp3
  encoder cmd line "W:\Apps (Portable)\Music Apps\foobar2000\encoders\lame3.100-libsndfile\lame.exe" -m s -b 320 -s %sr% %in% %out%
[22:22:54] foo_ows: Converting file. Commandline: "W:\Apps (Portable)\Music Apps\foobar2000\encoders\lame3.100-libsndfile\lame.exe" -m s -b 320 -s 44100  "C:\Users\USER~1\AppData\Local\Temp\OWS90DC.tmp"  "C:\Users\USER~1\AppData\Local\Temp\OWS90DC.tmp.mp3"
[22:22:57] foo_ows: Conversion Complete
[22:22:57] foo_ows: Attempting to copy file C:\Users\USER~1\AppData\Local\Temp\OWS90DC.tmp.mp3 to C:\Users\username\Desktop\test\Anthems For Doomed Youth [UICW-10006]\Over It Again.mp3
[22:22:57] Deleting temporary files.
[22:22:57] foo_ows: Finished task 'Car Playlist'.
[22:22:57] foo_ows: Reading from db.
[22:22:57] foo_ows: SQL error: no such table: OWS
[22:22:57] foo_ows: Attempting to copy file  to
[22:22:57] foo_ows: Error: File not found
[22:22:57] Deleting temporary files.
[22:22:57] foo_ows: Done with command 'Car USB'.
Title: Re: foo_onewaysync
Post by: realg on 2023-05-10 21:43:05
Any chance this component could get a 64bit release to make it compatible with the new 2.x preview releases?
Title: Re: foo_onewaysync
Post by: terdex on 2024-03-22 23:42:24
also wondering if there can be a 64 bit release...
Title: Re: foo_onewaysync
Post by: marc2k3 on 2024-03-23 02:01:49
Seems unlikely given the OP hasn't signed in 2021. This can be checked by clicking on their username to view their profile.

I'm going to assume it will work fine on 32bit 2,x?? Most components do although there are a few exceptions.
Title: Re: foo_onewaysync
Post by: terdex on 2024-03-27 08:37:37
Seems unlikely given the OP hasn't signed in 2021. This can be checked by clicking on their username to view their profile.

I'm going to assume it will work fine on 32bit 2,x?? Most components do although there are a few exceptions.

Got it, I wonder if they had shared their source code somewhere then could someone else update it?